]> Dogcows Code - chaz/openbox/blobdiff - data/xsession/openbox-gnome-session.in
Make openbox-gnome-session compatible with gnome3 with gnome-session 3.0+ support.
[chaz/openbox] / data / xsession / openbox-gnome-session.in
index 1f17edbcd086bf5d164d506e5e3deab98262d621..f31c9ad2c704fd380f6caff3fab4432918a201e7 100644 (file)
@@ -21,11 +21,11 @@ MINOR=$(echo $VER | cut -d . -f 2)
 # run GNOME with Openbox as its window manager
 
 if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then
-  # old gnome-session was easy to work with
+  # older gnome-session was easy to work with
   export WINDOW_MANAGER="@bindir@/openbox"
   exec gnome-session --choose-session=openbox-session "$@"
-else
-  # new gnome-session requires openbox to be set in gconf and an
+elif test $MAJOR -lt 3; then
+  # old gnome-session requires openbox to be set in gconf and an
   # openbox.desktop to be installed in the applications directory
 
   SPATH=/desktop/gnome/session
@@ -37,7 +37,7 @@ else
   if test -z "$SESSION"; then
       # if its empty then just run openbox
       SESSION="[openbox]"
-  elif echo "$SESSION" | grep -q openbox; then
+  elif echo "$SESSION" | grep -q openbox; then
       # if openbox isn't in the session then append it
       SESSION="${SESSION%]},openbox]"
   fi
@@ -54,6 +54,12 @@ else
 
   # run GNOME/Openbox
   exec gnome-session --default-session-key $SPATH/openbox_session "$@"
+else
+  # new gnome-session requires session file installed in
+  # /usr/share/gnome-session/sessions as well as openbox.desktop to be
+  # installed in the applications directory
+
+  exec gnome-session --session=openbox-gnome
 fi
 
 
This page took 0.027492 seconds and 4 git commands to generate.