SCI Secure Internal - Secure Content, Admin Tools, Facility and IT Documentation

Working Environments and Software Configuration

Remote Desktop


If your desktop computer is Linux distribution, the best software as I know for remote desktop is NX. To connect to your SCI's desktop computer from your home computer To install NX on server machine, first download Free NX's rpm package (for opensuse, deb package for ubuntu) from the NX's download page. You need to download all three packages: client, node and server. The NX webpage seems to require that you install client first, then node, and last the server package. The command for installing (on Opensuse) is:

# sudo rpm -i nxclient-3.4.0-7.i386.rpm
# sudo rpm -i nxnode-3.4.0-16.i386.rpm
# sudo rpm -i nxserver-3.4.0-17.i386.rpm

After install, nxserver should be active on your server machine. If not sure, you can run #/usr/NX/bin/nxserver --restart to restart the server session. 

Then on your home computer, install nxclient package depending the home computer is Linux or Windows. After that you can run NXconnection Wizard. Choose unix->gnome and 'available area' in the wizard. By doing this, the NX window area will change with your client's window size. You can also choose 'shadow' instead of 'unix',  and you'll get the same physical window that you use in front of the server machine. ( I don't like this because usually my home computer has different screen resolution with server machine, which makes the NX window ugly).

You can also choose 'KDE' in the NX client's wizzard, but as I know, gnome is better for NX's remote session. Another choice is windows maker, which is a windows manager instead of a desktop invironment. To use it, first install 'wmaker' package (either from opensuse's software repository or run "zypper install wmaker"), then in NX's client wizzard, choose 'custom' instead of 'gnome'. Click 'setting', and in 'running the following command', put 'wmaker'. 

Then you can connect to server machine by running nxclient. After you are done using it, choose 'disconnect' to close the client but keep the session on the server machine active. By this, you can running jobs in the NX session without worry about jobs being killed (similar to 'nohup' option on command line). To kill the server process when you finish the  work on remote machine, choose 'terminate'. 


There is always more that one way to do things. In case NX doesn't work for you, you can set up vnc for remote access. VNC is a standard protocol, and there are various remote access software under Linux that uses VNC. Users can install vnc server and client under Opensuse by running

# sudo zypper install tightvnc

This will install vncserver, vncviewer and vncpasswd command under /usr/bin/ directory.

Latex Package and Editor

Install latex on Opensuse

If SCI support installed Opensuse on your desktop computer, most probably the Latex system is already installed. If not, the package name is "texlive", texlive-bin", "texlive-bin-latex", "texlive-latex". Other packages may include "texlive-fonts-extra", and newer "texlive-bin-xetex", and "texlive-xetex". Just go to Yast->Software Manager and choose these packages.

Latex Editor

(1) Kile is the default editor under KDE for Latex's .tex file. (2) You can also write Latex document in Emacs by using AucTex package. AucTex is installed in most Linux system by default. The name of the package is probably emacs-auctex.

Use Emacs

Emacs with R

Emacs Speaks Statistics (ESS) is an add-on package for emacs text editors such as GNU Emacs and XEmacs. It is designed to support editing of scripts and interaction with various statistical analysis programs such as R, S-Plus, SAS, Stata and JAGS.

Emacs with Matlab

If you don't like Matlab's default editor, you can download a matlab-emacs.el file from here and use Emacs for editing Matlab code. One disadvantage of Emacs is that it does not support debugging mode. 

Matlab license

As of 2011 there are 20 Matlab license in SCI network. The 20 licenses are shared among all students and faculties so Matlab users should release their licenses after finishing their work so other people can use it.

There are two versions of Matlab. One is older version at /usr/sci/Linux/matlab/bin/matlab , the other one is newer version at /usr/sci/apps/Linux64/matlab7.11/bin/matlab. To saving time typing full path each time, put "export PATH=/usr/sci/Linux/matlab/bin/:${PATH}" (without quote) in your hidden .bash_profile file under your home directory (/home/sci/username). This takes effect only after you run "source ~/.bash_profile" or reboot. Then just type "matlab" you will enter matlab system.

There is a command "lmstat" to check the current license usage. The command is at "/usr/sci/Linux/matlab/etc/", so you can also put "export PATH=/usr/sci/Linux/matlab/etc/:${PATH}" in .bash_profile. And run "lmstat -a" to make sure you release the license.

SCI network also has a few Matlab toolbox (image toolbox is one used most time). The toolbox license is separate from Matlab license, and there are only a few licenses (two, for now) for each toolbox. Note that each time you use some functions in the toolbox, you will take one license. The license is not release until you close the main Matlab session. So if you want to release the toolbox but still want to work in Matlab, you can shutdown Matlab and open it again to release it. Again use "lmstat -a" to check if you release it successfully.

Multiple Matlab sessions in same machine only count as one license. So feel free to open more session on machines like Kraken or uv.

Take Screen Snapshot

ksnapshot is my favorite tool to get screenshot. If you haven't installed it, you can do so by "sudo zypper install ksnapshot" in Opensuse.

SCI's File System

SCI has a floating account strategy. Each user has an account, and a central file server which saves the account information. Once you log into the Opensuse, the system connects to the central server by NIS/NFS/LDAP and check if your usrname/passwd is valid. Sometimes if there is connection problem on the network, you can not log into the system. Or even you can, some operations (copy file etc.) are extremely slow. So whenever you have similar problems, the first thing to check is if other people are experiencing the same problem.

/home/sci/usrname is the home directory of each user. Do not save huge files (> 1G) in this directory if the files are not important. Instead save them in your local directory like /scratch/usrname. If you have some private files that do not want other people's read permission, do not save them under /scratch, because by default this can be read by any user that logs into your machine. Create a usrname directory under /scratch and save private file in this folder.

But if you want to run your program on other machine (uv, tesla clusters) you may want to save the data files in /home/sci/usrname, because your program can not access /scratch on your machine. If you have lots of huge files and want to save them to SCI network, there is /usr/sci/scratch for you to use.

How to keep job running on remove server even my client termial is disconnected?

The gnu screen tool is best for that. Suppose you run a job by remotely ssh to  kraken from your home pc. The job would be killed if the home pc is disconnected from the server. In such case, use 'screen' command.

(1) First ssh to kraken

# ssh This email address is being protected from spambots. You need JavaScript enabled to view it.

run the screen command

# screen -S myscreen1

This will create a screen session with name 'myscreen1'. Usually you only need one screen session on a server. But in case you need more than one, the screen session name helps to tell which one you're using. 

(2) Now you are *in*  the screen. use ctrl-a " to look at the list of terminals, use ctrl-a c to create new terminal, and use ctrl-a A to rename terminal. Usually I rename the first terminal as 'top', which means I will use it to show 'top' results all the time. I name the second terminal as 'build', as I  often change my code and build binary files on this server. I can creat as many terminals as I like, and run my jobs in it.

(3) Once the jobs are running, use ctrl-a d to detach from screen session. Even you don't detach, the disconnection of your home network doesn't matter. your jobs are still running in their terminals, which reside in screen session. 

(4) When you want to look at the outputs, first ssh to the server, then use screen -r to reattach the screen. If you have multiple screen sessions active (which is seldom necessary), use screen -r myscreenname to reattach one of the sessions.

A quick reference of gnu screen is here.