Using VNC on Linux

Unlike many other operating systems, Linux uses an X server for graphical display, which allows network redirection. This me ans that you can easily have a secure remote display without using VNC by tunneling through ssh using 'ssh -X'. None the les s, if for some reason you would still like to use VNC, this page describes the process for getting it to work.

Download and install a secure shell client

Modern Linux distributions typically come with a secure shell client, ssh. If you find that you need a copy, a free implemen tation, openssh (and a dependency, openssl) is available at http://www.openssh.org.

Download and install a VNC client

We recommend using TightVNC as it includes a number of nice features over the official VNC client.Download a copy at the TightVNC download page: http://sourceforge.net/projects/vnc-tight/.The viewer is available as a pre-compiled binary or as source code. Only download the source if you are familiar with building packages or have an OS which doesn't have pre-built binaries. Optionally, install the VNC client to a system directory. Of course, first take a look at the README.

Each time you want to connect using VNC, do the following:

  • Use ssh to forward a local port to the VNC server. The following would work for Grace Hopper:
ssh -L 5901:localhost:5995 grhopper@mote.cs.vassar.edu
  • Start the VNC client:
vncviewer -encodings "tight hextile" :1
  • When you finish your Unix session, log out of Unix as you normally would, quit vncviewer, and exit from your ssh session.