Department of Engineering

IT Services

Customising (Unix)

The Teaching System has been customised to make things easy for new users without obstructing those who are experts. For many people, the defaults will be fine, but you may wish to set some preferences to make common tasks easier, or to make text easier to read. Some programs have built-in preferences menus, but many don't, and it's not always obvious which program has to be customised, let alone how the customisation can be done. This page tries to list the various methods.

You can customise the system at various levels. Here we shall go from the general to the specific.

Typing or Clicking?

  • The Command Line - Some people like using a command line. Characters typed on the command line are understood by a "command line interpreter" program (otherwise known as a "shell"). There's a choice of shells. By default we use one called bash. Shells are very customisable, but you need to customise by writing little programs (called "shell scripts")

  • Graphical Interface - Most people interact with computers using mice and graphics. All our graphics use X windows, a way of doing graphics that has its own way of general or per-program configuring.

Some high-level programs tend to be customised using configuration files which you have to edit by hand. Like programs, they're hard to get right first time. So don't customise unless you need to, and you have enough time.

Command Line Interpreter (The "Shell")

When you log in, the file /etc/profile is executed, which runs /etc/bash.bashrc and then your .profile file if you have one. You'll find the Shell Scripts and Awk handout useful if you're going to configure the shell. Things you might do are

  • Change the PATH - Whenever you type a command (`date', say), the system looks in each directory mentioned in an environmental variable called PATH until it finds a program with that name. By adding directories to this list or changing their order (the directories are searched in order), you can save yourself some typing.
  • Create aliases - type alias to see what your current aliases are. Aliases are easy to create. If you type
               alias fortran="g77"
    
    then typing fortran will run the hard-to-remember fortran compiler. If you want this alias available each time you log in, create a text file called .profile in your home folder, and add the aliases to it.

X Windows

X windows applications can pick up their defaults from a variety of places. On our system, /usr/X11R6/lib/X11/Xresources sets up many defaults. Defaults can be set that affect all programs, one program or even particular types of buttons in programs. For example, if you'd like a big 12x24 pixel font in all your programs, you can create a file call .Xresources in your home directory containing the line

      *Font:  12x24
and run
xrdb -merge $HOME/.Xresources
See the X11 manual page for more details. Many application-specific Xdefault files are in the /usr/X11R6/lib/X11/app-defaults/ directory. For more information on X Customisation see

The Desktop

The Systems menu in the taskbar leads to a Preferences section giving access to many customisation options. The desktop can easily be customised too. Two useful features are

  • New Launchers on the desktop - to add a new icon to the desktop, click with the right mouse-button on the background to get a menu, and choose the Create Launcher ... option. You'll be able to choose the icon and what it does when clicked on. You can remove Launchers by putting them in the wastebasket. Full details on Launchers are in the Desktop Entry Specification
  • New Items in the Taskbar - if you click on an empty part of the strip at the bottom of the screen with the right mouse-button, you'll get an Add to Panel menu. This lets you add items such as
    • Workspace switcher - a way to switch between many desktops. First add it to the panel, then set its preferences (it defaults to a single desktop)
    • Menu Bar - a customisable menu

To see how to customise the flashier options, see the Compiz page.

Multi-program configuring

  • The desktop's Assistive Technology Preferences lets you control various options that may help if your eyes and fingers aren't very fast.
  • The "Gnome Configuration Editor "gconf is in the System section of the Application Browser and lets you configure many programs.

Saving your desktop set-up

Sometimes the system tries to remember what windows were open at log-out time so that it can restore windows on the next log-in. This facility can be turned on permanently in a Preferences menu, or done on a per-session basis on the log-out panel.

The info is recorded in ~/.gconfd/ (I think), in a file called saved_state.

Mailers

See our Using Mail User Agents page.

Other Programs

  • Mozilla Firefox - Our default web browser. See our Mozilla Firefox Customizing page.
  • emacs - Use the Options/Customize Emacs menu. The system default file is /usr/local/share/emacs/21.4/site-lisp/default.el. Users can have an .emacs file. For details, see the emacs handout
  • matlab - If startup.m exists on the MATLAB path (for instance in your matlab folder), matlab will read it on start-up. You can add configuration commands to the file.
  • Xwin32 - See our X-Win32 configuration page
  • bash - The system's configuration file is /etc/bash.bashrc. Users can have a ~/.profile file
  • Use defaultprinter to set the default printer, or alternatively use lpoptions from the command line. "lpoptions -d ljmr" for example will set the default to be the DPO printers.

Trouble-shooting

If the wrong program's being started when you click on a file (on the desktop or with Firefox) and you can't see why, you may wish to remove the desktop-related configuration files altogether and start afresh. Only do this if you don't mind reverting to the system defaults. The desktop (gnome) files are in the .local, .gconf, .gconfd, .gnome2 and .config folders in your home folder.