I have a process I worked out on Ubuntu 9 and 10 that gets VNC4 working with initd and GDM (Gnome Display Manager). You know what I discovered though thanks to a poster on a forum? They mentioned using FreeNX! I tried it and LOVE LOVE LOVE it. It works over ssh and you can resume your sessions. Here’s how to install it, this is pretty much taken from the reference below but it’s worth posting here since I use my own site from time to time for notes and how to’s (or how I did’s :p). Thanks k. de Jong for posting the how to and ayenack for the reference to the tutorial!
Reference: https://help.ubuntu.com/community/FreeNX & http://ubuntuforums.org/archive/index.php/t-1490075.html
Installing the FreeNX server on Ubuntu Karmic (9.10) or Ubuntu Lucid (10.04) or Ubuntu Maverick Meerkat (10.10)
Open your terminal / command prompt
Applications->Accessories-> Terminal
At this point, the repository is added and apt is updated, then install the freenx package.
(NOTE: As of Aug. 16 2010 the above command doesn’t install a particular script which appears to be missing from the package. So after performing the above, download it from here.
Next, cd to the directory to where the script was downloaded (probably your downloads folder) and unpack it:
Now you’re off to the races, follow the prompt and you’re good to go. The communication goes over SSH so it’s encrypted and it is FAST FAST FAST once it connects. For the initial connection you always see a “!M” screen, I’m guessing this is the NoMachine logo.
Again – all hail k. de Jong for the awesome post on how to install FreeNX on Ubuntu. I also installed it on Ubuntu 10.10 but something about 10.10 was buggy (not with FreeNX but with Ubuntu). On Ubuntu 10.10 you don’t need the extra script download step, it’s included.