1 [xrandr][] is a simple command line interface to X's [RandR][]
2 extension, allowing you to manipulate the root window and map it onto
3 different devices. I use it to switch between my laptop's builtin LCD
4 screen and external monitors when I'm giving presentations, or when
5 I'm at home and just want to take advantage of a larger display.
7 You can get a list of available devices with
10 Screen 0: minimum 320 x 200, current 800 x 480, maximum 4096 x 4096
11 LVDS1 connected 800x480+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
13 640x480 85.0 72.8 75.0 59.9
17 VGA1 disconnected (normal left inverted right x axis y axis)
18 TV1 disconnected (normal left inverted right x axis y axis)
20 Once I've plugged an external monitor into the VGA port on my laptop, I get
23 Screen 0: minimum 320 x 200, current 800 x 480, maximum 4096 x 4096
24 LVDS1 connected 800x480+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
26 640x480 85.0 72.8 75.0 59.9
30 VGA1 connected (normal left inverted right x axis y axis)
33 1024x768 85.0 75.1 60.0
35 800x600 85.1 75.0 60.3
36 640x480 85.0 75.0 60.0
38 TV1 disconnected (normal left inverted right x axis y axis)
40 Shift output to the external monitor at its full resolution with
42 $ xrandr --fb 1280x1024 --output VGA1 --auto
43 $ xrandr --output LVDS1 --off
45 When you're done, shift it back with
47 $ xrandr --fb 800x480 --output LVDS1 --auto
48 $ xrandr --output VGA1 --off
50 If you want to split your screen across both monitors, use something like
52 $ xrandr --output VGA1 --auto --right-of LVDS
54 For more information, check out the excellent [tutorial at
57 [xrandr]: http://www.x.org/wiki/Projects/XRandR
58 [RandR]: http://en.wikipedia.org/wiki/RandR
59 [tutorial]: http://www.thinkwiki.org/wiki/Xorg_RandR_1.2