source: trunk/packs/dotfiles/login @ 19883

Revision 19883, 4.0 KB checked in by rbasch, 21 years ago (diff)
Run mailquota to check usage on post office server.
  • Property svn:executable set to *
Line 
1# Prototype global .login file
2# $Id: login,v 1.12 2003-10-14 15:47:46 rbasch Exp $
3
4# This file is sourced by default user file ~/.login
5
6# SGI xwsh runs shells as login shells. We don't want this.
7if ($?XSESSION) then
8  exit 0
9endif
10
11# Remember the pid of the login shell; used by dustbuster.
12setenv ATHENA_LOGIN_SESSION $$
13
14set initdir=/usr/athena/lib/init
15
16# Create a unique temporary directory for the session, and remember
17# the directory name in the environment.
18set sessiondir = "`$initdir/mksessiondir -s $$`"
19if ("$sessiondir" != "") then
20  setenv ATHENA_SESSION_TMPDIR "$sessiondir"
21endif
22
23if (! -r ~/.hushlogin) then
24        set verbose_login       # Echo messages unless user has ~/.hushlogin.
25endif
26/bin/stty sane                  # Use sane control characters
27
28if ($hosttype == "sgi") then
29  /bin/stty intr ^C
30endif
31
32# *******************   ENVIRONMENT SETUP   *******************
33
34# The ~/.cshrc file sets environment variables, attaches lockers, and sets
35# the command search path.  It has already been sourced at this point.
36
37# Check that user home directory is available
38
39if ($?TMPHOME) then
40    echo "WARNING:"
41    echo ""
42    echo "Your home directory is currently unavailable."
43    echo "This is probably due to a problem with the"
44    echo "fileserver on which your directory is stored."
45    echo ""
46    echo "You may use a temporary directory for this session."
47    echo "If you do, any files you create and any mail you"
48    echo "incorporate will be DELETED when you logout and lost forever."
49    echo ""
50    echo "Would you like to continue this session, using a TEMPORARY"
51    echo -n "directory? (yes,no) [The default is no] "
52    set answer = ($<)
53    if ("$answer" =~ [yY]*) then
54        echo "Continuing with temporary directory..."
55        mkdir ~/Mail
56    else
57        kill -HUP $$
58    endif
59endif
60       
61
62# *******************   DEVICE SETUP   *******************
63
64# On IRIX, the terminal type may not be set yet.
65if (! $?term) then
66    eval `tset -s -Q`
67endif
68
69# Set device type if interactive session (e.g., dialup)
70
71if (("$term" == switch) || ("$term" == network) || ("$term" == dialup) \
72    || ("$term" == unknown)) then
73
74    # The standard terminal emulation is vt100.  To use a different emulation,
75    # set the environmental variable DEF_TERM in your ~/.environment file to
76    # to the device you want to emulate (one that the system will recognize).
77
78    if (! $?DEF_TERM) setenv DEF_TERM vt100
79    set noglob; eval `tset -s -I -Q "?${DEF_TERM}"` || unset noglob
80
81endif
82
83
84# If the login is on an X display but the DISPLAY variable has not
85# been set, ask the user what the DISPLAY should be (e.g., rlogin)
86
87if (("$term" =~ xterm*) && (! $?DISPLAY)) then
88        echo -n "What DISPLAY are you using [default: none]? "
89        set response = ($<)
90        if ("$response" != "") then
91                if ($response =~ *:*) then
92                        echo "Setting DISPLAY to $response"
93                        setenv DISPLAY "$response"
94                else
95                        echo "Setting DISPLAY to ${response}:0"
96                        setenv DISPLAY "${response}:0"
97                endif
98        endif
99endif
100
101
102# *******************   ACTIVITY STARTUP   *******************
103
104# Run standard system/user startup activities
105
106# Run default system startup activities.  To skip these, put the command
107# "set skip_tty_startup" in your ~/.environment file.
108
109if (! $?ZEPHYR_CLIENT) setenv ZEPHYR_CLIENT zwgc
110
111if (! $?skip_tty_startup) then
112        if ($?verbose_login) echo "Running standard startup activities ..."
113        set ignoreeof                   # ^D won't log you out
114        $ZEPHYR_CLIENT                  # Start Zephyr client
115        get_message -new -login         # Display current motd
116        mailquota -n                    # Check quota on post office server
117        from -t -n                      # Check for mail
118        (olc who &) >& /dev/null        # Ping the OLC server
119endif
120
121
122# Run the tty-session customizing commands in your ~/.startup.tty file.
123
124if (-r ~/.startup.tty) then
125        if ($?verbose_login) then               # Don't echo if noninteractive
126          echo "Running custom startup activities listed in ~/.startup.tty ..."
127        endif
128        source ~/.startup.tty
129endif
130
131
132# Run notification system, lert. To skip this (a generally bad idea unless
133# you plan to run it yourself), put the commend "set skip_lert" in your
134# ~/.environment file.
135
136if (! $?skip_lert) then
137        lert -q                         # Don't want to see server errors.
138endif
Note: See TracBrowser for help on using the repository browser.