VNC configuration
VNC=‘Virtual Network Computing’, and is used by some in, eg, astronomy, to manage persistent sessions on remote machines. It's not a terribly sophisticated protocol, but its simple-mindedness makes it reasonably robust.
Although they do similar jobs, VNC is different from Windows Remote Desktop (which is used for access to some undergrad computing resources), and different from other remote desktop services such as Guacamole, used for some specialised purposes within the school.
We don't really support VNC as a school-level service, but it's used within some groups so it's useful to know a bit about it.
Concepts §
VNC uses ‘display numbers’ to designate the endpoints of VNC connections. You have to set up a server with a particular display number, and then connect from the client to that display number on the server. The examples below use display 9 for concreteness. You should not simply cut-and-paste these. Consult with your colleagues to be allocated such a server number on a particular machine.
This can be a bit confusing, since some software clients (see below) will refer to display ‘9’, for example, as just that; others will refer to it using the TCP port number 5909 (ie, the display number plus 5900).
Setting up (and passwords) §
For the sake of illustration, we'll talk below of connecting to
hercules.astro.gla.ac.uk
on ‘display number’ 9. As noted above, do
not simply cut and paste these examples.
Connect to the target machine using ssh. Then:
hercules% vncserver :9
hercules% vncpasswd
(or whatever port number has been agreed for you). This starts up a server, and sets the connection password for it. This password persists between invocations, so this might have to be done only occasionally.
Notes:
- the password is not stored securely, so don't use a valuable password! (the security of the connection is principally a consequence of you having to ssh in to the machine).
- this password has nothing to do with any other passwords, such as your GUID password.
This can later be killed by ssh-ing to the machine and:
hercules% vncserver -kill :9
but it's OK to leave this running for a while. From some people's point of view, keeping a session going for a while is part of the point of VNC, but if you don't need this, then it's tidy to shut your server down when you're finished.
Connecting §
Depending on the client, you may need to connect to it with the
machine name (eg, hercules.astro.gla.ac.uk
) and display number (eg,
9), or using a port number (eg, 5909). You might need to put in a
URI such as
vnc://hercules.astro.gla.ac.uk:5909
That should work when in the school, but will not work from home, and may not work when using the campus VPN (firewall issues).
To get in from outside the school, log in to the campus VPN, and then ssh to (eg) hercules with the special ssh command:
desktop% ssh -L 5909:localhost:5909 hercules.astro.gla.ac.uk
Then start up the VNC client on your local machine, pointing to localhost:5909
as the
server.
There are more intricate ways of getting in if for some reason you
can't use the VPN but are forced to ssh via login.astro
, which you
should generally avoid. If you are in this situation, consult your
local IT support staff.
Clients §
-
On macOS, the
Screen Sharing
application is built in, but invoked (non-obviously!) via the Finder, via Go » Connect to Server... and entering a server via a spec such asvnc://localhost:5909
. Alternatively, there is ‘Chicken of the VNC’, but that seems to be partly moribund as a project. -
Windows: It seems that the recommendations are VNC viewer (click on the Download button for the VNC Viewer for Windows exe; install only the ‘Viewer’, since you don't want the server running on port 5900). Or use TightVNC. I haven't actually used either of these.
-
On Linux, we don't have any positive recommendations, but there are some useful notes on the Ubuntu VNC wiki pages.
We'd be interested to hear of recommendations for good clients, based on your experience.