source: trunk/packs/dotfiles/Xsession @ 16176

Revision 16176, 1.7 KB checked in by ghudson, 24 years ago (diff)
Add login option for dash-based interface.
  • Property svn:executable set to *
Line 
1#!/bin/sh
2
3# Top level Xsession file for all users
4#
5# $Id: Xsession,v 1.2 2001-05-06 15:53:04 ghudson Exp $
6
7trap "kdestroy; unlog; fsid -u -f $USER; exit 0" 1 2 15
8
9initlib="/usr/athena/lib/init"
10defsession=$1
11defsessioncmd="$2"
12
13if [ -f .noignore ]; then
14        defsession=1;
15fi
16
17case $defsession in
181|4|7)
19        if [ -f .xsession ]; then
20                session=".xsession"
21        else
22                session="$initlib/xsession"
23        fi
24        case $defsession in
25        7)
26                session="$session dash"
27                ;;
28        esac
29        ;;
302)
31        session="$initlib/xsession -nocalls"
32        ;;
333)
34        session="xterm -ls -geometry 80x24+280+220 -display :0.0"
35        ;;
365)
37        session="$defsessioncmd"
38        ;;
39esac
40
41# Set the tty characteristics of the parent (console window)
42# Redirect stdin since some versions of stty use it instead of stdout.
43if [ "${hosttype}" = "decmips" ]; then
44  stty dec 0<&1 2>/dev/null
45else
46  stty sane 0<&1 2>/dev/null
47fi
48
49# Make random Athena modifications to keymap if required.
50
51test -f /usr/athena/lib/X11/keymaps/AthenaMods && \
52  xmodmap /usr/athena/lib/X11/keymaps/AthenaMods
53
54# Set X screensaver to noblanking to avoid power saving.
55xset s noblank
56
57# Only attempt using bugme if packs are actually available.
58if [ -x /usr/athena/bin/bugme ]; then
59        /usr/athena/bin/bugme $session
60else
61        $session
62fi
63
64status=$?
65if [ $status != 0 ]; then
66                echo ERROR:
67                echo "Xsession returned non-zero status."
68                echo ""
69                echo 'Select the login option to "Ignore your customizations"'
70                echo 'to login and repair your dot files.'
71                kdestroy                        # destroy tickets.
72                sleep 10
73                exit 1
74fi
75
76
77# Cannot detach homedir here, since this script is executed in the users
78# homedir.
79
80kdestroy                                # destroy tickets.
81cd /tmp
82unlog
83fsid -u -f $USER > /dev/null 2>&1
84sleep 3                                 # let them see any messages (quickly)
85exit 0
Note: See TracBrowser for help on using the repository browser.