Information about `.login' and `.cshrc' files
Each time you login, Unix looks for a file named .login and executes any commands it finds in the file. Also, each time you start a new C shell, the system looks for a file named .cshrc and executes it.
All new accounts on the UW Technology Uniform Access computers have a .login file and a .cshrc file. The .login file includes a command to "source" (read and execute) a standard system login file. Similarly, the .cshrc file sources a standard .cshrc file.
Path Initialization
The contents of the PATH environmental variable determine which directories are searched (and the order they are searched) for commands. The PATH variable is initially set by a command in the standard login file.
To see the current value for PATH enter the command
printenv PATH
Note that "." (the current directory) is at the end of the standard path.
You can add other directories to the search path. For example, if you want to add your own binary directory ('/bin') to your searchpath, add the line
set path = (~/bin $path)
to your .cshrc file.
Terminal Initialization
Terminal type is one environmental variable set in the standard login file. The default type is vt100.
If you want to have a different default type, (for example, vt102), add the following line to the .login file before the "source /usr/local/lib/std.login" line:
if ("$TERM" == "unknown") setenv TERM "?vt102"
Note that the question mark causes it to prompt you to type in a terminal type with vt102 as the default. If you leave the question mark off it will just set the terminal type without prompting you.
To change the TERM setting during a session use the ts command. For example. if you wanted to change the TERM setting to vt102, use the following command:
ts vt102
Note that ts is an alias for the command tset with a specific set of arguments. The alias is defined in the standard .cshrc file.
For more on terminals and names, see `help termnames' and the UNIX Manual entries term(7), stty(1), tset(1), and termcap(5). The manual explanations can be seen online if you enter the following commands:
man term
man stty
man tset
man termcap
The final authority for the names of specific terminals is the file /etc/termcap.
Shell Prompt and Other Features
When you log in to a Unix host, your C shell prompt is hostname%. When you spawn a sub-shell, (for instance, you generate a shell escape from the editor) your prompt becomes _hostname%. This reminds you that you are no longer in your login shell.
To exit from a non-login shell (subshell), simply type a control-D. To exit from the login shell, however, you must type `logout.' (This prevents accidental logouts, which could occur if you were able to log out of your original shell using ctrl-D.)
