**Working on the CUDA PC using SSH** The following has been tested on a client with Ubuntu 10.10 but should work on all *nix systems as well as Windows systems running Cygwin. *Connect via SSH* It is possible to connect to the CUDA PC using ssh by typing the following into the terminal: # ssh -C username@cuda-pc-ip Ask your supervisor for your username and IP address of the CUDA PC. This 'tutorial' does not cover X-Forwarding since all the important stuff can be done in the terminal (learn vim or emacs!). Once you're logged in, you should see the shell prompt of the CUDA PC. *Using screen* You could work at the shell prompt itself, but this would lead to dataloss in case of disconnects. The tool screen -- which is installed on the CUDA PC -- allows to create a shell inside the shell that persists even if you're disconnected. After a disconnect, logging in and reattaching to the screen shell is enough to resume work. This is particularly useful if you need to run a long process and you can't risk losing data. Not using screen would also mean that your processes are killed in the case of a disconnect. Start screen by typing: # screen You should see some information about screen and then the shell prompt again. To detach from the screen terminal and get back to the login shell, without loosing any data or killing processes within screen, just press C-a d. To reattach to the screen session, just type: # screen -r This automatically reattaches your terminal to the last screen session. This works even if the terminal emulator is closed on the client or if you are reconnecting hours later from another computer. Within screen, it is possible to create several sub terminals by typing C-a c. Press C-a w to show all sub terminals. You can switch by pressing C-a n (next), C-a p (previous) or C-a N (where N is a number from 0-9 that represents the window number). Pressing C-a C-a lets you switch between the current and the last window. To rename a sub terminal, just type C-a A and change the name. If you have not been detached properly (i.e. disconnect, closed terminal) you need to force detaching before reattaching by typing: # screen -DD -r If you prefer to connect to your screen terminal from several computers at once, start screen with the parameter -x: # screen -x Screen is very useful and should always be used when connected to a computer over ssh. Screen is much more powerful than shown here (just ask Google). *Problem with disconnects* If you experience regular disconnects after a few minutes/secons idle, you could try to add the following two lines to your '$HOME/.ssh/config' file: ServerAliveCountMax 3 ServerAliveInterval 10 If you don't have this file, just create it. *Running time-consuming processes* To allow other users to use the CUDA PC as well, the nice value of time-consuming processes should be changed to a higher value, thus granting other processes more CPU time. To change the nice value, you need the process ID (PID) of your process. You can use the tools top or ps for this, for example: # ps aux | grep yourprogrammsname Change the nice value of your program with this command: # renice -p PID -n INCREMENT where PID is the process ID of your process and INCREMENT defines how much the nice value is incremented. The nice value can range from -20 to 20, default is 0. Without superuser priviledges you can only increment and not decrement the nice values of your process.