source: trunk/athena/etc/xdm/xdm-sgi/Xlogin.sgi_63 @ 10700

Revision 10700, 1.6 KB checked in by ghudson, 27 years ago (diff)
Split Xlogin into separate files and don't do the setmon for IRIX 6.3.
Line 
1#!/bin/sh
2# /usr/bin/X11/xsetroot -bg sgilightblue -bitmap /usr/include/X11/bitmaps/grainy
3
4XAUTHORITY=/usr/lib/X11/xdm/xdm-auth export XAUTHORITY
5
6#
7# CAUTION:
8# These two lines need to match those in /usr/bin/X11/X.
9# NOT configurable on a per-user basis.
10#
11glGammaFile=/etc/config/system.glGammaVal
12glGammaDefault="1.7"
13GAMMA_CMD=/usr/sbin/gamma
14
15#
16# Execute gamma only for REX (starter) graphics.
17#
18if `hinv -c graphics | fgrep -s LG1` && [ -x "$GAMMA_CMD" ]; then
19        RUN_GAMMA=1
20fi
21
22if [ "$RUN_GAMMA" = 1 ]; then
23        if [ -r $glGammaFile -a -s $glGammaFile ];  then
24                glGammaVal=`cat $glGammaFile`
25        else
26                glGammaVal=$glGammaDefault
27        fi
28fi
29
30screens=`/usr/bin/X11/xlistscrns`
31for screen in $screens
32    do
33        if [ "$RUN_GAMMA" = 1 ]; then
34                HOME=/ DISPLAY=$screen /usr/sbin/gamma $glGammaVal
35        fi
36    done
37
38/usr/bin/X11/xlistscrns -i
39
40# visuallogin:  on: clogin;                  off: plain xdm login
41# also, "-f" in clogin means grab input focus
42if [ -x /etc/athena/xlogin ] ; then
43        /etc/athena/nanny -xup
44        # If xlogin exits with nonzero status three times within
45        # ten seconds, stop trying to run it. We use a low-tech
46        # time comparison and counter.
47        while true; do
48                sleep 10 &
49                sleeper=$!
50                opts="-config /etc/athena/login -display :0.0"
51                opts="$opts -fp /usr/andrew/X11fonts/"
52                opts="$opts,/usr/athena/lib/X11/fonts/misc/"
53                if /etc/athena/xlogin $opts;
54                        then exit 0
55                fi
56                if /etc/athena/xlogin $opts;
57                        then exit 0
58                fi
59                if /etc/athena/xlogin $opts;
60                        then exit 0
61                fi
62                if kill -0 $sleeper 2>/dev/null ;
63                        then exit 1
64                fi
65                wait
66        done
67fi
68
69if /etc/chkconfig visuallogin ; then
70        if [ -x /usr/Cadmin/bin/clogin ] ; then
71                exec /usr/Cadmin/bin/clogin -f
72        fi
73fi
74
Note: See TracBrowser for help on using the repository browser.