2007-05-07 01:41:48 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2007-05-23 17:59:58 +00:00
|
|
|
if test -n "$1"; then
|
|
|
|
echo "Syntax: openbox-gnome-session"
|
|
|
|
echo
|
|
|
|
echo "See the openbox-gnome-session(1) manpage for help."
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2009-12-08 20:18:57 +00:00
|
|
|
VER=$(gnome-session --version 2>/dev/null | \
|
|
|
|
sed -e 's/[^0-9.]*\([0-9.]\+\)/\1/')
|
|
|
|
|
|
|
|
MAJOR=$(echo $VER | cut -d . -f 1)
|
|
|
|
MINOR=$(echo $VER | cut -d . -f 2)
|
|
|
|
|
2007-05-07 01:41:48 +00:00
|
|
|
# Run GNOME with Openbox as its window manager
|
2007-05-10 03:12:44 +00:00
|
|
|
export WINDOW_MANAGER="@bindir@/openbox"
|
2009-12-08 20:18:57 +00:00
|
|
|
|
|
|
|
if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then
|
|
|
|
# old gnome-session allows multiple sessions to be saved
|
|
|
|
exec gnome-session --choose-session=openbox-session "$@"
|
|
|
|
else
|
|
|
|
# make sure the gnome-wm script is being used
|
|
|
|
gconftool-2 -t string \
|
|
|
|
-s /desktop/gnome/session/required_components/windowmanager "gnome-wm" \
|
|
|
|
2> /dev/null
|
|
|
|
|
|
|
|
# new gnome-session does not allow multiple sessions
|
|
|
|
exec gnome-session "$@"
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|