source: trunk/packs/dotfiles/login @ 17541

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