UT Physics Linux FAQ (Frequently Asked Questions -- And Answers!)

Table of Contents

Background on Linux

What is Linux?

Introduction to Using Linux

How do I log in?
How do I log out?
How can I get my disk quota raised?
Why can't I use CGI scripts on my web page?'

X Windows

How do I set the background color of my desktop?
Left-handed mouse buttons
How to I get the mouse wheel to work?
How to I get RealPlayer to work inside Netscape?
Mathematica says the fonts are not properly installed?
How do I cut/copy and paste between windows?

Using USB Flash Drives

Can I use USB-based storage devices in the grad lab?
How do I use my USB device in the lab?
Why does my USB device seem so slow?
What filesystems are supported on USB devices?

Using Other Removable Media

How do I access a cdrom disk?
How do I use the cd-rw drive?
How do I use DOS formatted ZIP or floppy disks?
How to I use unix formatted ZIP disks?
How can I copy a large file to floppies or ZIP disks

Tips and Tricks

Restoring the Windows MBR
Rebuilding the RPM database
Checking your disk usage
Emptying your browser cache to reduce disk usage
How to run jobs on multiple machines using a load-balancer

Background on Linux

Q: What is Linux?
A: Linux is a complete Unix-like operating system. It runs on a wide variety of hardware, supporting machines based on the following CPU types: Intel x86, Motorola 68k and PowerPC, Compaq Alpha, Sun Sparc, and MIPS. Probably the most unique characterisitc of Linux is that it is freely distributable, which means that the source code for the kernel and i most software connot be withheld from distribution. It does not mean that companies cannot charge for it.

There are many distributions of Linux available from different distributors or vendors. All distributions are based on the same common code base, but each has its own unique software, configuration, and look and feel. Linux is source compatible with Unix, and has a large collection of software of most every type available for it.

Linux is a multi-user and multi-tasking operating system. This means that the computer can be used by more than one user simultaneously, and that the computer can also run multiple programs simultaneously.

Introduction to Using Linux

Q: How do I log in?
A: To log in to a Linux machine, you must have a valid username and password. Linux will prompt you for your username and password, either with text prompts (for example if you are connecting via telnet or ssh) or via a graphics based login window (if you are sitting in front of the machine). For security reasons, the password will not be displayed on the screen when you enter it. Note that linux is case-sensitive -- it treats uppercase and lowercase letters different. Your username will always be all lowercase, and must be entered that way. Your password can contain either uppercase or lowercase characters.

Q: How do I log out?
A: If you are logged in with a non-graphical login (e.g. via telnet or ssh) use the command exit to log out. If you are using a graphical session, use the Log Out entry from the control panel task menu (usually located at the bottom-left of the control pannel).

Q: How can I get my disk quota raised?
A: Send a message to help@physics.utexas.edu explaining why you need the additional space, how much space you think that you will need, and how long you expect to need the space. You must specify a valid academic reason for the additional space, or you will not receive any increase. MP3 servers, backing up your home machine to your physics account, etc. are not valid reasons. Note that there is some temporary space available in /temp/username/ (where "username" should be replaced with your login name). You can put a large amount of data here, but be aware that all files left here will be deleted after three days.

Q: Why can't I use CGI scripts on my web page?'
A: Our web server is not equipped with sufficient resources to allow the execution of CGI scripts. Additionally, the administrative overhead of ensuring that all CGI scripts are safe for execution on the server is too great to justify such scripts.

X Windows

Q: How do I set the background color of my desktop?
A: You can set the background color with the xsetroot command, either from an interactive command line (e.g. xterm window) or from a X startup file (.xsession, .xinitrc, etc). For example, to set the background to be bright green, you might use:
xsetroot -solid green
You need to give an English color name for the background color you want. A list of available names (and their RGB values) can be found in the file /usr/X11R6/lib/X11/rgb.txt on the system.

Q: Left-handed mouse buttons
A: The easiest and most comprehensive way to change the order of the mouse buttons is with the xmodmap command. The following two commands set the mouse buttons for a left-hander, and reset it to the default (right-handed) state:

xmodmap -e "pointer = 3 2 1"
xmodmap -e "pointer = default"

Q: How to I get the mouse wheel to work?
A: Support for the Microsoft Intellimouse is enabled in our X Windows setup by default; however, you must configure a few extra options in your ~/.Xdefaults file in order to get it to work with some applications (such as Netscape). You can find the text to be added on the Colas Nahaboo X mouse wheel scroll page. Simply copy the text for the application program(s) you require, paste it into your ~/.XDefaults file, and the next time you log in to X Windows, you will be able to use the mouse wheel to scroll in your applications.

Q: How to I get RealPlayer to work inside Netscape?
A: Run the RealPlayer program (called realplay) and from the Help menu select Mime Type/Plugin Install.... This will install the reqiured plugins and mime-type files within your account and configure Netscape to use them.

Q: Mathematica says the fonts are not properly installed.
A: If you are running Mathematica via a remote X windows session, you need to use the xmathematica command rather than the mathematica command. This sets the default font server to tcp/linux2.ph.utexas.edu:7100 which will provide the needed fonts.

Q: How do I cut/copy and paste between windows?
A: Under X-windows, use your mouse. Highlight the text to be copied, switch to the location where you want to copy it, and press the middle mouse button to paste. This works nice and fast, as long as during the switching you do not deselect the original text. If your mouse has only two buttons (no middle button) use "both buttons together" or perhaps the right button (which combination works depends on your setup). Note that on a "wheel" mouse the wheel is the middle button.

Some GUI applications do support MS-Windows-style "cut-copy-paste." Select the text. Use the menu item "edit"->"copy". Switch to the location where to copy it to. Use the menu item "edit"->"paste". This will work for applications which use the same toolkit (e.g. KDE or GNOME) but does not yet work across toolkits (e.g. from a GNOME application to the KDE application).

As a keyboard shortcut for the last method you can highlight the text and then use <Ctrl><c> for copying or <Ctrl><x> for cutting and <Ctrl><v> for pasting. Text can be highlighted without the mouse by using <Ctrl><Shift><RightArrow>.

Mouse shortcuts also exist. Double clicking on a word will usually highlight that word. Triple clicking on a line will normally select the entire line.

You may also be able to use the cut-paste history application. Try running klipper (in X-terminal, KDE). We do not support these applications but you may find them useful.

Using USB Flash Drives

Q: Can I use USB-based storage devices in the grad lab?
A: It is generally possible to use modern, USB-based memory sticks under Linux; however, not all USB memory sticks will work on our systems. Most USB memory stick devices produced since 2003 will work, while older devices are less likely to be supported. In general, the older the device, the less chance that it will work. The only way to know for sure is to try to use it.

We do not provide any kind of card reader on any of the machines. Hence, we do not support non-USB-connector-based memory cards (such as those used by some cameras or other devices); however, some such cards have adapters that might allow them to be attached to standard USB ports. We do not support this hardware, but it has a good chance of working if it is relatively modern.

Other USB devices, such as USB-enabled cameras, iPods, and so on, have not been tested, but might work. Again, the only way to know is to try to use them and see what happens.

Q: How do I use my USB device in the lab?
A: Before inserting your USB memory stick, please log in to the machine directly (not via SSH from another system). Logging in at the console will ensure that the USB memory device is mounted with you as the owner.

It is safest to insert the device into one of the USB ports on the front of the computer (rather than those on the back or on the keyboard). Most low-power USB devices will work off of any of the USB ports, but some will not (for instance, they might require more power from the USB port than is available via the ports on the keyboard). Each lab machine has a pop-up door on the front of its case, which will expose two USB ports. These ports are electrically equipped to provide for any power rating of USB device.

Once you have inserted your USB memory device, it may take up to ten seconds for the device to be recognized and ready for use; please be patient, and do not remove the device while the system is mounting it.

If you are using the GNOME interface, it should automatically mount the USB device and place an icon on the desktop for you. This is the recommended way of mounting a USB device. Other interfaces such as KDE are more difficult to use.

The USB device should mount under the /media/ root directory on the machine. If you are using a termainl session, this is where you would start looking to find your device. If you are using a graphical file browser, you might have to prefix the path with "file://" or something similar; for example, from a web browser:
file:///media
(Note that there are three "/" slash characters.)

To remove the device, wait several seconds after the last access to the device (to ensure that all file operations are completed), and then unmount the device. In the GNOME session manager, you an right click on the icon it created and select unmount there. Then gently remove the device from the USB port.

Q: Why does my USB device seem so slow?
A: It might seem that the USB device is fairly slow, especially when writing to the device. This is for two reasons: Firstly, USB devices are substantially slower than hard drives or other high-speed media; furthermore, larger-capacity flash memory devices are often slower for write access than low-capacity devices. Secondly, we mount the device in "synchronous" mode, which makes writes seem slower than the more common "asynchronous" mode. We do this to ensure that the file system (files and directory information) are safely written to the device immediately, rather than caching (as is done on a hard drive), so that when you move the device, everything is much more likely to be in a consistent state. Removing an asynchronously mounted device while cached operations were pending would result in corrupted files and loss of data.

Q: What filesystems are supported on USB devices?
A: At this time, only Windows/DOS FAT (vfat, fat32) are supported. If there is sufficient interest, we could investigate adding Linux ext2/ext3 support. (Contact us if you want this support to be added.) We do not support NTFS (NT, XP), HFS+ (Mac OS), or other formats; do not your USB device using those filesystem formats if you plan to use it on the Linux lab machines.

Using Other Removable Media

Q: How do I access a cdrom disk?
A: The cdrom drives in our lab machines are setup to use the automounter. The automounter will automatically mount the drive for you when you access it, and unmount it when it is not being used.

The cdrom will be automatically mounted under /cdrom once you access that directory. You can use most normal Ext2fs (linux) file commands on the cdrom then. Since a cdrom is read-only, commands to write to the device will not work.

cd /cdrom
cp /cdrom/file.txt ~/file.txt
cd /temp/myspace ; tar -xf /cdrom/archive.tar

Q: How do I use the cd-rw drive?
A: The newer linux machines in the Graduate Computer Lab have cd-rw drives. See our cd burning help page for more information.

Q: How do I use DOS formatted ZIP or floppy disks?
A: See our mtools help page for information on accessing DOS disks on the Linux machines.

Q: How to I use unix formatted ZIP disks?
A: The ZIP drives in our lab machines are set up to use the automounter. The automounter will automatically mount the drive for you when you access it, and unmount it when it is not being used.

If you want to use Ext2fs (linux) formatted ZIP disks in the lab, make sure you create a filesystem on the disk in the lab before using it by typing:

/sbin/mke2fs /dev/zip
so that the ZIP disk is formatted with your user permissions. The ZIP disk will be automatically mounted under /zip once you access that directory. You can use any normal Ext2fs (linux) file commands on the ZIP drive.
cd /zip
cp ~/files.txt /zip
rm /zip/files.txt

Q: How can I copy a large file to floppies or ZIP disks
A: If you need to copy a file to a unix formatted floppy or ZIP disk, but the file is larger than the disk, you can use the -M flag of tar to copy it onto multiple disks. For example:

tar cvf /dev/fd0 -M my.big.file
tar cvf /dev/zip -M my.big.file

Tips and Tricks

Q: Restoring the Windows MBR
A: If you installed a Master Boot Record (MBR) via a recent version of lilo, it will have saved the old MBR. You can restore it via the following command (assuming /dev/hda is your boot hard disk):

lilo -u /dev/hda

You can also restore the default DOS MBR from MSDOS (version 5.0 or greater) using the DOS FDISK command as follows:

FDISK /MBR

Q: Rebuilding the RPM database
A: If your rpm database in /var/lib/rpm has become large (from adding and removing packages over time) you can compress it by rebuilding it with the following command:

rpm --rebuilddb

Q: Checking your disk usage
A: The easist way to determine how much space your files and directories are taking up is to use the following command:

du -sH * .[a-zA-Z]*
For a quick way to find the biggest ones, try:
du -sH * .[a-zA-Z]* | grep "[0-9]MB"
If you are getting "over quota" messages but do not know why, it is usually because of browser caches. Using one of the above commands will quickly reveal the culprit.

Q: Emptying your browser cache to reduce disk usage
A: Your web browser keeps a copy of almost every file that you have ever looked at, which can easily use up many megabytes of space and cause you to go over your disk space quota. To empty your cache, follow the following steps. (These are specifically written for the Mozilla browser, but the process is very similar for Netscape.)

  1. Select the "Preferences" item from the "Edit" menu.
  2. In the "Category" pane, click on the "+" next to "Advanced," and click on "Cache" in the expanded list of options.
  3. Click on the "Clear Disk Cache" button and it will clean up these files.
  4. You should also change the "Disk Cache" setting to something much smaller (perhaps 5 or 10 MB).
Of course, if you are already over quota, you cannot log into the graphical system. In this case, log in at a text console, go to the .netscape or .mozilla directory, and look around until you find a directory named "cache" or something similar. (The name and location may be different depending on the version used.) Delete the files (and directories) in this directory to delete the cache. (Then, once you can log in to the graphical interface again, to change the disk cache limit so it will not overflow your quota again.)

Q: How to run jobs on multiple machines using a load-balancer
A: You can use the ANTS software to run a job on a remote machine based on the CPU, memory, and/or time requirements of your application. For more details, see the ANTS information page.


This page was last updated on Thu Feb 14 12:37:31 CST 2008