TerpConnect Login Session Initialization

Table of Contents

This page is based on MIT dotfiles from the Massachusetts Institute of Technology (MIT). It has been modified to reflect the TerpConnect computer system environment. These files should not be removed from your account unless you know what you are doing.

The following sections provide detailed descriptions about the files and programs associated with session initialization. Click the links for documents that go into further detail about particular files and programs.


Xlogin is the program that is running on a SUN workstation that is not in use. Xlogin is the program where you enter your username and password.

Xlogin provides many login functions. For a standard session Xlogin acquires Kerberos tickets and tokens, attaches the users home directory, adds the user to /etc/passwd and /etc/groups then sources ~/.xsession. After logout, Xlogin restarts and waits for the next user to login. Kerberos tickets and Andrew File System (AFS) tokens authenticate identity and allow access to lockers and files.


This file is located in your home directory. ~/.xsession and is a soft link to ~/.xinitrc. ~/.xinitrc verifies that /local/lib/init/xinitrc exists, then sources it. During logout procedures /local/lib/init/logout destroys the Kerberos tickets and prepares for the next user to log in. Then Xlogin regains control.


This file controls most of the login sequence as follows:

1. /local/lib/init/xinitrc checks for the file ~/.hushlogin. If that file exists, login status messages will not be displayed.
2. The XSESSION environment variable is set to indicate an X session as opposed to a terminal style session. This variable is used by later files to determine the proper login procedures.
3. Source ~/.cshrc
4. The X Windows system is configured through the /local/lib/init/.Xdefaults and ~/.Xdefaults files which are covered below.
5. Then a windowmanager is started. The default windowmanager is FVWM2, but it is possible to select another windowmanager.
6. Then /local/lib/init/xinitrc starts a selection of programs, all of which can be avoided through alterations to the .environment file.

Dash: The menu bar on the top of the screen.
Initial Xterm: A large xterm window.
X Start-up: zwgc (zephyr), motd (sends a zephyr announcing closings and other info), mail (checks for new mail).

7. The .startup.X file is sourced and files that are to be run at start-up are executed.
8. Finally the xinitrc file gets ready for the user to log out. When the user logs out, the .logout file is executed and control is then returned to the Xlogin.


~/.hushlogin suppresses messages from the login script. This means there will be less information presented in your console window. Information about the number of mail messages you have or other data that comes from outside sources will not be suppressed, but ~/.hushlogin will suppress "Starting initial xterm..." messages and other login status messages contained within the dotfiles designed to let you know how the login is progressing.

A word of caution, do not create this file until modifications to other dotfiles are completed. Status messages help you find where problems occur during login. This makes it much easier to fix any mistakes you might make.


This file simply calls the initialization file /local/lib/init/cshrc . If that file is not available for some reason ~/.cshrc sets a few variables.
The standard version of ~/.cshrc that is given to all new users is in /local/lib/skel/.cshrc
It is a bad idea to modify your ~/.cshrc file as you will not get updates made to the system-wide file at a later date. You should use the ~/.path,~/.aliases, ~/.environment and ~/.cshrc.mine files to modify settings and make customizations. Changing the ~/.cshrc file is not encouraged or supported.


This file is called by the ~/.cshrc. The /local/lib/init/cshrc is located in a central place so it can be updated for system changes.
This file sources a system-wide cshrc file, which:

- sets up standard environment variable
- sources user file ~/.environment, if it exists
- sets standard path, OR sources user file ~/.path, if it exists
- sets up standard cshell variables, aliases, etc.
- source user file ~/.cshrc.mine, if it exists
- source user file ~/.aliases, if it exists

The cshrc file sets the following shell variables:

umask 022
Sets the default file permissions such that only the user can read and write files created in this session

limit coredumpsize 0
     Keeps programs from dumping core files.
     Sets the default TerpConnect search path.
     glue_path=( /usr/local/scripts /usr/local/bin /usr/sbin /usr/bin /opt/SUNWspro/bin /usr/ccs/ bin /usr/ccs/lib /usr/ucb /usr/afsws/bin)
     Describes what directory to find the appropriate versions of programs for the type workstation you are using. set bindir=${hosttype}bin Each kind of workstation has its own bindir where binaries for programs are kept that will run on t that kind of workstation. For the suns the bindir is sun4bin
     Set your home directory
     Protects overwriting some kinds of files
     Sets the prompt in your xterm
     Sets the number of commands saved in history (think scrollbars)(default is 50)
The path searched for directory changes
     Then the following environment variables are set:
     Set what kind of terminal and key set to deal with
     tells where to look for manpages set manpath=/usr/local/man: /usr/afsws/man: /opt/SUNWspro/man: /usr/man: /usr/share/local/X11R6/man
     Set the default "home" directory.
     Set the default line editor to pico
     Set the default screen editor to pico
     Set the default search path for man pages
     Sets the default printer.

Sources ~/.environment to set user specified environment variables
Sources ~/.path to set a user specified path

The following aliases are set for your convenience:

Renews your Kerberos tickets (that expire in 25 hours).

changes the terminal setting

aliased to /usr/bin/mailx

aliased to alias

shows present working directory 

aliased to logout

If you have changed your .cshrc file and need a new copy of the file, enter  newdefaults at the prompt 
Finally your .cshrc.mine file is sourced to load user specified customizations and control is returned to /local/lib/init/xinitrc .


The ~/.environment file is a user created file that is used to set shell variables that control the session, and environment variables. A different windowmanager can be selected or standard start-up activities can be skipped. Printer options can be customized and default editor selections should be set here. All customizations made in this file are done only once a session and should be appropriate for both window and tty sessions.

This is a sample of ~/.environment.
# anything beginning with # will be ignored
      setenv WINDOW_MANAGER twm
      #set skip_xlogout
      #set skip_dash
      #set skip_initial_xterm
      #set skip_X_startup


The ~/.path file is a user created file that should be used if changes to the default path are desired. The ~/.path file contains a list of directory names (the command search path) where the shell knows to look for commands. The order of the directories determines where the shell will for the commands first. The only time the ~/.path file is needed is if other directories are going to be put before the default TerpConnect path.


This is a user created file where custom variables for the c-shell are set, aliases are created and other customizations specified. The only shell variables that should not go here are the ones that control the session (session controlling shell variables are located in ~/.environment because they need to be sourced earlier in the login process). Examples of these kinds of settings are " set skip_sgi ", and " set skip_dash &quot."

This is a sample of ~/.cshrc.mine.
     set prompt = "my prompt "
     set lineedit #enable use of line editing in the shell

     alias dir "ls -l" #see appendix on aliases for more examples
     set fignore = ( \~ )
     set cdpath = (~)
     source ~/.aliases #If you want a separate file for aliases this will
     #source them.