I was helping a May First/People Link member with a projector presentation (my personal laptop, liberace, was drafted into service) yesterday when I realized that liberace's screen resolution was too wide for the projector to handle.

I'm familiar with the solution on a desktop computer (that has the numbers keypad): Ctrl-Alt-Keypad+ and Keypad- to dynamically change your resolution. However, liberace, like most laptops, doesn't have a keypad. After futzing with the projector, I finally got it to display the screen properly, however, I really could of used a method for changing the resolution.

After a little bit of research I discovered the xrandr command. When run with no arguments, it displays your available resolutions:

0 jamie@liberace:~$ xrandr
Screen 0: minimum 320 x 200, current 1280 x 800, maximum 1280 x 1280
VGA disconnected (normal left inverted right x axis y axis)
LVDS connected 1280x800+0+0 (normal left inverted right x axis y axis) 261mm x 163mm
1280x800       65.3 +   60.0*
1280x768       60.0
1024x768       60.0
800x600        60.3
640x480        59.9
TMDS disconnected (normal left inverted right x axis y axis)
0 jamie@liberace:~$

You can switch resolutions with:

0 jamie@liberace:~$ xrandr -s 800x600 -r 60
0 jamie@liberace:~$

You don't even need to be root!