summaryrefslogtreecommitdiff
path: root/daemon/gdm-manager.c
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2015-11-09 14:25:22 -0500
committerRay Strode <rstrode@redhat.com>2015-11-09 14:28:25 -0500
commit65f560ab551cbbf7d9b6f8298ee5ce125912804a (patch)
tree19591cb19fdc6572377f54abfda529de89044712 /daemon/gdm-manager.c
parent1cc13883d332780e188a12e591c00e36e4501b9e (diff)
downloadgdm-65f560ab551cbbf7d9b6f8298ee5ce125912804a.tar.gz
manager: don't use wayland for autologin if wayland disabled
These days we default to using wayland user sessions if the unless greeter isn't wayland. But in the case of automatic login there is no greeter. This commit makes automatic login ignore wayland sessions if wayland is disabled in the config file. This gives us symetry with the greeter case, and provides a way for users to opt out of wayland. https://bugzilla.gnome.org/show_bug.cgi?id=757715
Diffstat (limited to 'daemon/gdm-manager.c')
-rw-r--r--daemon/gdm-manager.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/daemon/gdm-manager.c b/daemon/gdm-manager.c
index 2c76540f..2ef4f9a6 100644
--- a/daemon/gdm-manager.c
+++ b/daemon/gdm-manager.c
@@ -1327,15 +1327,26 @@ set_up_automatic_login_session (GdmManager *manager,
GdmDisplay *display)
{
GdmSession *session;
+ char *display_session_type = NULL;
gboolean is_initial;
+ gboolean greeter_would_have_been_wayland;
/* 0 is root user; since the daemon talks to the session object
* directly, itself, for automatic login
*/
session = create_embryonic_user_session_for_display (manager, display, 0);
- g_object_get (G_OBJECT (display), "is-initial", &is_initial, NULL);
- g_object_set (G_OBJECT (session), "display-is-initial", is_initial, NULL);
+ g_object_get (G_OBJECT (display),
+ "is-initial", &is_initial,
+ "session-type", &display_session_type,
+ NULL);
+
+ greeter_would_have_been_wayland = g_strcmp0 (display_session_type, "wayland") == 0;
+
+ g_object_set (G_OBJECT (session),
+ "display-is-initial", is_initial,
+ "ignore-wayland", !greeter_would_have_been_wayland,
+ NULL);
g_debug ("GdmManager: Starting automatic login conversation");
gdm_session_start_conversation (session, "gdm-autologin");