- Restore gnome session script (#474143)
- Use DESKTOP_AUTOSTART_ID to avoid gnome-session registration timeoutepel9
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,
|
@ -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 "$@"
|
Loading…
Reference in new issue