This page explains how to work remotely on any DICE machine by using VNC and ssh.

There are official instructions for doing this, so you should first try to follow those instead.

Viewing your DICE desktop outside of inf.ed.ac.uk

  1. If you haven't already, enable remote desktop on your DICE machine: System > Preferences > Remote Desktop; select all options except Ask you for confirmation.
  2. Enter the following command on your home computer, replacing dicemachine with your DICE computer's name, diceuser with your DICE login, and N - twice - with a number bigger than 1024 (*1):
    ssh -t -L 5900:localhost:N diceuser@ssh.inf.ed.ac.uk ssh -t -L N:localhost:5900 dicemachine
  3. On your home computer, run vncviewer localhost:5900 (*2).

(*1) Note that it has to be the same number both times, and it has to be a number that nobody else is using on ssh.inf.ed.ac.uk
(*2) If you already have a vnc server running on your home machine, you'll probably need to choose a port other than 5900 on which to display your DICE desktop; you should adjust the command in step 2 accordingly.

Viewing any DICE machine's desktop outside of inf.ed.ac.uk

You can create a DICE desktop on any DICE machine (even ones with no physical display, e.g. jupiter1).

Initial setup

These steps only need to be taken once.

  1. Set up DICE so that your normal window manager will be used for vnc. Using any DICE machine, uncomment these lines in your ~/.vnc/xstartup file:
unset SESSION_MANAGER
exec /etc/X11/xinit/xinitrc
(It's also a good idea to add xsetroot -solid black as one of the last things in the file so that the background image isn't transmitted.)
  1. Next, you have to deal with AFS. Give anyone in the whole world read (but not write) access to your vnc directory: $ fs setacl ~/.vnc/ system:anyuser rl (from any DICE machine).
  2. Allow anyone in the world to list what is in your home directory: $ fs setacl ~ system:anyuser l (this is permission to list - not view, change, or run).

Start vncserver

This step only needs to be done occasionally (e.g. if the DICE machine is rebooted).

Pick the DICE machine you want to have the desktop on, e.g. jupiter1. ssh to jupiter1 ( ssh jupiter1) and type vncserver (you can specify the desktop size by using geometry, e.g. vncserver -geometry 1024x768). Note the desktop number D that you're given. You can exit this ssh session.

View the desktop

These steps are the ones you must take each time you want to see the DICE desktop you just created:

  1. On your home machine, enter the following command: ssh -t -L 590D:localhost:N diceuser@sshREMOVE_THIS.inf.ed.ac.uk ssh -t -L N:localhost:590D jupiter1 (replace D, N, diceuser, and jupiter1 as appropriate; D and N are described in the section above). (*1)
  2. On your home machine, enter vncviewer localhost:D
  3. Depending on your vncviewer, one special key will set "fullscreen mode" (typically that key is F8). In fullscreen mode, you should get the same experience as if you were sitting in front of the machine, assuming you have set the geometry to match that of your display. All key presses will be sent to the remote machine (except for the special key, which you need to remember or else you will have trouble exiting the viewer!).

(*1) If you're already running a vnc server on your home machine, you'll need to choose a different value for the first D, and also use that value in step 2.

Reconnection

You should be able to repeat the viewing commands any time in the future (assuming the host machine has not been rebooted since you created the vncserver). Note that having the screen saver enabled is useful (as for your own DICE machine; when you enter your password to unlock the screen, your credentials will be renewed for you).

Slow connections

If you are working over a slow connection, you can try several things to speed up VNC:

  1. Reduce the number of colors. Different VNC clients have different options (e.g. nColors, LowColourLevel, -AutoSelect) so check your client's help.
  2. Try a different VNC compression method. Again, different VNC clients have different options (e.g. PreferredEncoding, encodings, compresslevel, quality).
  3. Try a better vnc client (e.g. TightVNC ).
Topic revision: r8 - 15 Dec 2011 - 11:14:27 - ChrisBall
This wiki is out of date. Please use computing.help.inf.ed.ac.uk.
 
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
This Wiki uses Cookies