Use upstream's gnome-session 3 fixes instead of ours

epel9
Christoph Wickert 13 years ago
parent 6ae4d9c11e
commit 85a35d2d29

@ -1,21 +0,0 @@
diff -up openbox-3.4.11.2/data/xsession/openbox-gnome-session.in.gnome openbox-3.4.11.2/data/xsession/openbox-gnome-session.in
--- openbox-3.4.11.2/data/xsession/openbox-gnome-session.in.gnome 2010-03-14 15:40:37.000000000 +0100
+++ openbox-3.4.11.2/data/xsession/openbox-gnome-session.in 2011-01-14 17:15:18.738710496 +0100
@@ -24,7 +24,7 @@ if test $MAJOR -lt 2 || (test $MAJOR = 2
# old gnome-session was easy to work with
export WINDOW_MANAGER="@bindir@/openbox"
exec gnome-session --choose-session=openbox-session "$@"
-else
+elif test $MAJOR = 2 && test $MINOR -lt 91; then
# new gnome-session requires openbox to be set in gconf and an
# openbox.desktop to be installed in the applications directory
@@ -54,6 +54,8 @@ else
# run GNOME/Openbox
exec gnome-session --default-session-key $SPATH/openbox_session "$@"
+else
+ exec gnome-session --session=gnome-openbox "$@"
fi

@ -0,0 +1,96 @@
From: Dana Jansens <danakj@orodu.net>
Date: Sat, 15 Oct 2011 19:07:59 +0000 (-0400)
Subject: Fixes for gnome-session 3.
X-Git-Url: http://git.openbox.org/?p=dana%2Fopenbox.git;a=commitdiff_plain;h=3991e148e2acbc3da3b9c31e2459b20a4e598a03
Fixes for gnome-session 3.
We run by default with a panel (default gnome-panel) and then run Openbox
without any panel if one cannot be found.
- Adds a fallback session for if a panel (default gnome-panel) not found.
- Removes notifications as a requirement. Seems to be a legacy thing judging
from the ubuntu .session files. Notifications are being provided by
notify-osd on modern systems, and you can't check for its presence in
gnome-session (gnome-classic.session always fails because it looks for it, so
ubuntu falls back to gnome-fallback.session).
---
diff --git a/Makefile.am b/Makefile.am
index 4f60bd0..1f7427c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -516,7 +516,8 @@ nodist_xsessions_DATA = \
data/xsession/openbox-kde.desktop
dist_gnomesession_DATA = \
- data/xsession/openbox-gnome.session
+ data/gnome-session/openbox-gnome.session \
+ data/gnome-session/openbox-gnome-fallback.session
dist_noinst_DATA = \
data/rc.xsd \
diff --git a/data/gnome-session/Makefile b/data/gnome-session/Makefile
new file mode 100644
index 0000000..b90edac
--- /dev/null
+++ b/data/gnome-session/Makefile
@@ -0,0 +1,4 @@
+all clean install:
+ $(MAKE) -C .. -$(MAKEFLAGS) $@
+
+.PHONY: all clean install
diff --git a/data/gnome-session/openbox-gnome-fallback.session b/data/gnome-session/openbox-gnome-fallback.session
new file mode 100644
index 0000000..156f2c3
--- /dev/null
+++ b/data/gnome-session/openbox-gnome-fallback.session
@@ -0,0 +1,6 @@
+[GNOME Session]
+Name=GNOME/Openbox fallback (Safe Mode)
+RequiredComponents=gnome-settings-daemon;
+RequiredProviders=windowmanager;
+DefaultProvider-windowmanager=openbox
+DesktopName=GNOME
diff --git a/data/gnome-session/openbox-gnome.session b/data/gnome-session/openbox-gnome.session
new file mode 100644
index 0000000..3399c2c
--- /dev/null
+++ b/data/gnome-session/openbox-gnome.session
@@ -0,0 +1,9 @@
+[GNOME Session]
+Name=GNOME/Openbox
+RequiredComponents=gnome-settings-daemon;
+# Try load with the gnome-panel and use the fallback if we can't load a panel
+RequiredProviders=windowmanager;panel
+DefaultProvider-windowmanager=openbox
+DefaultProvider-panel=gnome-panel
+FallbackSession=openbox-gnome-fallback
+DesktopName=GNOME
diff --git a/data/openbox.desktop b/data/openbox.desktop
index 9c19e67..d49ae22 100644
--- a/data/openbox.desktop
+++ b/data/openbox.desktop
@@ -7,6 +7,10 @@ Icon=openbox
NoDisplay=true
# name we put on the WM spec check window
X-GNOME-WMName=Openbox
+# gnome-session autostart
X-GNOME-Autostart-Phase=WindowManager
X-GNOME-Provides=windowmanager
+# Ubuntu stuff
+X-Ubuntu-Gettext-Domain=openbox
+# back compat
X-GNOME-Autostart-Notify=true
diff --git a/data/xsession/openbox-gnome.session b/data/xsession/openbox-gnome.session
deleted file mode 100644
index 2d8f07b..0000000
--- a/data/xsession/openbox-gnome.session
+++ /dev/null
@@ -1,6 +0,0 @@
-[GNOME Session]
-Name=GNOME/Openbox
-RequiredComponents=gnome-panel;gnome-settings-daemon;
-RequiredProviders=windowmanager;notifications;
-DefaultProvider-windowmanager=openbox
-DefaultProvider-notifications=notification-daemon

@ -0,0 +1,76 @@
From: Geoffrey Antos <dynamotwain@aim.com>
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: http://git.openbox.org/?p=dana%2Fopenbox.git;a=commitdiff_plain;h=3f870080de978e905f764b6cbc8e662a419d8983
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 c62a594..7ed1f6a 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 \
diff --git a/data/xsession/openbox-gnome-session.in b/data/xsession/openbox-gnome-session.in
index 8dd799c..f31c9ad 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 0000000..2d8f07b
--- /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

@ -1,9 +0,0 @@
[Desktop Entry]
Type=Application
Name=Openbox
Exec=openbox
Icon=openbox
NoDisplay=true
X-GNOME-Autostart-Phase=WindowManager
X-GNOME-Provides=windowmanager
X-GNOME-Autostart-Notify=true

@ -1,5 +0,0 @@
[GNOME Session]
RequiredComponents=gnome-panel;gnome-settings-daemon;
RequiredProviders=windowmanager;notifications;
DefaultProvider-windowmanager=openbox
DefaultProvider-notifications=notification-daemon

@ -10,14 +10,16 @@ Source0: http://openbox.org/releases/%{name}-%{version}.tar.gz
Source1: http://icculus.org/openbox/tools/setlayout.c Source1: http://icculus.org/openbox/tools/setlayout.c
Source2: xdg-menu Source2: xdg-menu
Source3: menu.xml Source3: menu.xml
Source4: openbox.desktop Source4: terminals.menu
Source5: terminals.menu
Source6: openbox.gnome-session
Patch1: openbox-doubleclick.patch Patch1: openbox-doubleclick.patch
Patch2: openbox-3.4.11.2-gnomesession.patch #Patch2: openbox-3.4.11.2-gnomesession.patch
# http://git.openbox.org/?p=dana/openbox.git;a=commit;h=3f870080
Patch2: openbox-3.5.0-gnomesession.patch
# http://git.openbox.org/?p=dana/openbox.git;a=commit;h=3991e148
Patch3: openbox-3.5.0-gnomesession-fixes.patch
# https://github.com/Mikachu/openbox/commit/339c19d1 # https://github.com/Mikachu/openbox/commit/339c19d1
Patch3: openbox-3.5.0-Fix-crash-on-unexpected-NET_WM_MOVERESIZE_CANCEL-messages.patch Patch4: openbox-3.5.0-Fix-crash-on-unexpected-NET_WM_MOVERESIZE_CANCEL-messages.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -128,8 +130,10 @@ KDE session.
%prep %prep
%setup -q %setup -q
%patch1 -p1 -b .doubleclick %patch1 -p1 -b .doubleclick
%patch2 -p1 -b .gnome # patch 3 depends on patch2!
%patch3 -p1 -b .fix-crash %patch2 -p1 -b .gnomesession
%patch3 -p1 -b .gnomesession-fixes
%patch4 -p1 -b .fix-crash
%build %build
@ -151,13 +155,15 @@ install -p %{SOURCE2} %{buildroot}%{_libexecdir}/openbox-xdg-menu
sed 's|_LIBEXECDIR_|%{_libexecdir}|g' < %{SOURCE3} \ sed 's|_LIBEXECDIR_|%{_libexecdir}|g' < %{SOURCE3} \
> %{buildroot}%{_sysconfdir}/xdg/%{name}/menu.xml > %{buildroot}%{_sysconfdir}/xdg/%{name}/menu.xml
desktop-file-install --vendor="" \ install -m644 -p %{SOURCE4} %{buildroot}%{_sysconfdir}/xdg/%{name}/terminals.menu
--dir=%{buildroot}%{_datadir}/applications \
%{SOURCE4} # 'make install' misses these two, so we install them manually
install -m644 -D data/gnome-session/openbox-gnome.session \
%{buildroot}%{_datadir}/gnome-session/sessions/openbox-gnome.session
install -m644 -D data/gnome-session/openbox-gnome-fallback.session \
%{buildroot}%{_datadir}/gnome-session/sessions/openbox-gnome-fallback.session
install -m644 -p %{SOURCE5} %{buildroot}%{_sysconfdir}/xdg/%{name}/terminals.menu
install -m644 -D %{SOURCE6} \
%{buildroot}%{_datadir}/gnome-session/sessions/gnome-openbox.session
%find_lang %{name} %find_lang %{name}
rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/*.la
@ -205,7 +211,7 @@ rm -rf %{buildroot}
%{_bindir}/%{name}-gnome-session %{_bindir}/%{name}-gnome-session
%{_datadir}/xsessions/%{name}-gnome.desktop %{_datadir}/xsessions/%{name}-gnome.desktop
%{_datadir}/gnome/wm-properties/openbox.desktop %{_datadir}/gnome/wm-properties/openbox.desktop
%{_datadir}/gnome-session/sessions/gnome-openbox.session %{_datadir}/gnome-session/sessions/openbox-gnome*.session
%{_mandir}/man1/%{name}-gnome-session*.1* %{_mandir}/man1/%{name}-gnome-session*.1*
%files -n gnome-panel-control %files -n gnome-panel-control
@ -232,6 +238,7 @@ rm -rf %{buildroot}
%changelog %changelog
* Fri Sep 28 2012 Christoph Wickert <cwickert@fedoraproject.org> - 3.5.0-8 * Fri Sep 28 2012 Christoph Wickert <cwickert@fedoraproject.org> - 3.5.0-8
- Require redhat-menus (#860997) - Require redhat-menus (#860997)
- Use upstream's gnome-session 3 fixes instead of ours
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.0-7 * Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.5.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

Loading…
Cancel
Save