VNC HowTo

VNC allows you to open a graphical session with a remote computer. The session offers the complete display of a login session, as if you were physically sitting in front of the computer. VNC uses efficient compression techniques to send graphics over the network. These two facets of VNC make it more functional, and more efficient than running remote X Windows applications. You can read more about VNC at www.realvnc.com .

Installing VNC and SSH

  1. If you are using Mac OS X or Linux, you likely have ssh already installed.
    An ssh client for Windows can be obtained from http://www.ssh.com/support/downloads/secureshellwks/non-commercial.html .

  2. Obtain a VNC client for your local computer. A client for Windows or Linux may be downloaded from http://www.realvnc.com/download.html . Since the RealVNC folks don't develop a VNC client for Mac OS X, you can download a port of the client from another developer at http://sourceforge.net/projects/cotvnc/ . The name of the port is called "Chicken of the VNC."

Starting a VNC Session and connecting to it

  1. Connections in VNC are established via a port number (or optionally, a display number). The display number, e.g. :12, is allocated dynamically when you start a VNC server session. The relationship between port and display is display+5900=port. You need to know the VNC display number so that you can connect from your client machine. There are 3 steps to establish a VNC session.
  2. REMEMBER: Everytime you type 'runvnc' you will start a new VNC server, and you could end up with multiple VNC sessions. This could lead to confusion on your part, so avoid having more than one VNC session open. In principle, you can start a VNC server session and keep it open for months, never having to start another VNC session.

Connecting to an existing VNC session

Leaving or stopping a VNC session

  1. To leave your VNC session, just kill the client window on your local machine. This will terminate your connection to the VNC server but will leave your VNC server session intact so that you can connect to it at a later time.
  2. To terminate your VNC server session, login to melodic and issue the following command:
    runvnc -kill :xx

    where xx is your display number.

  3. If you have forgotten what your display number is (or to check how many VNC server sessions you might be running), type
    ps ax | grep Xvnc

    The command 'ps' will generate a list of processes you are running. The '|' sign will "pipe" the output of the ps command to the 'grep' command which will search for and display those lines containing the expression "Xvnc". On those lines, you will see Xvnc followed by :x, where x is your display number. Xvnc is the unix process that runs the VNC server session. Now that you have the display number you can either kill your Xvnc session or connect to it from your VNC client.

    You can further narrow the list of Xvnc process to show only yours by typing

    ps ax | grep Xvnc | grep <userid>


    where <userid> is your login ID.


Last Updated: February 1, 2006