source: trunk/packs/dotfiles/login @ 13051

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