From 3051b7a294a8b0c468d69f1c578f9eb41313c2e9 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 29 May 2013 13:25:47 -0500 Subject: When we get our name, then start app indicators --- src/application-service-watcher.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'src') diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c index edbf05b..c4fa9b4 100644 --- a/src/application-service-watcher.c +++ b/src/application-service-watcher.c @@ -286,5 +286,32 @@ get_name_cb (DBusGProxy * proxy, guint status, GError * error, gpointer data) return; } + GError * spawn_error = NULL; + gchar * argv[] = { + "initctl", + "--session", + "--user", + "emit", + "--no-wait", + "appindicators-start", + NULL, + }; + + g_spawn_async(NULL, /* Working Directory */ + argv, + NULL, /* environment */ + G_SPAWN_SEARCH_PATH, + NULL, NULL, /* child setup function */ + NULL, /* Pid */ + &spawn_error); + + if (spawn_error != NULL) { + /* NOTE: When we get to the point where we can start + assuming upstart user sessions this can be escillated + to a warning or higher */ + g_debug("Unable to signal appindicators-start to upstart: %s", spawn_error->message); + g_error_free(spawn_error); + } + return; } -- cgit v1.2.3 From fe92d7d922e827c654ba0db27b52b2f35ad5e162 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Wed, 29 May 2013 13:27:51 -0500 Subject: A comment, because comments rock. --- src/application-service-watcher.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/application-service-watcher.c b/src/application-service-watcher.c index c4fa9b4..8c2f539 100644 --- a/src/application-service-watcher.c +++ b/src/application-service-watcher.c @@ -286,6 +286,10 @@ get_name_cb (DBusGProxy * proxy, guint status, GError * error, gpointer data) return; } + /* After we've got the name we can request upstart to trigger + the jobs of any application indicators that need to start + at desktop init time. */ + GError * spawn_error = NULL; gchar * argv[] = { "initctl", -- cgit v1.2.3