diff --git a/data/scripts/Xsession b/data/scripts/Xsession index 0b4efb533..9440a8e3f 100755 --- a/data/scripts/Xsession +++ b/data/scripts/Xsession @@ -57,25 +57,14 @@ if [ -d /etc/X11/xinit/xinitrc.d ]; then done fi -# Load Xsession scripts -# OPTIONFILE, USERXSESSION, USERXSESSIONRC and ALTUSERXSESSION are required -# by the scripts to work -xsessionddir="/etc/X11/Xsession.d" -OPTIONFILE=/etc/X11/Xsession.options -USERXSESSION=$HOME/.xsession -USERXSESSIONRC=$HOME/.xsessionrc -ALTUSERXSESSION=$HOME/.Xsession - -if [ -d "$xsessionddir" ]; then - for i in `ls $xsessionddir`; do - script="$xsessionddir/$i" - echo "Loading X session script $script" - if [ -r "$script" -a -f "$script" ] && expr "$i" : '^[[:alnum:]_-]\+$' > /dev/null; then - . "$script" - fi - done +# Load Xsession scripts, if any +if [ -x /etc/X11/Xsession ]; then + # Let Xsession execute the session for us + export STARTUP=$session + exec /etc/X11/Xsession fi +# Merge Xresources if [ -d /etc/X11/Xresources ]; then for i in /etc/X11/Xresources/*; do [ -f $i ] && xrdb -merge $i @@ -85,6 +74,7 @@ elif [ -f /etc/X11/Xresources ]; then fi [ -f $HOME/.Xresources ] && xrdb -merge $HOME/.Xresources +# Execute the actual session case $session in "") exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."