VNC over an SSH connection

VNC

Using a VNC client over an SSH tunnel can be useful. I sometimes use that setup when I have a GUI application running remotely that I don't want to restart. Using VNC I can quickly take control of it.

Raw
$ # SSH and open a tunnel for the VNC connection
$ ssh -C -L 5900:localhost:5900 example.com
$ # Start the VNC server on example.com (apt-get install x11vnc)
$ x11vnc -display :0

$ # On the local machine (apt-get install xtightvncviewer)
$ vncviewer localhost
DjangoPythonBitcoinTuxDebianHTML5 badgeSaltStackUpset confused bugMoneyHackerUpset confused bugX.OrggitFirefoxWindowMakerBashIs it worth the time?i3 window managerWagtailContainerIrssiNginxSilenceTorWorldInternet securityFontGnuPGThunderbirdJenkins