Unix / X11 setup FAQ for Lynx / Cheetah


What are the .cshrc and .login files, anyway?

.cshrc is a script file that is executed immediately upon entry to every new shell (that is csh or tcsh shells) a user starts. Most users will benefit from knowing what is going on in the # PATH and # ENVIRONMENT sections of this file.

The environment variable PATH tells the shell where to look for executable commands and applications. Different types of applications in a large system need to be located in a lot of places, if a minimum of system overview is to be maintained.... If a new program system of some size is added, you will most likely need to include a new directory name in your PATH. Also, beware that the sequence of directories in PATH is important, since in some cases different versions of a program (or even entirely different ones) may reside under the same name on different directories. If you include a dot (".", meaning "this directory") in your PATH, it should be the last entry. Otherwise, you may end up executing any rubbish on any directory inadvertently as a command, if someone by mistake or out of malice left it there with the name of a command!

Many programs need general or special environment variables to be set appropriately before they can run. Most users should be happy with what they got initially. Again, however, in case of new programs a line may have to be added. There is also the variable PRINTER, which is used by ppr, and which you may want to set to the network printer closest to where you normally work.

Most users will want to customize their aliases. These provide a way to make commands that are long or awkward to remember easier, to include frequently used options in the command without having to specify them explicitely, and to execute multiple commands as a single one. The aliases in the .cshrc file you initially got should give a good idea as to how this works. You are by no means obliged to keep them the way they are. But generally, it is recommended that you add new aliases instead of changing existing ones, since this will ease getting assistance from other users or the sysop if you should need that.

.login is a script file that is executed when you login, or when you start a shell that is specified to be a "login shell", for instance with option "-ls" to xterm. The file runs after .cshrc. Most users should not need to modify this file.


Why don't these .whatever files show when I try to list out the contents of my home directory?

Most likely, you use % ls without the "-a" option. Try % dir, if you haven't changed this alias in your .cshrc file already.

If you use the graphical filemanager, there is an option to set whether this type of file should be included.


Why isn't the X-window and Unix setup when I use Lynx the way I want it?

What is to be considered a good setup depends on several factors: You must therefore be prepared to spend some time customizing your environment. It is quite easy (or even fun!) if you take the time to read and understand some of the fundamentals outlined below.


The files .xsession and .xmgr
In your home directory you have been issued with a file by the name ".xsession". It is a script run when you login on a device capable of running a window system (i.e. X-terminal or the console), and it determines what your screen will basically look like at the start of your session.

.xsession contains (as will be explained below) multiple sections, each with a number of lines that are executed as Unix shell commands, and starting one application per line, for instance "xterm" terminal windows. To see what the commands and the options associated with them are, you should consult the Unix man-pages (i.e. % man <application-name>). The coordinates following the "-geometry"-option determine the size of the application window and its position, <x-size>x<y-size><sign><x-position><sign><y-position>. The positions are relative to the left or upper edges of the screen if <sign> is positive, to the right or lower edges if <sign> is negative.

Not all monitors have the same resolution, and a window setup designed for one monitor may appear quite hopeless on another. Therefore, our version of .xsession has individual support for the four most frequently used display devices at our group, NCD X-terminals at 1280x1024 pixels, the Sun console at 1152x900, large PC screens (or TDV X-terminals) at 1024x768, and "small" screens at 768x400. When you edit .xsession, be sure that the lines you change are contained within the "if .. then .. else"-structure corresponding to the display you use.

The border thickness of the window manager has implications for the screen appearance. Therefore, there are two major "if .. then .. else"-structures (with all four monitor sizes in each), corresponding to whether you are using a window manager with "thick" borders (Motif or lookalike) or one with "thin" borders. See below. Again, be sure to edit in the right place.

Several window managers are available in .xsession to fit your individual preferences. Motif or fvwm is recommended, some use twm or OpenWindows. Further alternatives are AfterStep and fvwm95 (a MS Windows-95 lookalike). Managers other than these four are mainly included to offer backward compatibility to a few users. To tell the system which one you want, you use the .xmgr file. It contains one single line stating the name of your favorite window system, i.e. motif, fvwm, twm, openwindows, afterstep or win95.

CAUTION: A syntactical error in .xsession may cause the X login to abort! If this happens, you should already be logged in on a second X-device to be able to fix the problem. If not, you must either login from a "dumb" terminal and overwrite the faulty .xsession with a previous (good) one, or ask your sysop for assistance. In any case, double-check changes you make in this file.


The files .mwmrc and Mwm
If you use Motif, the files .mwmrc and Mwm are important to you.

.mwmrc specifies the window manager menus and mouse button functions. It is in this file you tell the system that if the left or right mouse buttons are pushed when the cursor is in "root space" (i.e. outside the application windows), the root menu appears. You also tell what applications you want to be available from the "pulldown" menus. It's easy to customize your own, personal menus!

Mwm specifies some additional preferences in Motif, like border colors and witdh, and menu colors. /home/lisa/Mwm is an attractive alternative to the default you got when your account was created. Or by all means, experiment yourself!


The file .fvwmrc
If you use fvwm, the file .fvwmrc sets up the same parameters as .mwmrc and Mwm in the example above, plus some more. Please refer to % man fvwm.


The .Xdefaults file
In this file you can specify preferences for most X programs, for instance colors. The entries are generally of form
<application-name>*<attribute>[*<sub-attribute(s)>]: <value>
Some general attributes are defined in X11 (see % man X), and valid for many (but not all) applications, others are application specific. Note that attributes specified on the command line (or in .xsession), such as for instance "-bg green", have precedence over the definitions in the .Xdefaults file.


Tools to customize X.
Programs xco and xplaces
When you want to set the color preferences, you may have some idea of what you want, but maybe not know it exactly. There are several hundred possible color names in X11. To see what they are and how they appear, you have the application xco. This gives a display where each (named) color is assigned a small rectangle with that color. However, many colors look different in practical use in contrast to each other and on larger areas than they do as small samples. If you point at a color and click the left mouse button, the text foreground turns to that color. If you point at another color and click the right button, the xco window background turns to that color.

Colors may also be specified as direct mixtures of the basic colors red, green and blue (RGB), where a hex number from 00 to ff specifies the intensity of each component. For instance, the option "-bg rgb:0f/4c/0f" or "-bg #0f4c0f" specifies the background to be set to a dark shade of green which has not been assigned a name.

If you start applications and shuffle/resize windows for a while to get a screen that appeals to you, you may want to reproduce this screen layout with .xsession at login. To assist with this, you have the application xplaces. It produces an output where each active application is listed together with their window and icon positions and colors, suitable for editing into your .xsession file.


All this sounds nice. But my .blabla files look only remotely like what you describe

In that case, you have probably had your account on Lynx for some time. You either have old versions, or you have copied files from other users or other computers. The current, basic versions of the files described in this FAQ can be found in the directory /home/wikne/sysop/user_init

But be sure to save any specialities you want to keep in your old files before you overwrite them.


There are two printers in the control room at the Cyclotron Lab, another outside room 308, plus several more in other places. How do I specify which one I want?

For the SparcPrinter (monochrome laser) in the lab, you use the command % lp <filename>.

For the HP color inkjet in the lab, you use the command % lpr -P hp890c <filename>.
NOTE: This printer accepts PostScript files (normally extensions are .ps or .eps) ONLY.

For the one outside 308, you use the command % ppr <filename>. This printer can run in duplex (print on both sides), use % pprx. If you want another (net connected) printer, use ppr -P<printername>, or change your environment variable PRINTER.


I want to set up a homepage on WWW. What are the facilities for this?

First, you have to find an introductory HTML reference. There is a printed copy of one (in Norwegian!) at the lab, and you can also try this.

We also have an interactive "WYSIWYG" HTML editing tool called phoenix (invoke by % phoenix &), but many people will find "plain" emacs better.

To see what icons, lines, symbols and other graphics stuff are available locally on Lynx for use with your page, click here.

Your homepage must be located in a subdirectory named www on your home directory, and the base document must be named index.html


Why are Lynx / Cheetah not fully integrated with the rest of the Department of Physics and UiO Unix world?

There are several reasons, the most important being: Some implications of this:

As few NFS mounts as possible are used. However, there is always a compromise with respect to functionality.

The user-registry is local (non-NIS, and kept identical on Lynx and Cheetah using special software). As far as possible the Unix UIDs and GIDs are the same as in the rest of domain uio. This means that you should be able to access the files on your account on "Tid" directly from Lynx / Cheetah, on the directory /tid/<your name on Tid>


Last update 04-04-2000 by Jon Wikne,