FUNC:VNC

From Center for Cognitive Neuroscience
Jump to navigation Jump to search

Using the VNC

This information is largely borrowed from the Poldrack lab's excellent wiki section on the VNC. The VNC is extremely useful for 2 reasons: 1) it runs much faster than using X11 to login to func (even from home), and 2) it will continue to run jobs even if you are not logged in at the moment (ie you can set some analyses to run overnight, unplug your laptop, and return the next day to view the results).


What is VNC, and how can I use it?

VNC stands for "virtual network computer", and it provides a way for you to have graphics sessions that remain active even after you have logged out of a workstation. The reason that we encourage use of VNC is that is allows many more users to have ongoing jobs without tying up physical terminals. It is also much faster than using X-Windows over the network. You can find more information about VNC here. I would encourage all users to use VNC for analysis jobs instead of running them on a workstation terminal. However, because VNC does not take advantage of hardware OpenGL acceleration, some graphic programs may be rather slow or may not work at all on VNC, in which case you will need to use a workstation.

VNC has two parts. The VNC server is the program that runs on the analysis machine and that keeps your window session going regardless of whether you are actually logged in at the moment. You have to start the server on the machine that you want to use (e.g., funcserv1), as outlined below. The VNC client is a program that runs on whatever machine you are using to view the VNC window. VNC clients are available for linux, Mac OS 9/X, and Windoze. I like Chicken of the VNC, which you can download here: [1]

Every user has a unique VNC ID number that determines which VNC server you will log into; you don't need to know this number to start the server, but you will need it to use the client to view the window.

To start the server, log into the machine (or use X11 to log in) where you want to start it and type: startvnc

This will start a vnc server and will tell you which number to use - this number will always be the same, as it is based on your unix UID. The output should look something like this:

poldrack::willis:=>startvnc

Starting VNC Server :9

New 'X' desktop is willis:9

Starting applications specified in /space/raid/home/poldrack/.vnc/xstartup Log file is /space/raid/home/poldrack/.vnc/willis:9.log

In this case, your server would be started as #9. The first time you use VNC you will be asked for a VNC password - DO NOT use your login password, but use something else instead. Now, start your VNC client to log into the machine using server #9, and giving the password that you created for VNC (again, not your login password). Under 'connection' select 'new connection' which will ask for the host, display, and password information. For this example, because you are logged into willis and your server is #9, you would enter this:

Host: willis.psych.ucla.edu

Display: 9

Password: xxxxxxx

If you need to kill the server for some reason, run the script: killvnc

which will kill the appropriate server.

To find out which number your server is running on, type: whichvnc

The linux workstations in the FUNC have clients installed on them already; just type "vncviewer :x" at the command window, replacing "x" with your server number (don't forget the colon before the number).

If you log in remotely from home, you still need to connect using your VPN in order to login to FUNC using X11, then do everything else as specified above.