From 02c5e3e34238f159e02c3560e28dce8c20ce691d Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 25 Sep 2015 17:07:40 +0100 Subject: [PATCH] Add a systemd user service corresponding to the D-Bus session service When using a systemd user session, this ensures that org.a11y.Bus and its child processes (such as org.a11y.atspi.Registry) are placed in their own cgroup, instead of being treated as part of dbus.service. https://bugzilla.gnome.org/show_bug.cgi?id=755637 --- bus/Makefile.am | 7 +++++++ bus/at-spi-dbus-bus.service.in | 7 +++++++ bus/org.a11y.Bus.service.in | 1 + 3 files changed, 15 insertions(+) create mode 100644 bus/at-spi-dbus-bus.service.in diff --git a/bus/Makefile.am b/bus/Makefile.am index 530d231..d9664ab 100644 --- a/bus/Makefile.am +++ b/bus/Makefile.am @@ -25,13 +25,20 @@ dbusservice_DATA = org.a11y.Bus.service org.a11y.Bus.service: org.a11y.Bus.service.in sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@ +systemd_userdir = $(prefix)/lib/systemd/user +systemd_user_DATA = at-spi-dbus-bus.service +at-spi-dbus-bus.service: at-spi-dbus-bus.service.in Makefile + sed -e $(substitutions) $< > $@.tmp && mv $@.tmp $@ + accessibility.conf: accessibility.conf.in sed -e "s|[@]DATADIR[@]|$(datadir)|" $(srcdir)/$@.in > $@ EXTRA_DIST += org.a11y.Bus.service.in \ + at-spi-dbus-bus.service.in \ accessibility.conf.in DISTCLEANFILES = org.a11y.Bus.service \ + $(systemd_user_DATA) \ accessibility.conf -include $(top_srcdir)/git.mk diff --git a/bus/at-spi-dbus-bus.service.in b/bus/at-spi-dbus-bus.service.in new file mode 100644 index 0000000..28ffa1c --- /dev/null +++ b/bus/at-spi-dbus-bus.service.in @@ -0,0 +1,7 @@ +[Unit] +Description=Accessibility services bus + +[Service] +Type=dbus +BusName=org.a11y.Bus +ExecStart=@libexecdir@/at-spi-bus-launcher diff --git a/bus/org.a11y.Bus.service.in b/bus/org.a11y.Bus.service.in index 60edc28..86724da 100644 --- a/bus/org.a11y.Bus.service.in +++ b/bus/org.a11y.Bus.service.in @@ -1,3 +1,4 @@ [D-BUS Service] Name=org.a11y.Bus Exec=@libexecdir@/at-spi-bus-launcher +SystemdService=at-spi-dbus-bus.service -- 2.7.4