1 | #!/bin/sh |
---|
2 | # /usr/bin/X11/xsetroot -bg sgilightblue -bitmap /usr/include/X11/bitmaps/grainy |
---|
3 | |
---|
4 | XAUTHORITY=/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 | # |
---|
11 | glGammaFile=/etc/config/system.glGammaVal |
---|
12 | glGammaDefault="1.7" |
---|
13 | GAMMA_CMD=/usr/sbin/gamma |
---|
14 | |
---|
15 | # |
---|
16 | # Execute gamma only for REX (starter) graphics. |
---|
17 | # |
---|
18 | if `hinv -c graphics | fgrep -s LG1` && [ -x "$GAMMA_CMD" ]; then |
---|
19 | RUN_GAMMA=1 |
---|
20 | fi |
---|
21 | |
---|
22 | if [ "$RUN_GAMMA" = 1 ]; then |
---|
23 | if [ -r $glGammaFile -a -s $glGammaFile ]; then |
---|
24 | glGammaVal=`cat $glGammaFile` |
---|
25 | else |
---|
26 | glGammaVal=$glGammaDefault |
---|
27 | fi |
---|
28 | fi |
---|
29 | |
---|
30 | screens=`/usr/bin/X11/xlistscrns` |
---|
31 | for 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 |
---|
42 | if [ -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 |
---|
67 | fi |
---|
68 | |
---|
69 | if /etc/chkconfig visuallogin ; then |
---|
70 | if [ -x /usr/Cadmin/bin/clogin ] ; then |
---|
71 | exec /usr/Cadmin/bin/clogin -f |
---|
72 | fi |
---|
73 | fi |
---|
74 | |
---|