Breadcrumb Links:

Running VNCServer (Provides GUI Interface)

Using VNC

VNC, which stands for Virtual Network Connection, allows one to remotely control another computer from a remote computer through a network connection.  This provides you with a graphical interface into the HPC system, which is required when using GUI based applications, such as Mathematica, Matlab or Comsol.

To use VNC, you will be required to do two things:

  1. Start a vncserver on one of the login nodes (isaac or newton);

  2. Create a SSH tunnel – which provides an encrypted tunnel for the VNC traffic for security purposes.

Starting a VNC Server

By default, a vncserver will not be running for any user, therefore, if you require a graphical interface into the HPC system, you will need to run your own vncserver to connect to.

Simply execute the command:

vncserver -geometry 1280x1024


Take note of the number that appears after the word [login node name], as this will be your VNC session (display) number.  In the example above, the display number is 3.  If  the login/head node is restarted, you will be required to run vncserver again, as it will be most likely that your display number will change. 

Additionally, you can change the geometry size to any resolution you would like, for example, you might like to use the geometry 1024 x 768.

First time running VNC Server

If running this for the first time, you will be requested to submit a password. This will be the password required to connect to the VNC session and can be different to your

Once you have run the vncserver, you may wish to edit your ~/.vnc/xstartup file so that it looks like:

#!/bin/sh

xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
export -n PROFILEREAD
exec gnome-session &

 

This will provide you with a better GUI interface (KDE) as well as importing your profile so all the paths are set correctly.

If you make changes to your xstartup file, you will need to restart the vncserver session.  This is done by:

  • Killing the current session.  This can be done by executing the command

vncserver -kill :[display number]

  • The starting vncserver again:

vncserver -geometry 1280x1024

Note: You only need to ever have one vncserver running, therefore, you should only have to run the command "vncserver" once.  Unless the server "einstein" is rebooted, therefore requiring you to restart a new vncsession.

Creating a SSH Tunnel

It should be noted that VNC has some security risks, in which usernames and passwords are sent over the network as “clear text”.  Therefore, if anyone is using various network tools, it is simple possible to obtain password and therefore allow unauthorised access.  As a preventive method, it is highly recommended that a SSH Tunnel be created, which create an encrypted pipeline and hence making things secure.

To create an ssh tunnel, the following instructions are provided to assist (On your computer accessing the HPC system):

  • Under session, enter the following details:
    • Host Name: isaac or newton
    • Select SSH
    • Give the session a name under Saved Sessions (as a suggestion, call it isaac-vnc or newton-vnc)

 

  • Under: Connection / SSH / Tunnels
    • Enter Source Port: this number will be 59[##]
    • Enter Destination: localhost: 59[##]

Note:  [##] indicates the display number.  Example, if the VNC display number is 3, the source number would be 5903

 

  • Click Add

  • Click on session again and save it.

Connecting to the HPC System

Now the settings are saved, you should be able use the saved session (einstein-vnc as suggested) to provide a tunnel.

  • Now launch (Open) your PuTTY session and log on to isaac or newton (HPC Login nodes).
  • Launch your VNC Viewer and enter localhost:[##] as the VNC Server.


 

Your SSH session will now forward all your vnc traffic to the login node. You should get prompted for the VNC Password, which was configured (and changeable via vncpasswd) on the HPC system.

You should now be connected to the HPC System via VNC.