#!/bin/sh # Top level Xsession file for all users # # $Id: Xsession,v 1.2 2001-05-06 15:53:04 ghudson Exp $ trap "kdestroy; unlog; fsid -u -f $USER; exit 0" 1 2 15 initlib="/usr/athena/lib/init" defsession=$1 defsessioncmd="$2" if [ -f .noignore ]; then defsession=1; fi case $defsession in 1|4|7) if [ -f .xsession ]; then session=".xsession" else session="$initlib/xsession" fi case $defsession in 7) session="$session dash" ;; esac ;; 2) session="$initlib/xsession -nocalls" ;; 3) session="xterm -ls -geometry 80x24+280+220 -display :0.0" ;; 5) session="$defsessioncmd" ;; esac # Set the tty characteristics of the parent (console window) # Redirect stdin since some versions of stty use it instead of stdout. if [ "${hosttype}" = "decmips" ]; then stty dec 0<&1 2>/dev/null else stty sane 0<&1 2>/dev/null fi # Make random Athena modifications to keymap if required. test -f /usr/athena/lib/X11/keymaps/AthenaMods && \ xmodmap /usr/athena/lib/X11/keymaps/AthenaMods # Set X screensaver to noblanking to avoid power saving. xset s noblank # Only attempt using bugme if packs are actually available. if [ -x /usr/athena/bin/bugme ]; then /usr/athena/bin/bugme $session else $session fi status=$? if [ $status != 0 ]; then echo ERROR: echo "Xsession returned non-zero status." echo "" echo 'Select the login option to "Ignore your customizations"' echo 'to login and repair your dot files.' kdestroy # destroy tickets. sleep 10 exit 1 fi # Cannot detach homedir here, since this script is executed in the users # homedir. kdestroy # destroy tickets. cd /tmp unlog fsid -u -f $USER > /dev/null 2>&1 sleep 3 # let them see any messages (quickly) exit 0