diff -Nru xfce4-indicator-plugin-2.3.3/debian/changelog xfce4-indicator-plugin-2.3.3/debian/changelog --- xfce4-indicator-plugin-2.3.3/debian/changelog 2016-12-09 13:58:28.000000000 +0000 +++ xfce4-indicator-plugin-2.3.3/debian/changelog 2016-12-22 15:42:44.000000000 +0000 @@ -1,3 +1,10 @@ +xfce4-indicator-plugin (2.3.3-0ubuntu6) zesty; urgency=medium + + * Add systemd target for xfce4 indicators, and start/stop them using + systemctl. LP: #1648889 + + -- Dimitri John Ledkov Thu, 22 Dec 2016 15:29:15 +0000 + xfce4-indicator-plugin (2.3.3-0ubuntu5) zesty; urgency=medium * Drop upstart patch. diff -Nru xfce4-indicator-plugin-2.3.3/debian/install xfce4-indicator-plugin-2.3.3/debian/install --- xfce4-indicator-plugin-2.3.3/debian/install 1970-01-01 00:00:00.000000000 +0000 +++ xfce4-indicator-plugin-2.3.3/debian/install 2016-12-22 15:42:26.000000000 +0000 @@ -0,0 +1 @@ +debian/user/xfce4-indicator-plugin.target usr/lib/systemd/user/ diff -Nru xfce4-indicator-plugin-2.3.3/debian/patches/01_systemd-init.patch xfce4-indicator-plugin-2.3.3/debian/patches/01_systemd-init.patch --- xfce4-indicator-plugin-2.3.3/debian/patches/01_systemd-init.patch 1970-01-01 00:00:00.000000000 +0000 +++ xfce4-indicator-plugin-2.3.3/debian/patches/01_systemd-init.patch 2016-12-22 15:31:05.000000000 +0000 @@ -0,0 +1,40 @@ +Description: Start and stop indicator services with systemd + Basedon previous upstart patch +Origin: other, http://git.xfce.org/users/ajb/xfce4-indicator-plugin/commit/?h=upstart-init-3&id=baa04878aaf5f688f9e01507696e54062cc5dc55 +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/xfce4-indicator-plugin/+bug/1302571 +--- + +--- a/panel-plugin/indicator.c ++++ b/panel-plugin/indicator.c +@@ -149,6 +149,15 @@ + dialog = g_object_get_data (G_OBJECT (plugin), "dialog"); + if (G_UNLIKELY (dialog != NULL)) + gtk_widget_destroy (dialog); ++ ++ gchar *INDICATORS_CMD[] = {"systemctl", "--user", "stop", "indicator-*.service", NULL}; ++ GError *error = NULL; ++ ++ if (!g_spawn_async (NULL, INDICATORS_CMD, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error)) ++ { ++ g_warning ("Error stopping indicators: %s", error->message); ++ g_clear_error (&error); ++ } + } + + +@@ -314,6 +323,15 @@ + indicator_load_services (indicator); + #endif + ++ gchar *INDICATORS_CMD[] = {"systemctl", "--user", "start", "xfce4-indicator-plugin.target", NULL}; ++ GError *error = NULL; ++ ++ if (!g_spawn_async (NULL, INDICATORS_CMD, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, &error)) ++ { ++ g_warning ("Error starting systemd target for indicators: %s", error->message); ++ g_clear_error (&error); ++ } ++ + if (indicator->indicator_count == 0) { + /* A label to allow for click through */ + indicator->item = xfce_indicator_button_new (NULL, diff -Nru xfce4-indicator-plugin-2.3.3/debian/patches/series xfce4-indicator-plugin-2.3.3/debian/patches/series --- xfce4-indicator-plugin-2.3.3/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ xfce4-indicator-plugin-2.3.3/debian/patches/series 2016-12-22 15:14:33.000000000 +0000 @@ -0,0 +1 @@ +01_systemd-init.patch diff -Nru xfce4-indicator-plugin-2.3.3/debian/user/xfce4-indicator-plugin.target xfce4-indicator-plugin-2.3.3/debian/user/xfce4-indicator-plugin.target --- xfce4-indicator-plugin-2.3.3/debian/user/xfce4-indicator-plugin.target 1970-01-01 00:00:00.000000000 +0000 +++ xfce4-indicator-plugin-2.3.3/debian/user/xfce4-indicator-plugin.target 2016-12-22 15:28:37.000000000 +0000 @@ -0,0 +1,11 @@ +[Unit] +Description=Target to start indicators for the xfce4-indicator-plugin +Wants=indicator-application.service +Wants=indicator-bluetooth.service +Wants=indicator-datetime.service +Wants=indicator-keyboard.service +Wants=indicator-messages.service +Wants=indicator-power.service +Wants=indicator-printers.service +Wants=indicator-session.service +Wants=indicator-sound.service