--- a/src/lightdm-gtk-greeter.c 2014-05-02 11:03:59 +0000 +++ b/src/lightdm-gtk-greeter.c 2014-11-26 15:29:55 +0000 @@ -369,7 +369,7 @@ static void #ifdef START_INDICATOR_SERVICES -init_indicators (GKeyFile* config, GPid* indicator_pid, GPid* spi_pid) +init_indicators (GKeyFile* config, GPid* indicator_pid) #else init_indicators (GKeyFile* config) #endif @@ -385,7 +385,6 @@ #ifdef START_INDICATOR_SERVICES GError *error = NULL; - gchar *AT_SPI_CMD[] = {"/usr/lib/at-spi2-core/at-spi-bus-launcher", "--launch-immediately", NULL}; gchar *INDICATORS_CMD[] = {"init", "--user", "--startup-event", "indicator-services-start", NULL}; #endif @@ -437,10 +436,6 @@ greeter_set_env ("GVFS_DISABLE_FUSE", "1"); #ifdef START_INDICATOR_SERVICES - if (!g_spawn_async (NULL, AT_SPI_CMD, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, spi_pid, &error)) - g_warning ("Failed to run \"at-spi-bus-launcher\": %s", error->message); - g_clear_error (&error); - if (!g_spawn_async (NULL, INDICATORS_CMD, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, indicator_pid, &error)) g_warning ("Failed to run \"indicator-services\": %s", error->message); g_clear_error (&error); @@ -2258,8 +2253,9 @@ Display* display; #ifdef START_INDICATOR_SERVICES - GPid indicator_pid = 0, spi_pid = 0; + GPid indicator_pid = 0; #endif + GPid spi_pid = 0; /* Prevent memory from being swapped out, as we are dealing with passwords */ mlockall (MCL_CURRENT | MCL_FUTURE); @@ -2267,6 +2263,9 @@ /* Disable global menus */ g_unsetenv ("UBUNTU_MENUPROXY"); + /* Prevent starting at-spi bus by Gtk */ + g_setenv ("NO_AT_BRIDGE", "1", TRUE); + /* Initialize i18n */ setlocale (LC_ALL, ""); bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR); @@ -2425,6 +2424,11 @@ g_shell_parse_argv (value, &argp, &a11y_keyboard_command, NULL); g_free (value); + gchar *AT_SPI_CMD[] = {"/usr/lib/at-spi2-core/at-spi-bus-launcher", "--launch-immediately", NULL}; + if (!g_spawn_async (NULL, AT_SPI_CMD, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, &spi_pid, &error)) + g_warning ("Failed to run \"at-spi-bus-launcher\": %s", error->message); + g_clear_error (&error); + builder = gtk_builder_new (); if (!gtk_builder_add_from_string (builder, lightdm_gtk_greeter_ui, lightdm_gtk_greeter_ui_length, &error)) @@ -2516,7 +2520,7 @@ gtk_accel_map_add_entry ("/power/shutdown", GDK_KEY_F4, GDK_MOD1_MASK); #ifdef START_INDICATOR_SERVICES - init_indicators (config, &indicator_pid, &spi_pid); + init_indicators (config, &indicator_pid); #else init_indicators (config); #endif @@ -2784,13 +2788,19 @@ kill (indicator_pid, SIGTERM); waitpid (indicator_pid, NULL, 0); } +#endif + + if (a11y_kbd_pid) + { + kill (a11y_kbd_pid, SIGTERM); + waitpid (a11y_kbd_pid, NULL, 0); + } if (spi_pid) { kill (spi_pid, SIGTERM); waitpid (spi_pid, NULL, 0); } -#endif if (background_pixbuf) g_object_unref (background_pixbuf);