After a few attempts I converged into a remote desktop solution for headless servers that I like. On the client side (Debian Squeeze), I use Remmina, but I had to make sure, since I have an old Intel graphics chip (855GME), to set ShadowFB properly in xorg.conf. On the server side (Debian Squeeze and Ubuntu Lucid), I use vnc4server from RealVNC, with fluxbox as the desktop environment. (Gnome creates a mess with key bindings which were unfixable after trying various suggestions from the Web.) The nice part about RealVNC is that you can specify the geometry flag multiple times to fake a display capable of multiple resolutions and RandR. Here is my command line to start up the VNC server.
vncserver -geometry 1920x1200 -geometry 1680x1050 -geometry 1024x768 :1
Later I use xrandr as follows depending on the size of the display from which I connect:
$ xrandr SZ: Pixels Physical Refresh *0 1920 x 1200 ( 488mm x 305mm ) *60 1 1680 x 1050 ( 427mm x 267mm ) 60 2 1024 x 768 ( 260mm x 195mm ) 60 Current rotation - normal Current reflection - none Rotations possible - normal Reflections possible - none $ xrandr -s 1
Update: To get a familiar gnome desktop change your ~/.vnc/xstartup file to:
#!/bin/sh unset SESSION_MANAGER [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources eval `dbus-launch --sh-syntax --exit-with-session` vncconfig -nowin & x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & gnome-sessionBut you have to remove the logon applet and the mail/message applet otherwise you cannot use the lowercase s and d keys!
Update 2011/09/20: Unfortunately no VNC client is perfect. vnc4viewer has flaky multi-key capture (alt-tab etc.) and F8 is a pain with Eclipse. Remmina is as close as it gets to perfect but it keeps stalling and crashing on Lucid and Squeeze. RealVNC server on Lucid flakes out on Gnome drag and drop. So I have moved over to Nomachine's NX client and server. They are almost perfect, except that a network disconnection hangs the client desktop and in full-screen mode even disables alt-F1 so you cannot kill the client unless you can ssh to your client PC from another handy PC. I plan to return to Remmina once the crash is fixed.