SLAC ESD Software Engineering Group
Stanford Linear Accelerator Center

VNC Setup

SLAC Computing
Software Engineering


Set up a VNC connection from a offsite Windows to a SLAC Linux



Procedure to set up a vnc connection from a windows computer to a linux computer on the SLAC network, example uses iris01,

based on L. Piccoli's web site


    • login to iris01

      • Create password for vnc:

        • > vncpasswd
  • Protect password from everyone:
    • fs setacl ~/.vnc system:slac none
    • fs setacl ~/.vnc system:authuser none
  • Start vnc server to create xstartup file:
    • > vncserver -localhost -nolisten tcp -geometry 1440x900


    • > ~/bin/startvnc
      • remember 'display number' in the output
  • Kill server:
    • vncserver -kill :'display number'
  • Edit vnc xstartup file:
    • emacs ~/.vnc/xstartup
      • change last line from "twm" & to "startkde&", save and close
  • Start vnc server again for good:
    • >  vncserver -localhost -nolisten tcp -geometry 1440x900
      • Use any other different geometry if you like

Every time:

  • On Windows:
    • start putty, on configuration screen:
    • Enter host name:
    • SSH/Tunnels tab: Source port: 5902, Destination: localhost:5901
    • Open session, enter password


  • start putty command line tools, enter:
    • putty -ssh -L 5902:localhost:5901
    • enter password

Check if vnc server is running:

  • ps -fu 'your name' | grep -i vnc
  • If not, start server (see above)
    • Click on vnc-viewer desktop shortcut
    • Enter Server: localhost:5902, hit OK
    • Enter vnc password


[SLAC ESD Software Engineering Group][ SLAC Home Page]

Author: Jingchen

Modified: 16-Jul-2009