Voici comment j'ai configuré le mien :
#!/bin/bash -login
# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $
case $# in
1)
case $1 in
failsafe)
exec xterm -geometry 80x24-0-0 ;;
kde)
OPTIONS=""
windowmanager=/opt/kde/bin/startkde ;;
fvwm)
OPTIONS=""
windowmanager=/usr/X11R6/bin/fvwm ;;
fvwm2)
OPTIONS=""
windowmanager=/usr/X11R6/bin/fvwm2 ;;
Afterstep)
OPTIONS=""
windowmanager=/usr/X11R6/bin/afterstep ;;
AnotherLevel)
OPTIONS=""
RCFILE=""
for tryfile in "$HOME/.fvwm2rc.m4" "/etc/X11/AnotherLevel/fvwmrc.m4"; do
if [ -f "$tryfile" ]; then
RCFILE="$tryfile"
break
fi
done
# if it really exists, use it; if not, fvwm2 or fvwm95 will
# automagically look for a config file in the regular places.
if [ -n "$RCFILE" ]; then
OPTIONS="-cmd '/usr/X11R6/lib/X11/fvwm2/FvwmM4 -debug $RCFILE'"
fi
windowmanager=/usr/X11R6/bin/fvwm2 ;;
Enlightenment)
OPTIONS=""
windowmanager=/usr/X11R6/bin/enlightenment ;;
twm)
OPTIONS=""
windowmanager=/usr/X11R6/bin/twm ;;
esac
esac
# redirect errors to a file in user's home directory if we can
for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
do
if ( cp /dev/null "$errfile" 2> /dev/null )
then
chmod 600 "$errfile"
exec > "$errfile" 2>&1
break
fi
done
# clean up after xbanner
freetemp
startup=$HOME/.xsession
resources=$HOME/.Xresources
if [ -x "$windowmanager" ]; then
echo The window manager is $windowmanager
if [ -x "$HOME/.Xclients" ]; then
$HOME/.Xclients
else
xterm -geometry 80x24-0-0 &
fi
eval "exec $windowmanager $OPTIONS"
elif [ -x "$startup" ]; then
echo Starting $startup
exec "$startup"
elif [ -x "$HOME/.Xclients" ]; then
$HOME/.Xclients
exec twm
elif [ -x /etc/X11/xinit/Xclients ]; then
exec /etc/X11/xinit/Xclients
else
if [ -f "$resources" ]; then
xrdb -load "$resources"
fi
exec xsm
fi
Notez que les éléments dans la grande instruction case au
début du fichier correspondent exactement aux arguments de SessionTypes
dans kdmrc.
Supposez que je veuille ajouter le gestionnaire de fenêtres Ice à cette liste. Je pourrais le faire comme ceci :
Icewm) OPTIONS= " " windowmanager=/usr/local/bin/icewm;;
les fichiers en téléchargement sont à ftp://ftp.linux-france.org/pub/macintosh/