diff options
author | Benjamin Berg <bberg@redhat.com> | 2020-10-15 15:18:35 +0200 |
---|---|---|
committer | Benjamin Berg <benjamin@sipsolutions.net> | 2020-10-15 13:22:44 +0000 |
commit | 10aa1714b05b9834bae7b31e49742baf707b35cb (patch) | |
tree | 0c797981fc121751d656e0cb49b9ca4d486764a0 | |
parent | 647c0af7779757b18708a07b7cfc95e6b1bc79f0 (diff) | |
download | gnome-settings-daemon-10aa1714b05b9834bae7b31e49742baf707b35cb.tar.gz |
power: Avoid automatic logout in GDM/greeter
In GDM sessions (greeter, initial-setup), it does not make sense to
automatically logout. This can happen if the system wide default is
changed to default to the "logout" action.
Note that we already use the RUNNING_UNDER_GDM environment variable in
the keyboard plugin currently. So doing this is likely sane, even if we
probably want a more elegant strategy to detect whether we are in a
"login" session.
-rw-r--r-- | plugins/power/gsd-power-manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c index 0e65bd2a..cecd53f0 100644 --- a/plugins/power/gsd-power-manager.c +++ b/plugins/power/gsd-power-manager.c @@ -985,6 +985,9 @@ static void gnome_session_logout (GsdPowerManager *manager, guint logout_mode) { + if (g_getenv("RUNNING_UNDER_GDM")) + return; + g_dbus_proxy_call (G_DBUS_PROXY (manager->session), "Logout", g_variant_new ("(u)", logout_mode), |