The following steps show you how to set up your own persistent VNC server (i.e. remote desktop) which will run  on a computation server or a  VNC gateway.   When you are done with these steps, you will connect  to the server to start a computation job or access your math network files. 

Setup: starting up the VNC server

First you will create a VNC server (i.e. virtual desktop.) You can leave the VNC Server running for weeks or months. However, Please do not run multiple VNC servers on the same machine, or on multiple chivos.

  • Pick a VNC host.
    • For light work via VNC, we provide Phoenix (grads) and Dragon (faculty.)
    • For heavy computation, faculty can use their office desktops, grad students can use the chivos
  • Use SSH to connect to the VNC host. You will need to maintain either a Math VPN connection or a SSH Tunnel to the VNC host while using your vnc viewer.
    • For VNC via Math VPN ,
      • First connect to the MATH VPN
      • Then ssh to the machine (ssh to yourmathaccount@vnchost.math.arizona.edu) Replace vnchost with the machine you are connecting to (e.g. chivo, chivoX, yourdesktopname, dragon or phoenix.)
    • For VNC without Math VPN you will instead create an SSH session w/ Tunneling.
  • Use the command vncserver on the VNC host to create your remote desktop. The command will display the number of your new VNC server. EG: ":7", or ":13". You must remember that number! (Advanced users can specify additional options to vncserver. See the bottom of this page for information.)
  • Your remote desktop is now alive! You can use a VNC viewer to connect to your remote desktop.
  • You will be prompted to set a vnc password the first time you create a session. You will need to use this password every time you connect. If you ever forget this password, you can reset it.

How to reset your vnc password

Use ssh to connect to any networked linux machine (e.g.  phoenix, dragon or a chivo) and enter the command "vncpasswd." You will be prompted for a new password.

How to figure out your desktop number

If you've forgotten your desktop number, you can connect to the VNC host via ssh then issue the command:

ps -ef | grep vnc | grep myusername

How to permanently kill your remote desktop

To kill your remote desktops, first use SSH to connect to the VNC host, as described above. To kill a particular desktop, for example desktop number 7, use the command:

vncserver -kill :7

To kill all your desktops at once, use the command:

killall Xvnc4 

You can ignore any "Operation not permitted" error messages.

Advanced VNC Hints

  • The simpler the graphics on your desktop, the less information needs to be transferred, and the faster your VNC connection will be.
    • Change your desktop background color to a solid color. Use solid white or solid black.
    • Simplify your desktop theme to one that uses rectangular windows, and uses a solid color (as opposed to gradient shading) for controls, window titles, etc.
    • Turn off any graphics, like moving charts or eyeballs that follow the mouse cursor...
  • To make VNC it as fast as possible you can use a smaller desktop, and use fewer bits per pixel. For example: vncserver -depth 8 -geometry 800x600.
  • When you create your VNC server with the command vncserver, you can use a different resolution and/or color depth. You can match your vnc screen resolution to that of your home computer and run your VNC viewer in fullscreen mode.
    • For example, say your Windows box at home has a display resolution of 1280x1024 at 24 bits/pixel. (To see this information, right-click on the background of the desktop and bring up Properties.)
    • When you create your VNC server, you could use the command vncserver -depth 24 -geometry 1280x1024. (see "man vncserver" for more info.)
    • When you connect from your Windows box, right-click on the titlebar of the outermost VNC window and select "Full Screen". It will tell you the keystrokes to escape from full-screen mode.
    • At this point, instead of seeing Linux inside a VNC window inside Microsoft Windows, all you see in front of you is your remote Linux desktop!
  • Please disable the screensaver on your remote desktop. (Otherwise your virtual desktop will use too many CPU cycles "saving" a non-existent screen.) On our remote desktop gateways, the screensaver has already been disabled - but if you run a VNC server on some other computer, then the first time you connect to your remote desktop, disable your X screensaver (go to Start/Programs/Settings/Desktop/Screensaver).