Blame SOURCES/0001-power-Avoid-automatic-logout-in-GDM-greeter.patch

95b2ff
From 77b52a04c9154a7e7b2434f6c70ba6b4fd84c9f1 Mon Sep 17 00:00:00 2001
95b2ff
From: Benjamin Berg <bberg@redhat.com>
95b2ff
Date: Thu, 15 Oct 2020 15:18:35 +0200
95b2ff
Subject: [PATCH] power: Avoid automatic logout in GDM/greeter
95b2ff
95b2ff
In GDM sessions (greeter, initial-setup), it does not make sense to
95b2ff
automatically logout. This can happen if the system wide default is
95b2ff
changed to default to the "logout" action.
95b2ff
95b2ff
Note that we already use the RUNNING_UNDER_GDM environment variable in
95b2ff
the keyboard plugin currently. So doing this is likely sane, even if we
95b2ff
probably want a more elegant strategy to detect whether we are in a
95b2ff
"login" session.
95b2ff
---
95b2ff
 plugins/power/gsd-power-manager.c | 3 +++
95b2ff
 1 file changed, 3 insertions(+)
95b2ff
95b2ff
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
95b2ff
index e103a8a7..b100ff9e 100644
95b2ff
--- a/plugins/power/gsd-power-manager.c
95b2ff
+++ b/plugins/power/gsd-power-manager.c
95b2ff
@@ -872,6 +872,9 @@ static void
95b2ff
 gnome_session_logout (GsdPowerManager *manager,
95b2ff
                       guint            logout_mode)
95b2ff
 {
95b2ff
+        if (g_getenv("RUNNING_UNDER_GDM"))
95b2ff
+                return;
95b2ff
+
95b2ff
         g_dbus_proxy_call (G_DBUS_PROXY (manager->priv->session),
95b2ff
                            "Logout",
95b2ff
                            g_variant_new ("(u)", logout_mode),
95b2ff
-- 
95b2ff
2.26.2
95b2ff