Commit febeb9a9 authored by Benjamin Berg's avatar Benjamin Berg Committed by Benjamin Berg

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
parent 32646105
Pipeline #172317 passed with stage
in 8 minutes and 12 seconds
- Always use separate session bus for greeter sessions
This runs dbus-run-session, so the binary needs to be available
==============
Version 3.34.1
==============
......
......@@ -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);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment