summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-01-15 13:33:10 +0100
committerStefano Karapetsas <[email protected]>2012-01-15 13:33:10 +0100
commitd877420b26b2eff2d16306e5befd21fa093fa232 (patch)
treeb499bcaff8ad70ee8ebe6bb20540428c73197f10
parent8a462f1358573ff538fb3795df12d6207d6474ac (diff)
downloadmate-session-manager-d877420b26b2eff2d16306e5befd21fa093fa232.tar.bz2
mate-session-manager-d877420b26b2eff2d16306e5befd21fa093fa232.tar.xz
switch user, use GDM if MDM not found (lightDM supports gdmflexiserver too)
-rw-r--r--mate-session/gsm-manager.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mate-session/gsm-manager.c b/mate-session/gsm-manager.c
index cbddf21..eb84b87 100644
--- a/mate-session/gsm-manager.c
+++ b/mate-session/gsm-manager.c
@@ -72,6 +72,9 @@
#define MDM_FLEXISERVER_COMMAND "mdmflexiserver"
#define MDM_FLEXISERVER_ARGS "--startnew Standard"
+#define GDM_FLEXISERVER_COMMAND "gdmflexiserver"
+#define GDM_FLEXISERVER_ARGS "--startnew Standard"
+
#define KEY_LOCKDOWN_DIR "/desktop/mate/lockdown"
#define KEY_LOCK_DISABLE KEY_LOCKDOWN_DIR "/disable_lock_screen"
@@ -935,6 +938,26 @@ manager_switch_user (GsmManager *manager)
if (! res) {
g_debug ("GsmManager: Unable to start MDM greeter: %s", error->message);
g_error_free (error);
+
+ /* MDM not found, so we try to use gdmflexiserver from GDM */
+
+ char *gdm_command;
+
+ gdm_command = g_strdup_printf ("%s %s",
+ GDM_FLEXISERVER_COMMAND,
+ GDM_FLEXISERVER_ARGS);
+
+ error = NULL;
+ res = gdk_spawn_command_line_on_screen (gdk_screen_get_default (),
+ gdm_command,
+ &error);
+
+ g_free (gdm_command);
+
+ if (! res) {
+ g_debug ("GsmManager: Unable to start GDM greeter: %s", error->message);
+ g_error_free (error);
+ }
}
}