[gdm/benzea/fix-multiple-greeter-sessions] launch-environment: Force non-systemd startup for greeter sessions



commit 2c21bc71a790488a7fa1656479c9ebf69845ca1e
Author: Benjamin Berg <bberg redhat com>
Date:   Thu Apr 16 15:17:56 2020 +0200

    launch-environment: Force non-systemd startup 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.
    
    Unfortunately, if we let GNOME start using systemd, then we'll make
    wrong guesses about which session a PID belongs to. To avoid this, we
    need all sessions to run inside their corresponding scope rather than
    through systemd outside of any session scope.
    
    See: #526

 daemon/gdm-launch-environment.c | 4 ++++
 daemon/gdm-session.c            | 2 ++
 2 files changed, 6 insertions(+)
---
diff --git a/daemon/gdm-launch-environment.c b/daemon/gdm-launch-environment.c
index feccf057..190a6d54 100644
--- a/daemon/gdm-launch-environment.c
+++ b/daemon/gdm-launch-environment.c
@@ -921,6 +921,10 @@ create_gnome_session_environment (const char *session_id,
         g_ptr_array_add (args, "--autostart");
         g_ptr_array_add (args, DATADIR "/gdm/greeter/autostart");
 
+        /* Force non-systemd startup;
+         * together with dbus-run-session it allows multiple GDM greeters */
+        g_ptr_array_add (args, "--builtin");
+
         if (debug) {
                 g_ptr_array_add (args, "--debug");
         }
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index 4e303e70..073d31f2 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2911,6 +2911,8 @@ gdm_session_start_session (GdmSession *self,
                                                            self->selected_program);
                         }
                 } else {
+                        /* NOTE: This only works because we also force non-systemd
+                         *       sessions for the greeter. */
                         if (g_strcmp0 (self->display_seat_id, "seat0") != 0) {
                                 program = g_strdup_printf ("dbus-run-session -- %s",
                                                            self->selected_program);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]