diff options
author | Ray Strode <rstrode@redhat.com> | 2015-01-19 19:11:17 -0500 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-02-16 23:36:04 -0500 |
commit | faa9d933d8dfef5e4f3f3f8cb54995e6505546ec (patch) | |
tree | 74018b24532921f9f3065d5969882f37c7926600 | |
parent | 26c8adea07f19ddc79995103e44394b57722f869 (diff) | |
download | gdm-faa9d933d8dfef5e4f3f3f8cb54995e6505546ec.tar.gz |
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.
-rw-r--r-- | daemon/gdm-session.c | 38 |
1 files changed, 36 insertions, 2 deletions
diff --git a/daemon/gdm-session.c b/daemon/gdm-session.c index c16d84b7..aa4bf136 100644 --- a/daemon/gdm-session.c +++ b/daemon/gdm-session.c @@ -54,6 +54,9 @@ #include "gdm-session-worker-glue.h" #include "gdm-common.h" +#include "gdm-settings-direct.h" +#include "gdm-settings-keys.h" + #define GDM_SESSION_DBUS_ERROR_CANCEL "org.gnome.DisplayManager.Session.Error.Cancel" #define GDM_SESSION_DBUS_OBJECT_PATH "/org/gnome/DisplayManager/Session" @@ -2560,12 +2563,43 @@ 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 allow_remote_connections = FALSE; + gboolean run_xsession_script; + command = get_session_command (self); - if (gdm_session_bypasses_xsession (self)) { - program = g_strdup (command); + 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 (self->priv->display_is_local) { + gboolean disallow_tcp = TRUE; + gdm_settings_direct_get_boolean (GDM_KEY_DISALLOW_TCP, &disallow_tcp); + allow_remote_connections = !disallow_tcp; } else { + allow_remote_connections = TRUE; + } + + if (run_launcher) { + program = g_strdup_printf (LIBEXECDIR "/gdm-x-session %s %s\"%s\"", + run_xsession_script? "--run-script " : "", + allow_remote_connections? "--allow-remote-connections " : "", + command); + } else if (run_xsession_script) { program = g_strdup_printf (GDMCONFDIR "/Xsession \"%s\"", command); + } else { + program = g_strdup (command); } g_free (command); |