Training laptops

General documentation on using the training laptops can be found on the intranet.

<<TableOfContents: execution failed [list index out of range] (see also the log)>>

Training User Accounts and Connections

XX – laptop number

For existing VNC sessions

For many classes, VNC sessions should already be running for each account. If this is the case:

To Create New VNC Sessions

* Use PuTTY to connect to one of the login nodes. You can use 'login' as the host name, or use the name of a specific login node (currently login11 - login26):

Host: On some of the laptops, gateway (gate.mrc-cbu.cam.ac.uk) may be set as default connection. Make sure, that you do not use it, because it is slower!




If a vnc server is not already running, you can start one using:



Connect as above, using the login node and display provided by the vncserver.

How to Configure The Environment

The preferred method for configuring the environment for the training accounts is the vnc_setup.py script (/imaging/local/linux/config/bin/vnc_setup.py).

vnc_setup.py --help
Usage:  vnc_setup.py [-V | -h | --help] [-d <directory>] [-g] [-s]  kill | clean | purge | passwd | startvnc | setupvnc | showvncs | synch
This script must be run with root privilege directly or via sudo.


        Major Operations are:
kill - find any running vnc sessions and kill them
clean - scrub pidfiles, log files, passwords from the .vnc directory
purge - kill and clean
passwd - copy standard passwords into each users account
startvnc - start a vncserver on the login node which matches the trainee number
         (or trainee number +10 for trainee 1-10 since login01-10 are unavailable)
        with a display of 50+trainee number
setupvnc - pass and startvnc
synch - synch materials to training account directories from the <directory> given with -d

        -V                       Print version
        -s                       Start all vncs on the node on which the script is run.
                                         Only valid with setupvnc or startvnc.
        -g                       Start all vncs on gpu node(s).
                                         Only valid with purge, setupvnc, or startvnc.
        -h                       Print short help.
        --help                   Print long help.
        -d <directory>           Source directory for synch.
                                 Only valid with synch, if absent will attemtp to find a file from
                                 /imaging/local/linux/config/train.login

sudo vnc_setup.py purge
sudo vnc_setup.py setupvnc
sudo vnc_setup.py -d <directory to be synced> synch

Note: The to-be-synched directory should only contain letters and numbers.

This should empty the training accounts' imaging spaces, kill old vncservers, start new ones, and rsync the source directory (which will recursively include subdirectories)into the imaging spaces.

Command-line shortcuts (aliases)

set in /imaging/local/linux/config/train.chsrc


Below this point is the old, deprecated method. (14/02/18)

Here, some more specific instructions about how to set up them for a hands-on session can be found:

Setup

XX – laptop number


Host: On some of the laptops, gateway (gate.mrc-cbu.cam.ac.uk) may be set as default connection. Make sure, that you do not use it, because it is slower!






Central settings

serve as central setting for all training account. If you want to add some settings (e.g. configuration for programs), you can do it here.

Command-line shortcuts (aliases)

set in /imaging/local/linux/config/train.chsrc

Materials

set in /imaging/local/linux/config/train.login

The Material folder (/imaging/trainXXlinux/Workshop/Material) is synchronized automatically with any folder of your choosing (I recommend using folder name Material to be consistent). The SOURCE folder can be set in /imaging/local/linux/config/train.login (line 1).

Preparation

You can synchronise your material from any VNC session (i.e. you don't need the physical laptop).

ssh trainXXlinux@loginXX will start the synchronisation (if enabled in train.login, see above).