[gnome-flashback/wip/systemd-user-units] data: add systemd user units



commit 10373bc4d8469cca6a513a6a901e3c99387aa40a
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Aug 15 23:31:19 2019 +0300

    data: add systemd user units

 configure.ac                                       |  1 +
 data/Makefile.am                                   |  1 +
 data/applications/gnome-flashback.desktop.in       |  1 +
 data/systemd/Makefile.am                           | 27 ++++++++++++++++++++++
 data/systemd/gnome-flashback.service.in            | 24 +++++++++++++++++++
 data/systemd/gnome-flashback.target                | 10 ++++++++
 ...gnome-session-x11@gnome-flashback-compiz.target | 18 +++++++++++++++
 ...ome-session-x11@gnome-flashback-metacity.target | 18 +++++++++++++++
 8 files changed, 100 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index 7e61362..0380d79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -285,6 +285,7 @@ AC_CONFIG_FILES([
   data/menus/Makefile
   data/schemas/Makefile
   data/sessions/Makefile
+  data/systemd/Makefile
   data/theme/Makefile
   data/theme/Adwaita/Makefile
   data/theme/HighContrast/Makefile
diff --git a/data/Makefile.am b/data/Makefile.am
index 4479e5b..7fe152b 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -7,6 +7,7 @@ SUBDIRS = \
        menus \
        schemas \
        sessions \
+       systemd \
        theme \
        ui \
        xsessions \
diff --git a/data/applications/gnome-flashback.desktop.in b/data/applications/gnome-flashback.desktop.in
index 35f5405..25d7f83 100644
--- a/data/applications/gnome-flashback.desktop.in
+++ b/data/applications/gnome-flashback.desktop.in
@@ -7,3 +7,4 @@ NoDisplay=true
 X-GNOME-Autostart-Phase=Desktop
 X-GNOME-Autostart-Notify=true
 X-GNOME-AutoRestart=true
+X-GNOME-HiddenUnderSystemd=true
diff --git a/data/systemd/Makefile.am b/data/systemd/Makefile.am
new file mode 100644
index 0000000..dfd2235
--- /dev/null
+++ b/data/systemd/Makefile.am
@@ -0,0 +1,27 @@
+NULL =
+
+service_in_files = gnome-flashback.service.in
+service_files = $(service_in_files:.service.in=.service)
+
+systemduserdir = $(libdir)/systemd/user
+systemduser_DATA = \
+       gnome-flashback.target \
+       gnome-session-x11@gnome-flashback-compiz.target \
+       gnome-session-x11@gnome-flashback-metacity.target \
+       $(service_files) \
+       $(NULL)
+
+%.service: %.service.in
+       $(AM_V_GEN) sed -e 's,[@]bindir[@],$(bindir),g' < $< > $@
+
+EXTRA_DIST = \
+       $(service_in_files) \
+       $(systemduser_DATA) \
+       $(NULL)
+
+CLEANFILES = \
+       $(service_files) \
+       $(xsession_DATA) \
+       $(NULL)
+
+-include $(top_srcdir)/git.mk
diff --git a/data/systemd/gnome-flashback.service.in b/data/systemd/gnome-flashback.service.in
new file mode 100644
index 0000000..2401e3d
--- /dev/null
+++ b/data/systemd/gnome-flashback.service.in
@@ -0,0 +1,24 @@
+[Unit]
+Description=GNOME Flashback
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+CollectMode=inactive-or-failed
+RefuseManualStart=on
+RefuseManualStop=on
+
+After=gnome-session-manager.target
+
+Requisite=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+Before=gnome-session-initialized.target
+
+StartLimitIntervalSec=15s
+StartLimitBurst=3
+
+[Service]
+Type=dbus
+ExecStart=@bindir@/gnome-flashback
+SuccessExitStatus=1
+Restart=always
+RestartSec=0ms
+BusName=org.gnome.Shell
diff --git a/data/systemd/gnome-flashback.target b/data/systemd/gnome-flashback.target
new file mode 100644
index 0000000..fb83514
--- /dev/null
+++ b/data/systemd/gnome-flashback.target
@@ -0,0 +1,10 @@
+[Unit]
+Description=GNOME Flashback
+DefaultDependencies=no
+
+Requisite=gnome-session-initialized.target
+PartOf=gnome-session-initialized.target
+Before=gnome-session-initialized.target
+
+Requires=gnome-flashback.service
+After=gnome-flashback.service
diff --git a/data/systemd/gnome-session-x11@gnome-flashback-compiz.target 
b/data/systemd/gnome-session-x11@gnome-flashback-compiz.target
new file mode 100644
index 0000000..cbfd6f0
--- /dev/null
+++ b/data/systemd/gnome-session-x11@gnome-flashback-compiz.target
@@ -0,0 +1,18 @@
+[Unit]
+Description=GNOME Flashback Session
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+DefaultDependencies=no
+RefuseManualStart=no
+
+Conflicts=shutdown.target gnome-session-shutdown.target
+PartOf=graphical-session.target
+
+BindsTo=gnome-session@.target
+After=gnome-session@.target
+
+BindsTo=gnome-flashback.target
+After=gnome-flashback.target
+
+BindsTo=gnome-session.target
+After=gnome-session.target
diff --git a/data/systemd/gnome-session-x11@gnome-flashback-metacity.target 
b/data/systemd/gnome-session-x11@gnome-flashback-metacity.target
new file mode 100644
index 0000000..cbfd6f0
--- /dev/null
+++ b/data/systemd/gnome-session-x11@gnome-flashback-metacity.target
@@ -0,0 +1,18 @@
+[Unit]
+Description=GNOME Flashback Session
+OnFailure=gnome-session-failed.target
+OnFailureJobMode=replace
+DefaultDependencies=no
+RefuseManualStart=no
+
+Conflicts=shutdown.target gnome-session-shutdown.target
+PartOf=graphical-session.target
+
+BindsTo=gnome-session@.target
+After=gnome-session@.target
+
+BindsTo=gnome-flashback.target
+After=gnome-flashback.target
+
+BindsTo=gnome-session.target
+After=gnome-session.target


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]