From: Simon McVittie Date: Mon, 28 Sep 2015 17:01:36 +0100 Subject: Add a systemd user unit corresponding to the D-Bus session service This lets systemd put xfconfd in its own cgroup, instead of treating it as part of dbus.service. --- xfconfd/Makefile.am | 10 ++++++++-- xfconfd/org.xfce.Xfconf.service.in | 1 + xfconfd/xfconfd.service.in | 7 +++++++ 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 xfconfd/xfconfd.service.in diff --git a/xfconfd/Makefile.am b/xfconfd/Makefile.am index 6983c58..04a4777 100644 --- a/xfconfd/Makefile.am +++ b/xfconfd/Makefile.am @@ -60,16 +60,22 @@ servicedir = $(datadir)/dbus-1/services service_in_files = org.xfce.Xfconf.service.in service_DATA = $(service_in_files:.service.in=.service) +systemd_userdir = $(prefix)/lib/systemd/user +systemd_user_in_files = xfconfd.service.in +systemd_user_DATA = $(systemd_user_in_files:.service.in=.service) + %.service: %.service.in $(AM_V_GEN) sed -e "s,\@HELPERDIR\@,$(HELPER_PATH_PREFIX),g" < $< > $@ CLEANFILES = \ - $(service_DATA) + $(service_DATA) \ + $(systemd_user_DATA) EXTRA_DIST = \ xfconf-backend-perchannel-xml.c \ xfconf-backend-perchannel-xml.h \ - $(service_in_files) + $(service_in_files) \ + $(systemd_user_in_files) if MAINTAINER_MODE diff --git a/xfconfd/org.xfce.Xfconf.service.in b/xfconfd/org.xfce.Xfconf.service.in index 58f6680..80fc39c 100644 --- a/xfconfd/org.xfce.Xfconf.service.in +++ b/xfconfd/org.xfce.Xfconf.service.in @@ -1,3 +1,4 @@ [D-BUS Service] Name=org.xfce.Xfconf Exec=@HELPERDIR@/xfce4/xfconf/xfconfd +SystemdService=xfconfd.service diff --git a/xfconfd/xfconfd.service.in b/xfconfd/xfconfd.service.in new file mode 100644 index 0000000..152efac --- /dev/null +++ b/xfconfd/xfconfd.service.in @@ -0,0 +1,7 @@ +[Unit] +Description=XFCE configuration service + +[Service] +Type=dbus +BusName=org.xfce.Xfconf +ExecStart=@HELPERDIR@/xfce4/xfconf/xfconfd