#!/bin/sh # For use with the Linux systems at TA # K. Lemmens; 1996 # Read some defaults specific for our department test -r /opt/proto/xsession && . /opt/proto/xsession # Optionally start some additional programs xstuff() { sleep 1 # aumix -geom -0+0 & xterm -sb -ls -T Console -geometry +100+100 & } waitforwm() { # MOD KL, May 2003 : workaround bug in kstart --waitforwm # wait until ksplash has finished before starting the rest. STAT=0 while [ $STAT -eq 0 ]; do sleep 5 ps -C ksplash > /dev/null || STAT=1 done } # Optionally start some additional programs (KDE 2 style !) kstuff() { waitforwm # necessary for decent fonts in GTK2 apps under KDE but with # many side-effects : # /usr/libexec/gnome-settings-daemon & # sleep 1; kstart --window "KPager" --alldesktops kpager & # sleep 2; korn & # sleep 1; kmix & # sleep 1; killall artsd # or disable artsd startup in KDE preferences # sleep 1; ( mkmp3list && xmms ) & } # Start the actual session (windowmanager) test -r .dmrc && \ MODE=$( grep Session .dmrc | cut -d= -f 2 ) || \ MODE=$( cat .wmrc ) case ${MODE:=xfce} in failsafe ) exec xterm -ls -geom 138x65 ;; gnome ) exec gnome-session ;; twm ) (xstuff &); exec twm ;; xfce ) (xstuff &); exec startxfce ;; kde|custom ) (kstuff &); exec startkde ;; default|* ) exec startkde ;; esac ### The .xsession is terminated when the last client is terminated. ###