Skip to content

Commit 71cfccb

Browse files
authored
plugins: Don't leak DESKTOP_AUTOSTART_ID into child processes (#432)
https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/commit/b8f302dd93483160e05f6473845c923495a2090a https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/merge_requests/92 https://gitlab.gnome.org/GNOME/gnome-settings-daemon/-/issues/379 > This fixes error in applications started through media-keys: > Gtk-WARNING **: 17:48:33.761: Failed to register client: GDBus.Error:org.gnome.SessionManager.AlreadyRegistered: Unable to register client
1 parent 37030ef commit 71cfccb

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

plugins/common/daemon-skeleton-gtk.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ register_with_cinnamon_session (void)
161161
NULL,
162162
(GAsyncReadyCallback) on_client_registered,
163163
NULL);
164+
165+
/* DESKTOP_AUTOSTART_ID must not leak into child processes, because
166+
* it can't be reused. Child processes will not know whether this is
167+
* a genuine value or erroneous already-used value. */
168+
g_unsetenv ("DESKTOP_AUTOSTART_ID");
164169
}
165170

166171
static gboolean

plugins/common/daemon-skeleton.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ register_with_cinnamon_session (GMainLoop *loop)
156156
NULL,
157157
(GAsyncReadyCallback) on_client_registered,
158158
loop);
159+
160+
/* DESKTOP_AUTOSTART_ID must not leak into child processes, because
161+
* it can't be reused. Child processes will not know whether this is
162+
* a genuine value or erroneous already-used value. */
163+
g_unsetenv ("DESKTOP_AUTOSTART_ID");
159164
}
160165

161166
static gboolean

0 commit comments

Comments
 (0)