2016-10-03 10:30:30 +02:00
|
|
|
#!/bin/sh
|
2020-04-16 00:30:47 +02:00
|
|
|
|
|
|
|
# Default values for session and term
|
|
|
|
[ "$1" ] || set -- cinnamon
|
|
|
|
|
|
|
|
TERM=urxvt
|
|
|
|
|
|
|
|
# Source the Standard Stuff from this machine
|
2016-10-03 10:30:30 +02:00
|
|
|
. /etc/X11/xinit/xinitrc-common
|
|
|
|
if [ -f $HOME/.Xclients ]; then
|
|
|
|
exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients || \
|
|
|
|
exec $CK_XINIT_SESSION $SSH_AGENT $HOME/.Xclients
|
|
|
|
elif [ -f /etc/X11/xinit/Xclients ]; then
|
|
|
|
exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients || \
|
|
|
|
exec $CK_XINIT_SESSION $SSH_AGENT /etc/X11/xinit/Xclients
|
|
|
|
else
|
|
|
|
# Failsafe settings. Although we should never get here
|
|
|
|
# (we provide fallbacks in Xclients as well) it can't hurt.
|
|
|
|
[ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'
|
|
|
|
[ -x /usr/bin/xclock ] && /usr/bin/xclock -geometry 100x100-5+5 &
|
|
|
|
[ -x /usr/bin/xterm ] && xterm -geometry 80x50-50+150 &
|
|
|
|
[ -x /usr/bin/twm ] && /usr/bin/twm
|
|
|
|
fi
|
2020-03-07 01:54:09 +01:00
|
|
|
|
2020-04-16 00:30:47 +02:00
|
|
|
# Source the xprofile files
|
|
|
|
[ -f /etc/xprofile ] && . /etc/xprofile
|
|
|
|
[ -f ~/.xprofile ] && . ~/.xprofile
|
2020-03-07 01:54:09 +01:00
|
|
|
|
2020-04-16 00:30:47 +02:00
|
|
|
# Set Desktop or Window Manager
|
2016-10-03 10:30:30 +02:00
|
|
|
case $1 in
|
2020-04-16 00:30:47 +02:00
|
|
|
cinnamon) set -- cinnamon-session;;
|
|
|
|
gnome) set -- gnome-session;;
|
|
|
|
kde) set -- startkde;;
|
|
|
|
xfce) set -- xfce4-session;;
|
|
|
|
awesome) set -- awesome;;
|
|
|
|
enlightenment) set -- enlightenment_start;;
|
2016-10-03 10:30:30 +02:00
|
|
|
esac
|
2016-10-06 03:21:13 +02:00
|
|
|
|
2020-04-16 00:30:47 +02:00
|
|
|
# Run the session, if it doesn't work try TERM,
|
|
|
|
# finally fallback to xterm if there's nothing
|
|
|
|
exec "$@" || exec "$TERM" || exec xterm
|
|
|
|
|