From: Geoffrey Antos Date: Fri, 7 Oct 2011 13:29:30 +0000 (-0400) Subject: Make openbox-gnome-session compatible with gnome3 with gnome-session 3.0+ support. X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=3f870080de978e905f764b6cbc8e662a419d8983;p=chaz%2Fopenbox Make openbox-gnome-session compatible with gnome3 with gnome-session 3.0+ support. Yay they did something nice and made it easier for other window managers to be used. How unexpected and pleasant. --- diff --git a/Makefile.am b/Makefile.am index c62a5944..7ed1f6a8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,7 @@ localedir = $(datadir)/locale configdir = $(sysconfdir)/xdg rcdir = $(configdir)/openbox xsessionsdir = $(datadir)/xsessions +gnomesessiondir = $(datadir)/gnome-session/sessions gnomewmfilesdir = $(datadir)/gnome/wm-properties pkgconfigdir = $(libdir)/pkgconfig obtpubincludedir= $(includedir)/openbox/@OBT_VERSION@/obt @@ -513,6 +514,9 @@ nodist_xsessions_DATA = \ data/xsession/openbox-gnome.desktop \ data/xsession/openbox-kde.desktop +dist_gnomesession_DATA = \ + data/xsession/openbox-gnome.session + dist_noinst_DATA = \ data/rc.xsd \ data/menu.xsd \ @@ -581,6 +585,7 @@ EXTRA_DIST = \ CLEANFILES = \ $(nodist_man_MANS) \ $(nodist_bin_SCRIPTS) \ + $(dist_gnomesession_DATA) \ $(nodist_xsessions_DATA) \ $(nodist_rc_SCRIPTS) \ $(nodist_libexec_SCRIPTS) diff --git a/data/xsession/openbox-gnome-session.in b/data/xsession/openbox-gnome-session.in index 8dd799c0..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 @@ -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 diff --git a/data/xsession/openbox-gnome.session b/data/xsession/openbox-gnome.session new file mode 100644 index 00000000..2d8f07b2 --- /dev/null +++ b/data/xsession/openbox-gnome.session @@ -0,0 +1,6 @@ +[GNOME Session] +Name=GNOME/Openbox +RequiredComponents=gnome-panel;gnome-settings-daemon; +RequiredProviders=windowmanager;notifications; +DefaultProvider-windowmanager=openbox +DefaultProvider-notifications=notification-daemon