[gnome-session/benzea/systemd-new-session-config] data: Delete the session leader fifo at shutdown time
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-session/benzea/systemd-new-session-config] data: Delete the session leader fifo at shutdown time
- Date: Thu, 9 Apr 2020 13:34:07 +0000 (UTC)
commit 3863351c61d32b0f9cb2bb81daf0f6fb293ba9f9
Author: Benjamin Berg <bberg redhat com>
Date: Thu Apr 9 15:25:02 2020 +0200
data: Delete the session leader fifo at shutdown time
To do so, update and rename the dbus-restart service to also delete the
file. Doing this means that we can check for the existence of the named
fifo (in most cases) to verify that a GNOME managed session is running.
It is not perfect, but good enough for some purposes.
...tart-dbus.service.in => gnome-session-post-shutdown.service.in} | 7 ++++---
data/gnome-session-shutdown.target | 4 ++--
data/meson.build | 2 +-
3 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/data/gnome-session-restart-dbus.service.in b/data/gnome-session-post-shutdown.service.in
similarity index 56%
rename from data/gnome-session-restart-dbus.service.in
rename to data/gnome-session-post-shutdown.service.in
index e90f6bc8..dbb42520 100644
--- a/data/gnome-session-restart-dbus.service.in
+++ b/data/gnome-session-post-shutdown.service.in
@@ -1,10 +1,11 @@
[Unit]
-Description=Restart DBus after GNOME Session shutdown
+Description=GNOME Session shutdown cleanup tasks
# Allow exit.target to start even if this unit is started with replace-irreversibly
-# Also put it into a slice that doesn't have such implicit dependencies
DefaultDependencies=no
[Service]
-Type=notify
+Type=oneshot
+RemainAfterExit=no
ExecStart=@libexecdir@/gnome-session-ctl --restart-dbus
+ExecStart=rm %t/gnome-session-leader-fifo
diff --git a/data/gnome-session-shutdown.target b/data/gnome-session-shutdown.target
index 607dc6e7..84334acb 100644
--- a/data/gnome-session-shutdown.target
+++ b/data/gnome-session-shutdown.target
@@ -28,5 +28,5 @@ StopWhenUnneeded=true
# This should be removed when the relevant services add a
# PartOf=graphical-session.target
# Historic bug: https://bugzilla.gnome.org/show_bug.cgi?id=764029
-Wants=gnome-session-restart-dbus.service
-Before=gnome-session-restart-dbus.service
+Wants=gnome-session-post-shutdown.service
+Before=gnome-session-post-shutdown.service
diff --git a/data/meson.build b/data/meson.build
index 52138eec..d899758a 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -94,7 +94,7 @@ if enable_systemd_session
systemd_service = ['gnome-session-manager@.service',
'gnome-session-signal-init.service',
- 'gnome-session-restart-dbus.service',
+ 'gnome-session-post-shutdown.service',
'gnome-session-monitor.service',
'gnome-session-failed.service']
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]