Dynamic configuration
#disable laptop screen
xrandr --output LVDS --off
# switch back to laptop screen
xrandr --output VGA --off
xrandr --output LVDS --auto
# dual-head (laptop + external)
xrandr --output VGA --above LVDS
# --left-of, --below etc. also work
For the last xrandr command (dual-head), your combined external + laptop virtual screen resolution must not exceed the virtual desktop size. If not specified in xorg.conf, the X server pre-computes it at startup as the highest resolution of all monitors connected to your computer (i.e. if you start with your external monitor disconnected, the laptop's resolution; if the external monitor is connected at start-up, it will most likely dictate the virtual). Therefore you will most likely want to specify the virtual desktop size:
Section Screen
Subsection Display
Depth 32
Virtual 2048 2048
EndSubsection
EndSectionHowever, as a further twist, some cards lose graphics acceleration capabilities when the virtual size is too high. If you notice your browser scrolling a page slower than normal, for example, this may be to blame.