diff options
author | Simon McVittie <smcv@collabora.com> | 2020-12-04 11:11:04 +0000 |
---|---|---|
committer | Daniel Playfair Cal <daniel.playfair.cal@gmail.com> | 2021-02-08 10:01:18 +1100 |
commit | 2781a8684855e4120c9948d8b40880bafafe1b12 (patch) | |
tree | d77a7709cfddb6cd6b3027e3f8620c1923247b6c /service | |
parent | 9f31030aaddb301ff94c6a0e4532e2f14e3b9798 (diff) | |
download | dconf-2781a8684855e4120c9948d8b40880bafafe1b12.tar.gz |
service: Add a systemd unit for D-Bus activation
On systems using systemd --user and
dbus-daemon --session --systemd-activation, this means that dconf
is correctly placed in its own cgroup, instead of being part of
dbus.service's cgroup. This allows it to be controlled by
systemctl --user, have resource limits set and so on.
On other systems (in particular those where systemd is not used at all),
the SystemdService field is ignored and dbus-daemon will continue to
start dconf-service as its own child process ("traditional activation"),
making this change harmless to apply.
Resolves: https://gitlab.gnome.org/GNOME/dconf/-/issues/24
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'service')
-rw-r--r-- | service/ca.desrt.dconf.service.in | 1 | ||||
-rw-r--r-- | service/dconf.service.in | 8 | ||||
-rw-r--r-- | service/meson.build | 9 |
3 files changed, 18 insertions, 0 deletions
diff --git a/service/ca.desrt.dconf.service.in b/service/ca.desrt.dconf.service.in index 369948a..be0b911 100644 --- a/service/ca.desrt.dconf.service.in +++ b/service/ca.desrt.dconf.service.in @@ -1,3 +1,4 @@ [D-BUS Service] Name=ca.desrt.dconf Exec=@libexecdir@/dconf-service +SystemdService=dconf.service diff --git a/service/dconf.service.in b/service/dconf.service.in new file mode 100644 index 0000000..e3c7cef --- /dev/null +++ b/service/dconf.service.in @@ -0,0 +1,8 @@ +[Unit] +Description=User preferences database +Documentation=man:dconf-service(1) + +[Service] +ExecStart=@libexecdir@/dconf-service +Type=dbus +BusName=ca.desrt.dconf diff --git a/service/meson.build b/service/meson.build index 51e3090..a2045e5 100644 --- a/service/meson.build +++ b/service/meson.build @@ -10,6 +10,15 @@ configure_file( install_dir: dbus_session_service_dir, ) +systemd_service = 'dconf.service' + +configure_file( + input: systemd_service + '.in', + output: systemd_service, + configuration: service_conf, + install_dir: systemd_userunitdir, +) + lib_sources = [ 'dconf-blame.c', 'dconf-keyfile-writer.c', |