Over time my desktop has become a box that just sits in the corner that I boot up using wakeonlan and SSH to when needed. Tonight I wanted to jump onto the console to test a few things, but really didn't want to go through the trouble of hooking up the monitor that now is connected to my laptop (waay too much work, I know :) ). Anyway, it turns out enabling VNC isn't too bad over SSH.
First, enable it for your user:
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true
If you're like me, you probably enabled it at one point, set the password, disabled it and forgot what you set the password. To set it, we use the base64 utility to convert it and set it using gconftool:
gconftool-2 --type string --set /desktop/gnome/remote_access/vnc_password $(echo -n 'dontstealmysupersecretpassword!'| base64)
I then just connected with my VNC client (I used Chicken of the VNC from my MacBook) by connecting to the IP of my desktop on display 0 and the password I had set.
If you're like me even more, you probably ran into trouble getting connected. If you're having troubles getting connected, you can see additional settings for the GNOME remote_access using the gconftool-2 utility:
gconftool-2 -a /desktop/gnome/remote_access
There are a few key settings including "local_only", "enabled" (of course), "prompt_enabled" (makes VNC not prompt on the desktop to allow connection - something that would obviously be a problem if you didn't have access to the console to begin with!), and "use_alternative_port".