[K12OSN] Isolating IcewWM as the default session in 4.4

Robert Arkiletian robark at gmail.com
Wed Aug 24 23:02:34 UTC 2005


On 8/24/05, David Trask <dtrask at vcsvikings.org> wrote:
> Isolating IcewWM as the default session in 4.4...how?  I used to go into
> /etc/X11/gdm/Sessions and disable the other sessions...such as Gnome and
If you want to ONLY allow ICEWM read on.
I did it by editing 3 files.

/etc/X11/xdm/Xsession
/etc/X11/xinit/Xclients
/etc/X11/xinit/xinitrc

cp /etc/X11/xdm/Xsession as Xsession.original to save the original

---------------now delete
# backward compatibility with old switchdesk directory
if [ -d /usr/share/switchdesk ] ; then
    SWITCHDESKPATH=/usr/share/switchdesk
else
    SWITCHDESKPATH=/usr/share/apps/switchdesk
fi

-------------and delete
# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
    if [ -x "$SWITCHDESKPATH/Xclients.$1" ]; then
       exec -l $SHELL -c "$SWITCHDESKPATH/Xclients.$1";
    fi;

    case "$1" in
    failsafe)
       exec -l $SHELL -c "xterm -geometry 80x24-0-0"
       ;;
    gnome)
       exec -l $SHELL -c "$DBUS_LAUNCH gnome-session"
       ;;
    kde|kde1|kde2)
       exec -l $SHELL -c "$DBUS_LAUNCH $SWITCHDESKPATH/Xclients.kde"
       ;;
    twm)
        # fall back to twm
       exec -l $SHELL -c "$DBUS_LAUNCH $SWITCHDESKPATH/Xclients.twm"
       ;;
    *)
       # GDM provies either a command line as the first argument or
       # provides 'failsafe', 'default' or 'custom'.  KDM will do the
       # same at some point
       if [ "$1" != "default" -a "$1" != "custom" ]; then
           exec -l $SHELL -c "$DBUS_LAUNCH $1"
       fi
       ;;
    esac
esac

# otherwise, take default action
if [ -x "$HOME/.xsession" ]; then
    exec -l $SHELL -c "$DBUS_LAUNCH $HOME/.xsession"
elif [ -x "$HOME/.Xclients" ]; then
    exec -l $SHELL -c "$DBUS_LAUNCH $HOME/.Xclients"
elif [ -x /etc/X11/xinit/Xclients ]; then
    exec -l $SHELL -c "$DBUS_LAUNCH /etc/X11/xinit/Xclients"
else
    # should never get here; failsafe fallback
    exec -l $SHELL -c "xsm"
fi
----------------------------------

------- replace it with
exec -l $SHELL -c "$DBUS_LAUNCH /etc/X11/xinit/Xclients"

Don't delete the call to . /etc/X11/xinit/xinitrc-common

Now with file /etc/X11/xinit/Xclients
Backup like before.
Delete everything and add
. /etc/X11/gdm/Sessions/IceWM

Now with file /etc/X11/xinit/xinitrc
backup like before.
delete everything except
. /etc/X11/xinit/xinitrc-common
and below it add
exec /etc/X11/xinit/Xclients

and you are done. If there is an easier way to ONLY allow icewm please
let me know.

One more thing. if you don't want the ssh-agent bug then comment out
the ssh-agent line in /etc/X11/xinit/xinitrc-common.  it's near the
end of the file.


-- 
Robert Arkiletian
C++ GUI tutorial http://fltk.org/links.php?V19




More information about the K12OSN mailing list