mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / xrandr.mdwn
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.
6
7 You can get a list of available devices with
8
9     $ xrandr
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
12        800x480        60.6*+
13        640x480        85.0     72.8     75.0     59.9  
14        720x400        85.0  
15        640x400        85.1  
16        640x350        85.1  
17     VGA1 disconnected (normal left inverted right x axis y axis)
18     TV1 disconnected (normal left inverted right x axis y axis)
19
20 Once I've plugged an external monitor into the VGA port on my laptop, I get
21
22     $ xrandr
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
25        800x480        60.6*+
26        640x480        85.0     72.8     75.0     59.9  
27        720x400        85.0  
28        640x400        85.1  
29        640x350        85.1  
30     VGA1 connected (normal left inverted right x axis y axis)
31        1280x1024      60.0 +   75.0  
32        1152x864       75.0  
33        1024x768       85.0     75.1     60.0  
34        832x624        74.6  
35        800x600        85.1     75.0     60.3  
36        640x480        85.0     75.0     60.0  
37        720x400        70.1  
38     TV1 disconnected (normal left inverted right x axis y axis)
39
40 Shift output to the external monitor at its full resolution with
41
42     $ xrandr --fb 1280x1024 --output VGA1 --auto
43     $ xrandr --output LVDS1 --off
44
45 When you're done, shift it back with
46
47     $ xrandr --fb 800x480 --output LVDS1 --auto
48     $ xrandr --output VGA1 --off
49
50 If you want to split your screen across both monitors, use something like
51
52     $  xrandr --output VGA1 --auto --right-of LVDS
53
54 For more information, check out the excellent [tutorial at
55 ThinkWiki][tutorial].
56
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
60
61 [[!tag tags/linux]]