When there are multiple resolution entries in the xorg.conf (or XF86Config) file, resolution switching is possible with the ctrl, alt, and keypad +/-. When switching to a lower resolution it creates a zoomed-in effect and only a portion of the virtual desktop can be seen in the active viewport. Moving the mouse to the edge of the viewport causes the viewport to scroll along the virtual desktop.
Does anyone know how to disable the scrolling that takes place? I’d like to be able to toggle it on and off when I switch resolutions.
To change the resolution and also the viewport size, you can use the RANDR extension, which is enabled by default and also available on XFree86 4.3. To do this use the xrandr program
To list available modes
for instance I have
SZ: Pixels Physical Refresh
*0 1024 x 768 ( 260mm x 195mm ) *0
1 800 x 600 ( 260mm x 195mm ) 0
2 640 x 480 ( 260mm x 195mm ) 0
Current rotation - normal
Current reflection - none
Rotations possible - normal
Reflections possible - none
To select 800x600
xrandr -s 1
to select 640x480
xrandr -s 2
Usually, application aware of RANDR extension (as gnome or KDE panel) are automatically resized and replaced.
Ctrl-+/- still works to keep the same viewport size.
Ah, that’s right! I’d completely forgotten about xrandr. I’ll make a small wrapper script to call xrandr with the resolution I want, and upon exit from the program I’ll have it put the display back to normal.