From 7726c81db92d2339fc468ed41c967f5412db66ed Mon Sep 17 00:00:00 2001
From: Ray Strode <rstrode@redhat.com>
Date: Wed, 6 Feb 2019 16:14:52 -0500
Subject: [PATCH] manager: don't kill timed login session immediately after it
 starts

At the moment GDM is misidentifying timed login sessions as if
they are automatic login sessions.  That leads to their displays
getting killed sometimes shortly after log in.

This commit corrects the check, so that timed login sessions aren't
treated as autologin sessions.
---
 daemon/gdm-manager.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 4d2ad9dec..dbf64473a 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1683,7 +1683,8 @@ on_start_user_session (StartUserSessionOperation *operation)
                                                  session_id);
 
 
-                if (g_strcmp0 (operation->service_name, "gdm-autologin") == 0) {
+                if (g_strcmp0 (operation->service_name, "gdm-autologin") == 0 &&
+	            !gdm_session_client_is_connected (operation->session)) {
                         /* remove the unused prepared greeter display since we're not going
                          * to have a greeter */
                         gdm_display_store_remove (self->priv->display_store, display);
-- 
GitLab

