]> Dogcows Code - chaz/openbox/commitdiff
Make openbox-gnome-session work with gnome-session > 2.22
authorDana Jansens <danakj@orodu.net>
Tue, 8 Dec 2009 20:18:57 +0000 (15:18 -0500)
committerDana Jansens <danakj@orodu.net>
Tue, 8 Dec 2009 20:52:07 +0000 (15:52 -0500)
data/xsession/openbox-gnome-session.in

index 278ac6a8ed5a42aa55d1caaa3aef5ab913d40a84..d93bab0cca67f22d9e360d33bbf972bcb983b3ff 100644 (file)
@@ -7,6 +7,27 @@ if test -n "$1"; then
   exit
 fi
 
+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)
+
 # Run GNOME with Openbox as its window manager
 export WINDOW_MANAGER="@bindir@/openbox"
-exec gnome-session --choose-session=openbox-session "$@"
+
+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
+
+
+
This page took 0.024304 seconds and 4 git commands to generate.