VNC First Time Setup Instructions

  1. The very first time you run VNC you have to set a VNC password and some display settings
  2. Since your home directory is visible on all the linux machines (except the clusters) you only need to setup VNC one time to be able to use it on any of the linux machines.
  3. login to a remote linux machine
  4. on the linux machine type the following command
    • vncserver
  5. you will be prompted for a password
  6. this is a new password that you will need for future vnc sessions
  7. Do not use the same password that you use on any other system

    • the vncpassword is stored in a weak mangled form and can be hacked so use a unique password that you don't use elsewhere.
  8. After you have created your VNC password you will see text similar to the following:
    • new 'moscow:1 (edb)' desktop is moscow:1
      Creating default startup script /home/edb/.vnc/xstartup
      Starting applications specified in /home/edb/.vnc/xstartup
      Log file is /home/edb/.vnc/moscow:1.log
  9. This message indicates that a VNC session has been created on the machine "moscow" on display ":1".
  10. The display number ":1", ":2", ":3", etc will be important when you connect via your client.
  11. Kill the display you just created:
    • vncserver -kill <display>
       - where <display> is the number provided when you ran vncserver
       - to kill the display from the above example:
       - vncserver -kill :1
  12. edit the file:
    • ~/.vnc/xstartup
  13. near the top of this file you will see the following lines:
    • # Uncomment the following two lines for normal desktop:
      # unset SESSION_MANAGER
      # exec /etc/X11/xinit/xinitrc
  14. uncomment the 2 lines indicated and save the file