diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2015-05-14 16:12:06 +1200 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2015-05-14 16:12:06 +1200 |
commit | 575c10bf301f156f8e23f6288d4ad3b4cfed32f3 (patch) | |
tree | 5d9378f4267b6d7bf3b479a59acd1d45981d103e /src | |
parent | 015c9937df08acb97063ae52e90e92b130e9d167 (diff) | |
download | lightdm-575c10bf301f156f8e23f6288d4ad3b4cfed32f3.tar.gz |
Use new Xmir binary when running X under Unity System Compositor
Diffstat (limited to 'src')
-rw-r--r-- | src/lightdm.c | 2 | ||||
-rw-r--r-- | src/seat-unity.c | 8 | ||||
-rw-r--r-- | src/x-server-local.c | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/lightdm.c b/src/lightdm.c index 61ae3f2c..c04b642c 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -1382,6 +1382,8 @@ main (int argc, char **argv) config_set_string (config_get_instance (), "Seat:*", "pam-greeter-service", "lightdm-greeter"); if (!config_has_key (config_get_instance (), "Seat:*", "xserver-command")) config_set_string (config_get_instance (), "Seat:*", "xserver-command", "X"); + if (!config_has_key (config_get_instance (), "Seat:*", "xmir-command")) + config_set_string (config_get_instance (), "Seat:*", "xmir-command", "Xmir"); if (!config_has_key (config_get_instance (), "Seat:*", "xserver-share")) config_set_boolean (config_get_instance (), "Seat:*", "xserver-share", TRUE); if (!config_has_key (config_get_instance (), "Seat:*", "unity-compositor-command")) diff --git a/src/seat-unity.c b/src/seat-unity.c index 32d30b23..642be0aa 100644 --- a/src/seat-unity.c +++ b/src/seat-unity.c @@ -203,9 +203,11 @@ create_x_server (Seat *seat) x_server = x_server_local_new (); - command = seat_get_string_property (seat, "xserver-command"); - if (command) - x_server_local_set_command (x_server, command); + command = seat_get_string_property (seat, "xmir-command"); + /* Fall back to using X if Xmir is not available as this was the previous way XMir worked */ + if (strcmp (command, "Xmir") == 0 && !g_find_program_in_path ("Xmir")) + command = seat_get_string_property (seat, "xserver-command"); + x_server_local_set_command (x_server, command); id = g_strdup_printf ("x-%d", SEAT_UNITY (seat)->priv->next_x_server_id); SEAT_UNITY (seat)->priv->next_x_server_id++; diff --git a/src/x-server-local.c b/src/x-server-local.c index b6a55aa9..3260585f 100644 --- a/src/x-server-local.c +++ b/src/x-server-local.c @@ -555,7 +555,7 @@ x_server_local_init (XServerLocal *server) { server->priv = G_TYPE_INSTANCE_GET_PRIVATE (server, X_SERVER_LOCAL_TYPE, XServerLocalPrivate); server->priv->vt = -1; - server->priv->command = g_strdup ("X"); + server->priv->command = g_strdup ("Xmir"); } static void |