# .login # # This file is executed once whenever you login to the machine, # *after* your .cshrc file. Use it to set up your terminal and do any # other "one time at login" setup. This one does the following: # # 1) Sets personal information like name and printer preference # 2) sets up the terminal # 3) prints out the "message of the day" and checks for e-mail # # See also the .cshrc file. # # Note: this file is not executed if you log into HP-UX using VUE. # See the .vueprofile file instead. # # Eric Myers Vassar College - Poughkeepsie, New York # @(#) $Revision: 4.2 $ + $Date: 2003/01/26 15:58:23 $ + $Author: myers $ ####################################################################### # @(#) 1) Personal/Custom information: setenv NAME "$USER" setenv ORGANIZATION "Vassar College Department of Physics and Astronomy" # On BSD Unix the printer is selected by PRINTER (eg. SunOS, NeXT, Linux) # (But Solaris may also use BSD printing) setenv PRINTER office # On SYSV Unix the printer is selected by LPDEST (e.g. HP-UX) setenv LPDEST office ####################################################################### # @(#) 2) Set up the terminal: echo " " set noglob set X="tset -Q -I -s -m 'xterm:?xterm' -m 'vt100:?vt100' -m 'vt200:?vt200'" set X="$X -m 'network:?xterm' -m 'dialup:?vt100' -m '2392:?vt200'" set X="$X -m 'linux:?linux' -m 'unknown:?${TERM}' -m ':?vt100'" set X="`$X`" unset noglob X stty -tabs # nobody does tabs right these days stty intr \^C susp \^Z dsusp \^- kill \^U stty erase \^\? #<-- emacs uses DEL so let's get in the habit... if ( $TERM == "xterm" ) echo "]2;`hostname`" # xterm titlebar clear ####################################################################### # @(#) 3) Say hello, Check for messages and mail: clear echo " " echo "Welcome to `hostname`. `date` $TERM `tty` " echo " " if ( -r /etc/motd ) /bin/cat /etc/motd echo " " if ( -r ~/.logmsg ) \more .logmsg # prints users .logmsg if it exists echo " " if ( -x /usr/local/bin/msgs ) /usr/local/bin/msgs -p -f if ( -x /usr/ucb/msgs ) /usr/ucb/msgs -p -f echo " " if ( ${?mail} ) then if ( -e $mail && ! -z $mail ) then echo "Mail from... " from echo " " endif endif echo " " ## Record login if ~/.activity file exists if ( -f ~/.activity && -w ~/.activity ) then echo "+login $HOST `who am i`" >> ~/.activity endif exit 0