Fast trick: accessing a VNC server via SSH

Translation of the original in Catalan. Read it in: CatalàCastellano

Almost without meaning to I have just discovered a very interesting feature of vncviewer that in this case I was using to remotely access a vino-server, the server that an Ubuntu uses to export the screen over the network. Well then, it turns out that I could not access it through port 5900/tcp which is the normal one. Well then, it seems that you can also access it directly over SSH without any effort:

vncviewer -via user@ip_host localhost:0

The user and the ip_host are to access via SSH the machine that is exporting the screen.

On the other hand, if you do not have the vino-server enabled and you want to access the console you can enable it through the goconf tools:

# parar el vino server
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled false
# llençar el vino server
gconftool-2 -s -t bool /desktop/gnome/remote_access/enabled true
# fixar un password d'accés:
gconftool-2 -s -t string /desktop/gnome/remote_access/vnc_password qwerty