When you log in to the system, a series of initialization files are
used to set up the environment in the desired way. The three primary
initialization files are the .login, the .cshrc, and the
.xsession.
The .login file is used to set global environment variables such
as terminal type and is executed only once during the login process. .login
is called ONLY when logging in via a TTY device (non X windows device).
The .cshrc is the C-shell initialization; it is executed every
time a C-shell is created. Typically, the .cshrc declares directory
paths, aliases, default protection modes (via umask), and any other
environment variables that affect the operation of the shell.
The .xsession file is used to set up your initial screen under
X-windows. Programs to run, window placement, size, and color is specified in
.xsession before the last line of the file, which calls the
window manager (twm). The last command executed from your .xsession must
always be twm.
Note that the initialization files in your directory may be redirected
to an initialization file in another directory. For example, your
.login file may contain only the line:
source cos398/.login.student
This will execute the commands in the cos398/.login.student file. If you
wish to tailor your .login, do so after the source statement.
Please note: If you have a syntax error in either your .cshrc or .xsession,
when your login to an Xwindows based system, your keyboard lights will flash
and you will be logged out. You must then go login via a tty device and
correct the error in either file. If twm is not the last line of your
.xsession, you will also get this type of behaviour.