X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=data%2Fxsession%2Fopenbox-gnome-session.in;h=f31c9ad2c704fd380f6caff3fab4432918a201e7;hb=53b8c86a608021b3adaf15fcf330aed3f82158e7;hp=de46bec534476029cb6567e269bb5c9e7cc80345;hpb=acafa38c8ea210b12ed92fc16281b915ab61542c;p=chaz%2Fopenbox diff --git a/data/xsession/openbox-gnome-session.in b/data/xsession/openbox-gnome-session.in index de46bec5..f31c9ad2 100644 --- a/data/xsession/openbox-gnome-session.in +++ b/data/xsession/openbox-gnome-session.in @@ -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 test -z $(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 @@ -46,7 +46,7 @@ else OB_SESSION=$(gconftool-2 -g $SPATH/openbox_session 2> /dev/null) # update the GNOME/Openbox session if needed - if x$OB_SESSION != x$SESSION; then + if test x$OB_SESSION != x$SESSION; then # the default session changed or we didn't run GNOME/Openbox before gconftool-2 -t list --list-type=strings -s $SPATH/openbox_session \ "$SESSION" 2> /dev/null @@ -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