summaryrefslogtreecommitdiff
path: root/daemon/gdm-session.c
diff options
context:
space:
mode:
authorBenjamin Berg <bberg@redhat.com>2020-04-16 15:17:56 +0200
committerBenjamin Berg <benjamin@sipsolutions.net>2020-04-22 18:23:38 +0000
commitfebeb9a9295fcd47a63c8ccdb41b88387acf8aac (patch)
tree283057354aa4b19b0a43adcff327a1dd52060de5 /daemon/gdm-session.c
parent32646105196ed7a687f3684b69ea544dd01d2ade (diff)
downloadgdm-febeb9a9295fcd47a63c8ccdb41b88387acf8aac.tar.gz
session: Always use separate session bus for greeter sessions
This is a workaround for the fact that we currently need to run multiple greeter sessions in multi-seat environments that use the same user. We should not be doing this in the first place. Doing this effectively prevents GNOME from using a systemd startup, which would cause relevant processes to be outside of the session scope preventing lookups of the logind session from the PID. Instead, we really should be running each of the greeter session as a separate (dynamic) user. But lacking that, this workaround should get multi-seat support up and running again for the time being. See: #526
Diffstat (limited to 'daemon/gdm-session.c')
-rw-r--r--daemon/gdm-session.c26
1 files changed, 18 insertions, 8 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 4e303e70..ca7d98f1 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2900,23 +2900,33 @@ gdm_session_start_session (GdmSession *self,
g_free (command);
} else {
+ /* FIXME:
+ * Always use a separate DBus bus for each greeter session.
+ * Firstly, this means that if we run multiple greeter session
+ * (which we really should not do, but have to currently), then
+ * each one will get its own DBus session bus.
+ * But, we also explicitly do this for seat0, because that way
+ * it cannot make use of systemd to run the GNOME session. This
+ * prevents the session lookup logic from getting confused.
+ * This has a similar effect as passing --builtin to gnome-session.
+ *
+ * We really should not be doing this. But the fix is to use
+ * separate dynamically created users and that requires some
+ * major refactorings.
+ */
if (run_launcher) {
if (is_x11) {
- program = g_strdup_printf (LIBEXECDIR "/gdm-x-session %s\"%s\"",
+ program = g_strdup_printf (LIBEXECDIR "/gdm-x-session %s\"dbus-run-session -- %s\"",
register_session ? "--register-session " : "",
self->selected_program);
} else {
- program = g_strdup_printf (LIBEXECDIR "/gdm-wayland-session %s\"%s\"",
+ program = g_strdup_printf (LIBEXECDIR "/gdm-wayland-session %s\"dbus-run-session -- %s\"",
register_session ? "--register-session " : "",
self->selected_program);
}
} else {
- if (g_strcmp0 (self->display_seat_id, "seat0") != 0) {
- program = g_strdup_printf ("dbus-run-session -- %s",
- self->selected_program);
- } else {
- program = g_strdup (self->selected_program);
- }
+ program = g_strdup_printf ("dbus-run-session -- %s",
+ self->selected_program);
}
}