[gnome-session/benzea/disable-xsmp-on-systemd: 3/4] manager: Disable session saving on systemd managed sessions
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/benzea/disable-xsmp-on-systemd: 3/4] manager: Disable session saving on systemd managed sessions
- Date: Tue, 26 Nov 2019 09:58:43 +0000 (UTC)
commit 8f86fe04d1e636ff306b26ce93596a1b74daaafc
Author: Benjamin Berg <bberg redhat com>
Date: Fri Nov 22 15:04:02 2019 +0100
manager: Disable session saving on systemd managed sessions
Allowing this is problematic as gnome-session would try to restore XSMP
clients that are already started using systemd, resuling in session
failures.
See: #41
gnome-session/gsm-manager.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c
index d41bdcac..6839a02d 100644
--- a/gnome-session/gsm-manager.c
+++ b/gnome-session/gsm-manager.c
@@ -1910,6 +1910,11 @@ on_xsmp_client_register_confirmed (GsmXSMPClient *client,
static gboolean
auto_save_is_enabled (GsmManager *manager)
{
+ /* Note that saving/restoring sessions is not really possible on systemd, as
+ * XSMP clients cannot be reliably mapped to .desktop files. */
+ if (manager->priv->systemd_managed)
+ return FALSE;
+
return g_settings_get_boolean (manager->priv->settings, KEY_AUTOSAVE_ONE_SHOT)
|| g_settings_get_boolean (manager->priv->settings, KEY_AUTOSAVE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]