12
12
-remove _NET_DESKTOP_NAMES \
13
13
-remove _NET_CURRENT_DESKTOP 2> /dev/null
15
export WINDOW_MANAGER=openbox
16
exec gnome-session --session=openbox-gnome
15
VER=$(gnome-session --version 2>/dev/null | \
16
sed -e 's/[^0-9.]*\([0-9.]\+\)/\1/')
18
MAJOR=$(echo $VER | cut -d . -f 1)
19
MINOR=$(echo $VER | cut -d . -f 2)
21
# run GNOME with Openbox as its window manager
23
if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then
24
# older gnome-session was easy to work with
25
export WINDOW_MANAGER="@bindir@/openbox"
26
exec gnome-session --choose-session=openbox-session "$@"
27
elif test $MAJOR -lt 3; then
28
# old gnome-session requires openbox to be set in gconf and an
29
# openbox.desktop to be installed in the applications directory
31
SPATH=/desktop/gnome/session
33
# get the current default session
34
SESSION=$(gconftool-2 -g $SPATH/default_session 2> /dev/null)
36
# make sure openbox is going to be run
37
if test -z "$SESSION"; then
38
# if its empty then just run openbox
40
elif ! echo "$SESSION" | grep -q openbox; then
41
# if openbox isn't in the session then append it
42
SESSION="${SESSION%]},openbox]"
45
# get the current GNOME/Openbox session
46
OB_SESSION=$(gconftool-2 -g $SPATH/openbox_session 2> /dev/null)
48
# update the GNOME/Openbox session if needed
49
if test x$OB_SESSION != x$SESSION; then
50
# the default session changed or we didn't run GNOME/Openbox before
51
gconftool-2 -t list --list-type=strings -s $SPATH/openbox_session \
52
"$SESSION" 2> /dev/null
56
exec gnome-session --default-session-key $SPATH/openbox_session "$@"
58
# new gnome-session requires session file installed in
59
# /usr/share/gnome-session/sessions as well as openbox.desktop to be
60
# installed in the applications directory
62
exec gnome-session --session=openbox-gnome