source: trunk/packs/dotfiles/Xsession @ 13948

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