skip to content

Hung sessions, missing files or drives

You get the login prompt and your password works, but when you log in your session looks wrong, or hangs, or you can't access files or drives which you usually can. Or you are working happily for a while and then your session freezes or goes wrong.

These glitches can be very annoying, and should be reported to help@maths if they recur. However, isolated problems of this nature can sometimes be resolved without asking for help.

If you are very close to your quota, strange problems may occur because the computer cannot write files when it needs to. Check the quota applet to see if this is your problem, and see the quota page for information on cutting down.


First try rebooting

You can type reboot which will reboot the computer iff nobody else is using it. If this fails or is inconvenient, you may be able to sort out your session without a reboot.

Obtain a working text-based session

Check files and quota

Type ls. If it fails to show you your files, there is nothing you can do but reboot or ask for help.

If you can see your files, type quota. If you are over your quota, or very close to being over, many strange things can happen as the computer attempts to write to your home directory and finds it can't. Either delete some files or email help@maths for a quota increase.

More about quotas

Kill stuck processes

Now check whether your new text-based session is responding normally. If it is still very slow, the computer is probably "thrashing" i.e. so loaded up with jobs that it is spending all its time working out what to do next and not really achieving very much. Use the top command to check this. Look at the load average and see who is running jobs. If the jobs are not yours, email the user or help@maths (remember to give the name of the overloaded machine).

If your session is mostly OK but one particular window is hung, you can get rid of it by clicking in the top left corner and selecting "Close" from the menu which will appear.

If your whole session is hung, you need to kill the X window manager, which will be xfce4-session for most people. Type

ps uxwww | grep xfce4-session

The first number in the line of output is the process id or "PID" of the process. There may be an extra line for the "grep" command itself - ignore this. Type kill PID, replacing "PID" with the appropriate number, and if this fails then type kill -9 PID which is a more emphatic kill.


Clearing /tmp

Each Linux machine has its own directory called /tmp where programs keep their temporary files. Sometimes a program will act up because its temporary files have become corrupted. If e.g. Firefox or acroread is failing to work on your office computer but fine on the public computers, it is likely to be a /tmp issue.

CAUTION: do not attempt to clear /tmp completely when logged in on the console or via WineX. The "X server" needs some temporary files to work properly.

A safe way to clear /tmp is to log out completely, then log back in via ssh/putty or on a virtual console. Then type the following:

cd /tmp
rm -rf * .??*


Missing software, incorrect PATH

If your colleagues have no trouble running a program from the command line, but when you try it you get a "Command not found" error message, this means that your PATH has been set incorrectly. It is probably missing the directory /alt/bin where some central software is kept.

We recommend that you customise your PATH by adding to it rather than by creating a new PATH from scratch. /alt/bin should appear before system directories such as /usr/bin so that if the Ubuntu version of a program is too outdated, we can put a newer version in /alt/bin and it will be run automatically. The default PATH is:


The central login scripts are located at: /alt/ssetup/shellconfig/

You can reset your login shell to the defaults using shellreset which is in the default path, but if your path does not include that then you can run it as /alt/bin/shellreset. Then log out and back in.

If the icon or menu entry for your program is missing or fails to work, but you can run it from the command line, this is a problem with your graphical setup. Use to reset it to the Ubuntu default.

If your program is not installed at all, email help@maths. If we think it will be of general use we will install it, otherwise we will encourage you to install it yourself in the /alt/applic/user-maint directory.

Virtual Consoles

Often when a Linux computer's normal graphical desktop is completely broken, text-based logins are still working normally and are helpful for resolving the problem. If another computer is available you can log into the broken computer via ssh or putty. If not, you can switch to a text-based screen called a virtual console.

Press Ctrl-Alt-F1 on the broken computer and you should see a black screen with a login prompt. Once you have logged in here, you can run any Linux commands which don't use graphics. When you have finished, log out and press Alt-F7 to switch back to the graphical screen. Some problems are resolved just by switching to the virtual console and back again.

Note: On some versions of Linux the graphical session is on a different virtual console. If Ctrl-Alt-F1 fails then try Ctrl-Alt-F2 to switch to a virtual console and Alt-F1 to switch back. It's quite safe to play around with switching between virtual consoles. Just remember:

  • Ctrl-Alt-(function key) to switch from a graphical screen
  • Alt-(function key) to switch from a text screen