VNC Instructions for Distance Students

This page is meant for distance learners in EE department who need to frequently access course software on Leland computer system. If these instructions do not work, please make sure that the corporate firewall on your company-side is not blocking the connection. VNC is not the only option, there are many other alternatives including X-windows servers like Exceed, X-win32 etc. Please contact SCPD TA in EE with comments or sugegstions about this page.

Acknowledgement: This document was adopted from CS107 webpage

Summary:

VNC is an easy to use and a freely available application for remote x-windows sessions. VNC comes in two parts: the server, which is already installed on Stanford's leland computer at /usr/pubsw/bin/vncserver, and the client, which you need to download yourself. Following is a summary of the steps that you will need to follow to start a VNC session.

a) SSH remote login to Stanford unix computers using PuTTy or secureCRT or any other secure client.
b) Start a vncserver session on the remote unix computer.
c) Note down the vncserver output number e.g. elaine2.stanford.edu:13 
c) Set the vnc password on the remote unix computer.  This needs to be done one time only.
d) Start vnc viewer on the local PC or Mac.
e) Enter the destination e.g. elaine2.stanford.edu:13 and enter password.
f) The x-session should pop up on your local machine.


Details:

Following are the detailed steps required to use VNC.

  • Download and install PuTTy or SecureCRT on the PC. SecureCRT is available via PCstanford with a valid SUNetID. PuTTy is available as a single executable file PuTTy.exe. Mac users should use Samson for Macintosh in conjuction with Mac-Leland available through ITSS.
  • Download the VNC package from http://www.realvnc.com/download.html. You will need to provide some info in order to download the package. Decompress it as necessary, and then discard everything except the VNC viewer application.
  • Telnet/SSH to either an elaine, epic, myth, or saga using PuTTY, SecureCRT or Samson. Before you use the vncserver the first time, you may need to create the directory ~/.vnc so that vnc can store a password. Use the following procedure if you need to create this folder. Change to your home directory and create this directory.
        elaine2> cd
        elaine2> mkdir .vnc
    
  • Before you use the vncserver for the first time, you'll need to create a password so that only you can connect to your vncserver. While still telneting to a leland machine, type vncpasswd at the command prompt to set the password. You only need to do this once, but you're free to run it whenever you want or need to choose a new password.
  • Every time you want to work remotely, you'll need to telnet to a machine and run vncserver to start the VNC server application. The server will return a virtual screen number for you. For illustration purposes, assume it's elaine2.stanford.edu:25.
  • Launch the VNC viewer application on your local machine, specifying the server name and the virtual screen number: elaine2.stanford.edu:25. You'll be asked for your password, and provided you enter it correctly, a large, virtual X Window will appear.
  • Back in the original telnet window, you'll need to type the following:
       elaine2> setenv DISPLAY elaine2:25 
       elaine2> mwm& 
       elaine2> xterm& 
    
    and up will pop an xterm window on the client side. Depending on how your configuration files are setup, you may only need to do the setenv portion of the above commands. You can then do whatever it is you do on Unix, with very few exceptions.
  • When you are all done, you need to close your client. You should also be a good citizen and stop the server, lest it run forever. You do this by typing
       vncserver -kill :25
    
    or whatever virtual graphics port you were given when you started the server in the first place. For more documentation on vnc, visit the RealVNC website.

  • Jawad Nasrullah / scpdta@ee.stanford.edu
    Last modified: Thu Apr 1 2004