Here is the a video to show the whole thing working.

This document describes how to access the IMADA Computer Lab via VNC. Please note, that this is for convenience only, you can always login via ssh and have several shells running. Furthermore, it is also acceptable to use UML on your own machine, but this might due to many reasons just not be possible. Therefore this document is for students that want the convenience of a graphical interface while being at home. On the Computer Lab I had to install fvwm3 and a TigerVNC server on the Computer Lab (as non-root user, so you could also do it). You won’t have to do that if you set your PATH variable in the Computer Lab accordingly (see below). In case of technical issues, please note, that I experienced the below setup to be the most stable, but I cannot guarantee or help if you are using, e.g., a different VNC client (I already spend far too much time ). Nevertheless, I wanted to share my experience:

  1. On your home machine, make an entry in $HOME/.ssh/config to being able to directly connect to a Computer Lab machine of your choice. This might of course change depending on which OS you work. For you as a student the entry should looks similar to:
    Host unilab
      User          "sdu\jogul16"
      HostName      imada-106330.imada.sdu.dk
      ProxyCommand  ssh "SDU\jogul16"@logon.sdu.dk nc %h %p 2> /dev/null
    
  2. Make an ssh connection to a terminal room machine, and use port tunneling on port 5901 (if someone else uses port 5901 on the same Computer Lab machine, you will have to change this number accordingly).
    ssh -L5901:127.0.0.1:5901 unilab
    

    You might be asked for your password twice, as you first login to the jumphost, and then to the Computer Lab machine by that.

  3. On the Computer Lab machine, you need to change the PATHand the LANG environment variable. Do so by adding
    export PATH=/mnt/Shared/daniel/bin:$PATH
    export LANG=en_US.UTF-8
    

    to the file $HOME/.profile. You either need to re-login now, or execute both export commands also in the shell on the Computer lab machine.

  4. On the Computer Lab machine, you need to create a directory for the vnc configuration file
    mkdir $HOME/.vnc/
    

    and in there, create the file $HOME/.vnc/xstartup with the following content:

    #!/bin/sh
    xterm &
    xterm &
    /mnt/Shared/daniel/bin/fvwm3
    
  5. Make xstartup executable:
    chmod 700 $HOME/.vnc/xstartup
    
  6. On the Computer Lab machine, you need to create the file $HOME/.fvwm/config. Copy it from the fvwm3 installation via the commands
    cd $HOME
    mkdir $HOME/.fvwm
    cp /mnt/Shared/daniel/share/fvwm3/default-config/config $HOME/.fvwm
    
  7. On the Computer Lab machine, start a vncserver with the command
    vncserver -geometry 1000x600
    

    The output should look similar to

    daniel@imada-106334:~$ vncserver -geometry 1000x600
    New 'imada-106334:1 (daniel)' desktop is imada-106334:1
    Starting applications specified in /home/daniel/.vnc/xstartup
    Log file is /home/daniel/.vnc/imada-106334:1.log
    

    This means, you now have a VNC server running on port 5901 (VNC servers start by default at port 5901, the “:1” above indicates it’s the first VNC server on this machine).

  8. Finally, use a VNC client to connect from your home machine locally via the ssh tunnel to the Desktop in the Computer Lab. I personally use TigerVNC on MAC, I switch off encryption, and thereby I can see the remote desktop.

Have in mind, that the VNC server will remain running until the machine is re-booted (which, due to obvious reasons, happens not by accident theses days). It will therefore be possible to easily reconnect, unless IT decides to reboot the machines.