[gdm/wip/xserver-in-session: 12/19] session: support GDM_SESSION_DISPLAY_MODE_LOGIND_MANAGED for X sessions



commit cb40a7258318bcb0a5e1eb0f4f38f3a640351cf2
Author: Ray Strode <rstrode redhat com>
Date:   Mon Jan 19 19:11:17 2015 -0500

    session: support GDM_SESSION_DISPLAY_MODE_LOGIND_MANAGED for X sessions
    
    Now that we have a utility for starting an X server from within the
    user session, we can support the LOGIND_MANAGED display mode for X sessions,
    in a similar way to how we support wayland sessions on a new vt.
    
    This commit adds the plumbing necessary to use the new tool.

 daemon/gdm-session.c |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 deletions(-)
---
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c
index ed921ea..dfd3c07 100644
--- a/daemon/gdm-session.c
+++ b/daemon/gdm-session.c
@@ -2619,12 +2619,33 @@ gdm_session_start_session (GdmSession *self,
         stop_all_other_conversations (self, conversation, FALSE);
 
         if (self->priv->selected_program == NULL) {
+                GdmSessionDisplayMode display_mode;
+                gboolean              is_x11 = TRUE;
+                gboolean              run_launcher = FALSE;
+                gboolean              run_xsession_script;
+
                 command = get_session_command (self);
 
-                if (gdm_session_bypasses_xsession (self)) {
-                        program = g_strdup (command);
-                } else {
+                display_mode = gdm_session_get_display_mode (self);
+
+#ifdef ENABLE_WAYLAND_SUPPORT
+                is_x11 = !gdm_session_is_wayland_session (self);
+#endif
+
+                if (is_x11 && display_mode == GDM_SESSION_DISPLAY_MODE_LOGIND_MANAGED) {
+                        run_launcher = TRUE;
+                }
+
+                run_xsession_script = !gdm_session_bypasses_xsession (self);
+
+                if (run_launcher) {
+                        program = g_strdup_printf (LIBEXECDIR "/gdm-x-session %s\"%s\"",
+                                                   run_xsession_script? "--run-script " : "",
+                                                   command);
+                } else if (run_xsession_script) {
                         program = g_strdup_printf (GDMCONFDIR "/Xsession \"%s\"", command);
+                } else {
+                        program = g_strdup (command);
                 }
 
                 g_free (command);


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