#!/bin/bash single() { xrandr \ --output LVDS --mode 1280x800 --pos 0x0 --dpi 96 \ --output VGA --off } dual() { xrandr \ --output VGA --mode 1280x1024 --pos 0x0 --dpi 96 \ --output LVDS --mode 1280x800 --pos 0x1024 --dpi 96 } twm & dual sleep 3 glxgears # works anywhere on the screen single sleep 3 chvt 1 sleep 3 chvt 10 # x vt sleep 3 dual glxgears # works only in the topleft 1280x800 corner xterm