I’m not a fan of Gnomes implementation of the VNC Server on Ubuntu. It is always randomly closing on me. If you have SSH access to your desktop though you can remotely start the vino-server allowing you to once again VNC in.
Simply create the following script and name it something like start-vino.sh:
1 2 3 4 5 | #!/bin/bash gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true gconftool-2 --type bool --set /desktop/gnome/remote_access/prompt_enabled 0 export DISPLAY=:0.0 /usr/lib/vino/vino-server |
Now chmod the script 744, giving only you the owner the ability to execute and modify the file. Next time your vino server dies, tunnel into your desktop and run this script. You can find more information by viewing this Ubuntu Forum thread.