|
|
c90517 |
From bd1bcea8be7b551da17ee5846ab968aacee322b7 Mon Sep 17 00:00:00 2001
|
|
|
c90517 |
From: Ray Strode <rstrode@redhat.com>
|
|
|
c90517 |
Date: Fri, 22 Jun 2018 14:55:39 -0400
|
|
|
c90517 |
Subject: [PATCH 10/48] manager: start login screen if old one is finished
|
|
|
c90517 |
|
|
|
c90517 |
Since commit 22c332ba we try to start a login screen if we end up
|
|
|
c90517 |
on an empty VT and there isn't one running.
|
|
|
c90517 |
|
|
|
c90517 |
Unfortunately the check for "is on an empty VT" is a little busted.
|
|
|
c90517 |
It counts the VT has non-empty if there's a display associated with
|
|
|
c90517 |
it, even if that display is in the FINISHED state about to be
|
|
|
c90517 |
reaped.
|
|
|
c90517 |
|
|
|
c90517 |
That means, in some cases, we'll still leave the user on an empty
|
|
|
c90517 |
VT with no login screen.
|
|
|
c90517 |
|
|
|
c90517 |
This commit addresses the problem by explicitly checking for
|
|
|
c90517 |
FINISHED displays, and proceeding even in their presense.
|
|
|
c90517 |
---
|
|
|
c90517 |
daemon/gdm-manager.c | 2 +-
|
|
|
c90517 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
c90517 |
|
|
|
c90517 |
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
|
|
|
c90517 |
index a4dad92ee..a6f13dec7 100644
|
|
|
c90517 |
--- a/daemon/gdm-manager.c
|
|
|
c90517 |
+++ b/daemon/gdm-manager.c
|
|
|
c90517 |
@@ -1444,61 +1444,61 @@ activate_login_window_session_on_seat (GdmManager *self,
|
|
|
c90517 |
return;
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
if (session_id) {
|
|
|
c90517 |
activate_session_id (self, seat_id, session_id);
|
|
|
c90517 |
g_free (session_id);
|
|
|
c90517 |
}
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
static void
|
|
|
c90517 |
maybe_activate_other_session (GdmManager *self,
|
|
|
c90517 |
GdmDisplay *old_display)
|
|
|
c90517 |
{
|
|
|
c90517 |
char *seat_id = NULL;
|
|
|
c90517 |
char *session_id = NULL;
|
|
|
c90517 |
int ret;
|
|
|
c90517 |
|
|
|
c90517 |
g_object_get (G_OBJECT (old_display),
|
|
|
c90517 |
"seat-id", &seat_id,
|
|
|
c90517 |
NULL);
|
|
|
c90517 |
|
|
|
c90517 |
ret = sd_seat_get_active (seat_id, &session_id, NULL);
|
|
|
c90517 |
|
|
|
c90517 |
if (ret == 0) {
|
|
|
c90517 |
GdmDisplay *display;
|
|
|
c90517 |
|
|
|
c90517 |
display = gdm_display_store_find (self->priv->display_store,
|
|
|
c90517 |
lookup_by_session_id,
|
|
|
c90517 |
(gpointer) session_id);
|
|
|
c90517 |
|
|
|
c90517 |
- if (display == NULL) {
|
|
|
c90517 |
+ if (display == NULL || gdm_display_get_status (display) == GDM_DISPLAY_FINISHED) {
|
|
|
c90517 |
activate_login_window_session_on_seat (self, seat_id);
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
g_free (session_id);
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
g_free (seat_id);
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
static const char *
|
|
|
c90517 |
get_username_for_greeter_display (GdmManager *manager,
|
|
|
c90517 |
GdmDisplay *display)
|
|
|
c90517 |
{
|
|
|
c90517 |
gboolean doing_initial_setup = FALSE;
|
|
|
c90517 |
|
|
|
c90517 |
g_object_get (G_OBJECT (display),
|
|
|
c90517 |
"doing-initial-setup", &doing_initial_setup,
|
|
|
c90517 |
NULL);
|
|
|
c90517 |
|
|
|
c90517 |
if (doing_initial_setup) {
|
|
|
c90517 |
return INITIAL_SETUP_USERNAME;
|
|
|
c90517 |
} else {
|
|
|
c90517 |
return GDM_USERNAME;
|
|
|
c90517 |
}
|
|
|
c90517 |
}
|
|
|
c90517 |
|
|
|
c90517 |
static void
|
|
|
c90517 |
set_up_automatic_login_session (GdmManager *manager,
|
|
|
c90517 |
GdmDisplay *display)
|
|
|
c90517 |
{
|
|
|
c90517 |
--
|
|
|
c90517 |
2.26.0
|
|
|
c90517 |
|