From 5eb489f3927856c7cdd1753ff3b3aaa8139366bc Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Dec 09 2008 18:25:45 +0000 Subject: - Restore gnome session script (#474143) - Use DESKTOP_AUTOSTART_ID to avoid gnome-session registration timeout --- diff --git a/openbox-3.4.7.2-autostartid.patch b/openbox-3.4.7.2-autostartid.patch new file mode 100644 index 0000000..147f172 --- /dev/null +++ b/openbox-3.4.7.2-autostartid.patch @@ -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, diff --git a/openbox-3.4.7.2-gdm.patch b/openbox-3.4.7.2-gdm.patch index 61cc351..7846948 100644 --- a/openbox-3.4.7.2-gdm.patch +++ b/openbox-3.4.7.2-gdm.patch @@ -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 --- 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 diff --git a/openbox-3.4.7.2-gnomesession.patch b/openbox-3.4.7.2-gnomesession.patch new file mode 100644 index 0000000..42b866f --- /dev/null +++ b/openbox-3.4.7.2-gnomesession.patch @@ -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 "$@" diff --git a/openbox.spec b/openbox.spec index f5246e8..e8b970c 100644 --- a/openbox.spec +++ b/openbox.spec @@ -1,6 +1,6 @@ Name: openbox Version: 3.4.7.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: A highly configurable and standards-compliant X11 window manager Group: User Interface/Desktops @@ -14,6 +14,8 @@ Source4: openbox.desktop Patch0: openbox-3.4.7.1-autostartdir.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) @@ -69,6 +71,8 @@ The %{name}-libs package contains shared libraries used by %{name}. %setup -q %patch0 -p1 -b .autostartdir %patch1 -p1 -b .gdm +%patch2 -p1 -b .gnomesession +%patch3 -p1 -b .autostartid %build @@ -97,8 +101,6 @@ desktop-file-install --vendor="" \ %find_lang %{name} rm -f %{buildroot}%{_libdir}/*.la rm -rf %{buildroot}%{_datadir}/doc/%{name} -rm -f %{buildroot}%{_datadir}/xsessions/%{name}-gnome.desktop -rm -f %{buildroot}%{_bindir}/%{name}-gnome-session %clean @@ -141,6 +143,10 @@ rm -rf %{buildroot} %changelog +* Tue Dec 09 2008 Miroslav Lichvar - 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 - 3.4.7.2-6 - Drop gnome session script (gnome-session no longer supports $WINDOW_MANAGER) - Add application desktop file to allow starting openbox in gnome-session