This article deals with the usage of the VNC-Server TigerVNC on our Linux Computers and how to access the service via Windows and Linux.
First one has to obtain the VNC client. The client software can be freely downloaded from:
Connecting with SSH
Before you may use the vnc server on a linux host you need to connect via ssh.
Due to security reasons the pool computers are not directly available for ssh connections over the internet. Therefore it is nessesary to establish a SSH tunnel connection useing our login server Zeus. An easy way of doing SSH connections is useing putty. If you are useing Linux it is recomended to use the standard open ssh Client.
To work with VNC you will have to tunnel your connection via ssh. Therefore you need to create a ssh tunnel. How to create ssh tunnels refer to: SSH tunnels to a SGN linux host
SSH Client installation
Using Windows as an operating system makes it nessesary to employ third party SSH software. This tutorial uses Putty. Putty for Windows is a stand alone single "exe" application, available at the following location:
The latest release version ... →
For Windows 95, 98, ME, NT, 2000, XP and Vista on Intel x86 →
To use PuTTY no further installation process is required.
Windows: SSH connections using Putty
To get started please open:
After launching the application, one should customize the configuration.
Configure putty to connect to the SGN login server:
Save the configuration, for further usage.
The next step is to configure a SSH tunnel to one of the pool PCs. For a list of available computers refer to: The List of available pool computers
This tunnel is needed so that the VNC connection can forwarded from a local port on your VNC client machine to the VNC server (some pool PC).
To create the SSH tunnel the port that the VNC server is listening on should be known. Refer to the section "How to start the vnc server", to start a VNC server on a pool PC and set the port on wich your server is supposed to listen. For the next example lets assume a VNC server is listening on port 5901 and has been started on ballade.informatik.uni-bonn.de.
To create a SSH tunnel, using the menu on the left of the application navigate to:
Save tunnel settings and open connection
Linux: SSH connections using OpenSSH
To create a tunnel from the local computer to a remote Server, execute the following command:
ssh email@example.com -L localport:poolComputer:remotePort
ssh firstname.lastname@example.org -L 55901:ballade.informatik.uni-bonn.de:5901
The following commands have to be invoked on the computer which is supposed to provide the VNC server service. Therefore one has to establish an ssh connection to the corresponding computer. If for example an VNC server service is supposed to be started on ballade.informatik.uni-bonn.de, you may connect via zeus:
It is recomended to start a seperate ssh connection instance to connect to a pool PC via zeus, beacause you may only do the ssh tunnel setup for vnc after you know the port number of your vnc server. How to obtain the portnumber is discribed below.
Checking for running instances
This is done on the pool PC that is supposed to be the VNC server. To check for already running instances of the vnc server one may execute the following command:
# ps ax | grep vnc | grep -v grep
Use the "grep" command to show vnc processes of a specific user:
# ps ax | grep vnc | grep -v grep | grep someusername
27431 pts/1 S 0:00 Xvnc :1 -PasswordFile /home/stud/SomeUser/.vnc/passwd -auth /home/stud/SomeUser/.Xauthority -desktop ballade:1 (SomeUser) -pn -UserPasswdVerifier VncAuth -fp unix/:7100,built-ins,/usr/share/vnc/fonts -co /usr/share/X11/rgb.txt -geometry 1024x768
where 27431 is the number (pid) of the process, the process is listed with its arguments.
How to set the password
Connecting to the vnc service requires a password. To set the password use:
Chooseing the window manager
Before starting the VNC server one should choose a window manager. To switch the window manager, use the following command:
# switchdesk SomeWindowManager
Valid window managers are KDE, GNOME, XFCE, FVWM or WindowMaker.
Starting the VNC server
Start the VNC server by invokeing the following command:
# vncserver -geometry 1024x768
It is recomended to adjust the desktop resolution, useing the "-geometry" paramter. The VNC server will automatically chosse a free display number. The Display number is the offset to the VNC standard port 5900. If the server is running on display 1, the portnumber is 5901.
The following output may be presented:
New 'ballade.informatik.uni-bonn.de:1 (someuser)' desktop is ballade.informatik.uni-bonn.de:1 Starting applications specified in /home/stud/someuser/.vnc/xstartup Log file is /home/stud/someuser/.vnc/ballade.informatik.uni-bonn.de:1.log
It is also possible to set the display number manually by adding the parameter for Example " :42" to set the display Number to 42 (Port 5942). If the coresponding display is alreay in use the server server will report an error.
Available Pool Computers
(for example the FQDN of FX100-ballade is ballade.informatik.uni-bonn.de )