Virtual Network Computing
VNC allows you to connect to a Linux GUI running on a remote computer.
To use it, you need two parts:
- A VNC server running on the remote computer.
- A VNC client running on your local computer.
In some cases, you might need to create an SSH tunnel to allow connections that would otherwise be blocked by a wirewall.
PP Cluster Desktops
The cluster desktops have the TigerVNC client (and server) installed.
Connecting from computer A to computer B in the cluster has to jump through
eprexb
. Add the following to your ~/.ssh/config
file to automate this step.
Host epldt002
ProxyJump eprexb
Personal Computer
If connecting from a private computer (eg home), follow the UoB Remote Working: VPN instructions to setup a secure connections. Once connected, you can connect directly to any of the cluster computers.
There are plenty of VNC clients to chose from. Some examples:
- TigerVNC for Linux and Windows.
- MacOS comes with an built-in VNC client (eg
open vnc://server:5901
).
Starting and Connecting to a VNC Server
In the following instructions are for connecting from a PP cluster desktop
(eg epldt120
) to a host inside the PP cluster (eg epldt002
). Change the
host server to wherever you want to work on. For a personal computer, the
instructions are the same as long as you are connected to the UoB VPN.
Start a VNC server on the host computer by running the vncserver
command on
the host computer. Take a note of the display number it is started on. In the
example below, the display number is :1
.
^Ckkrizka@epldt120:~$ ssh epldt002 vncserver
New 'epldt002.ph.bham.ac.uk:1 (kkrizka)' desktop is epldt002.ph.bham.ac.uk:1
Starting applications specified in /home/kkrizka/.vnc/xstartup
Log file is /home/kkrizka/.vnc/epldt002.ph.bham.ac.uk:1.log
logout. Goodbye! Connect time: 3 seconds
Create an SSH tunnel between your desktop and the remote computer. The port is
5900+display number
.
ssh -L 5901:localhost:5901 epldt002
Connect to the server from your computer using the localhost as the server.
vncviewer localhost:1