laptop - Methods

You are not allowed to do login on this page. Login and try again.

Clear message
location: laptop

Training laptops

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

Training User Accounts and Connections

XX – laptop number

  • Switch on the laptop and log in as:
  • Username: trainXXuser
  • Password: ******** (available from your trainer, JohanCarlin, OlafHauk, or IT)

For existing VNC sessions

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

  • Connect to it using a VNC viewer (e.g. TurboVNC is preferred but UltraVNC will do, too).
    • The server you need to connect to will be loginXX, if XX > 10, or XX+10 if XX<11. e.g. train01linux will have a vncserver on login11, train12linux will connect to login12.

    • If connecting to the login gpu nodes, 01-04 use login-gpu02, 05-08 use login-gpu03, 09-12 use login-gpu04, and 13-15 use login-gpu05
      • NB both schemes may be replaced soon with a simpler one. (14/02/18)
    • The VNC display number (sometimes called desktop number) should be 70+XX.
  • e.g for train02 - login12:52, for train13 - login13:63
  • Password: ******** (available from your trainer, Tibor, Olaf or IT)

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!

  • Username: trainXXlinux
  • Password: ********


  • To check for currently running servers, type:


  • showallvncs


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


  • vncstart


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
  • The materials specific with -d <> must be world-readable and -writable, e.g. located in /imaging/training/materials.

  • The script needs to be run as root or via sudo. OlafHauk, or IT have appropriate permissions.

  • The usual method of resetting all the accounts is (assuming sudo is needed and the script is in your PATH:

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

  • cdw: change directory for Workshop folder of the current user (/imaging/trainXXlinux/Workshop)

  • matlab: Launch Matlab R2012b (required for aa)

  • vncstart: Open the designated VNC server with the optimal resolution (N.B. vncserver is shadowed by an alias with the same name pointing to showallvncs to avoid "unwanted" VNC sessions. Would you even need to use vncserver, you can call it with its full path: /hpc-software/bin/vncserver)

  • vnckill: Close the designated VNC server


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

  • Switch on the laptop and log in as:
  • Username: trainXXuser
  • Password: ******** (available from your trainer, JohanCarlin, OlafHauk, or IT)


  • 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 (login01 to login22):

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!

  • Username: trainXXlinux
  • Password: ******** (available from your trainer, e.g. JohanCarlin, OlafHauk or IT) It may take a while to synchronise Materials (see below)


  • A VNC server should already be running for the training account. To check, type:


  • showallvncs


  • The output should show you that a vncserver is running on the login node that matches the number of username, e.g. train01linux will have a vncserver on login01, etc. The vnc desktop number should be 51 in all cases. If a vnc server is not already running, you can start one using:


  • vncstart


  • Once your VNC server is running, connect to it using a VNC viewer (e.g. TurboVNC is preferred but UltraVNC will do, too). The server you need to connect to will be running on the login node that matches the number in your username, e.g. train01linux will have a vncserver on login01, etc. The vnc desktop number should be 51 in all cases.
  • VNC server: loginXX:51 (e.g. login01:51 for train01 on login01, login08:51 for train08 on login08)
  • Password: ******** (available from your trainer, Tibor, Olaf or IT)

Central settings

  • /imaging/local/linux/config/train.login (executed during login via PuTTY)

  • /imaging/local/linux/config/train.chsrc (executed during opening a shell)

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

  • cdw: change directory for Workshop folder of the current user (/imaging/trainXXlinux/Workshop)

  • matlab: Launch Matlab R2012b (required for aa)

  • vncstart: Open the designated VNC server with the optimal resolution (N.B. vncserver is shadowed by an alias with the same name pointing to showallvncs to avoid "unwanted" VNC sessions. Would you even need to use vncserver, you can call it with its full path: /hpc-software/bin/vncserver)

  • vnckill: Close the designated VNC server

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).