- Restore gnome session script (#474143)

- Use DESKTOP_AUTOSTART_ID to avoid gnome-session registration timeout
epel9
Miroslav Lichvar 16 years ago
parent aaa05d1003
commit 5eb489f392

@ -0,0 +1,20 @@
diff -up openbox-3.4.7.2/openbox/session.c.autostartid openbox-3.4.7.2/openbox/session.c
--- openbox-3.4.7.2/openbox/session.c.autostartid 2008-04-14 01:22:12.000000000 +0200
+++ openbox-3.4.7.2/openbox/session.c 2008-12-09 18:04:50.000000000 +0100
@@ -174,6 +174,16 @@ static gboolean session_connect(void)
/* connect to the server */
oldid = ob_sm_id;
+
+ if (!oldid) {
+ const gchar *autostart_id = g_getenv("DESKTOP_AUTOSTART_ID");
+
+ if (autostart_id) {
+ oldid = g_strdup(autostart_id);
+ g_unsetenv("DESKTOP_AUTOSTART_ID");
+ }
+ }
+
ob_debug_type(OB_DEBUG_SM, "Connecting to SM with id: %s\n",
oldid ? oldid : "(null)");
sm_conn = SmcOpenConnection(NULL, NULL, 1, 0,

@ -1,3 +1,16 @@
diff -up openbox-3.4.7.2/data/xsession/openbox-gnome-session.in.gdm openbox-3.4.7.2/data/xsession/openbox-gnome-session.in
--- openbox-3.4.7.2/data/xsession/openbox-gnome-session.in.gdm 2008-02-29 22:18:12.000000000 +0100
+++ openbox-3.4.7.2/data/xsession/openbox-gnome-session.in 2008-06-10 18:37:10.000000000 +0200
@@ -7,6 +7,9 @@ if test -n "$1"; then
exit
fi
+# Clean up after GDM
+xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null
+
# Run GNOME with Openbox as its window manager
export WINDOW_MANAGER="@bindir@/openbox"
exec gnome-session --choose-session=openbox-session "$@"
diff -up openbox-3.4.7.2/data/xsession/openbox-kde-session.in.gdm openbox-3.4.7.2/data/xsession/openbox-kde-session.in diff -up openbox-3.4.7.2/data/xsession/openbox-kde-session.in.gdm openbox-3.4.7.2/data/xsession/openbox-kde-session.in
--- openbox-3.4.7.2/data/xsession/openbox-kde-session.in.gdm 2008-02-29 22:18:12.000000000 +0100 --- openbox-3.4.7.2/data/xsession/openbox-kde-session.in.gdm 2008-02-29 22:18:12.000000000 +0100
+++ openbox-3.4.7.2/data/xsession/openbox-kde-session.in 2008-06-10 18:37:26.000000000 +0200 +++ openbox-3.4.7.2/data/xsession/openbox-kde-session.in 2008-06-10 18:37:26.000000000 +0200

@ -0,0 +1,18 @@
diff -up openbox-3.4.7.2/data/xsession/openbox-gnome-session.in.gnomesession openbox-3.4.7.2/data/xsession/openbox-gnome-session.in
--- openbox-3.4.7.2/data/xsession/openbox-gnome-session.in.gnomesession 2008-12-09 18:06:37.000000000 +0100
+++ openbox-3.4.7.2/data/xsession/openbox-gnome-session.in 2008-12-09 19:04:14.000000000 +0100
@@ -11,5 +11,12 @@ fi
xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null
# Run GNOME with Openbox as its window manager
-export WINDOW_MANAGER="@bindir@/openbox"
-exec gnome-session --choose-session=openbox-session "$@"
+SESSION=$(gconftool-2 -g /desktop/gnome/session/default_session 2> /dev/null)
+test -z "$SESSION" && SESSION="[openbox]"
+echo "$SESSION" | grep -q openbox || SESSION="${SESSION%]},openbox]"
+
+OPENBOX_SESSION=$(gconftool-2 -g /desktop/gnome/session/openbox_session 2> /dev/null)
+[ "$SESSION" != "$OPENBOX_SESSION" ] && gconftool-2 -t list --list-type=strings -s \
+ /desktop/gnome/session/openbox_session "$SESSION" 2> /dev/null
+
+exec gnome-session --default-session-key /desktop/gnome/session/openbox_session "$@"

@ -1,6 +1,6 @@
Name: openbox Name: openbox
Version: 3.4.7.2 Version: 3.4.7.2
Release: 6%{?dist} Release: 7%{?dist}
Summary: A highly configurable and standards-compliant X11 window manager Summary: A highly configurable and standards-compliant X11 window manager
Group: User Interface/Desktops Group: User Interface/Desktops
@ -14,6 +14,8 @@ Source4: openbox.desktop
Patch0: openbox-3.4.7.1-autostartdir.patch Patch0: openbox-3.4.7.1-autostartdir.patch
Patch1: openbox-3.4.7.2-gdm.patch Patch1: openbox-3.4.7.2-gdm.patch
Patch2: openbox-3.4.7.2-gnomesession.patch
Patch3: openbox-3.4.7.2-autostartid.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -69,6 +71,8 @@ The %{name}-libs package contains shared libraries used by %{name}.
%setup -q %setup -q
%patch0 -p1 -b .autostartdir %patch0 -p1 -b .autostartdir
%patch1 -p1 -b .gdm %patch1 -p1 -b .gdm
%patch2 -p1 -b .gnomesession
%patch3 -p1 -b .autostartid
%build %build
@ -97,8 +101,6 @@ desktop-file-install --vendor="" \
%find_lang %{name} %find_lang %{name}
rm -f %{buildroot}%{_libdir}/*.la rm -f %{buildroot}%{_libdir}/*.la
rm -rf %{buildroot}%{_datadir}/doc/%{name} rm -rf %{buildroot}%{_datadir}/doc/%{name}
rm -f %{buildroot}%{_datadir}/xsessions/%{name}-gnome.desktop
rm -f %{buildroot}%{_bindir}/%{name}-gnome-session
%clean %clean
@ -141,6 +143,10 @@ rm -rf %{buildroot}
%changelog %changelog
* Tue Dec 09 2008 Miroslav Lichvar <mlichvar@redhat.com> - 3.4.7.2-7
- Restore gnome session script (#474143)
- Use DESKTOP_AUTOSTART_ID to avoid gnome-session registration timeout
* Thu Oct 02 2008 Miroslav Lichvar <mlichvar@redhat.com> - 3.4.7.2-6 * Thu Oct 02 2008 Miroslav Lichvar <mlichvar@redhat.com> - 3.4.7.2-6
- Drop gnome session script (gnome-session no longer supports $WINDOW_MANAGER) - Drop gnome session script (gnome-session no longer supports $WINDOW_MANAGER)
- Add application desktop file to allow starting openbox in gnome-session - Add application desktop file to allow starting openbox in gnome-session

Loading…
Cancel
Save