summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Milone <alberto.milone@canonical.com>2013-10-25 12:24:24 +0200
committerAlberto Milone <alberto.milone@canonical.com>2013-10-25 12:24:24 +0200
commit2f082cb8adbf90faa1c68ecadecf374efc638095 (patch)
tree1a7e4692592d05f77a23bd3802590cccf4c1e853
parent3eb01013e2dc2146802fbb7b28c251053d6c6dcc (diff)
downloadlightdm-2f082cb8adbf90faa1c68ecadecf374efc638095.tar.gz
Add support for a "display-stopped-script" field in lightdm.conf
The "display-stopped-script" field allows us to run a script right after stopping the display server.
-rw-r--r--src/seat.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/seat.c b/src/seat.c
index c3c57336..6cfedaa9 100644
--- a/src/seat.c
+++ b/src/seat.c
@@ -344,6 +344,12 @@ display_server_stopped_cb (DisplayServer *display_server, Seat *seat)
l_debug (seat, "Display server stopped");
+ /* Run a script right after stopping the display server */
+ const gchar *script;
+ script = seat_get_string_property (seat, "display-stopped-script");
+ if (script)
+ run_script (seat, NULL, script, NULL);
+
g_signal_handlers_disconnect_matched (display_server, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, seat);
seat->priv->display_servers = g_list_remove (seat->priv->display_servers, display_server);