install dbus systemd service file snippet

flatpak currently installs a gdm env.d and a bash profile.d file to
ensure XDG_DATA_DIRS is set to the right value.  Neither is sufficient
when the dbus daemon is activated as a system --user service.

This commit adds a dbus service file snippet to frob its environment
variable for that case.
tingping/wmclass
Ray Strode 2016-07-26 13:20:02 -04:00
parent 369eab84e7
commit f5ddf78c79
3 changed files with 12 additions and 0 deletions

1
.gitignore vendored
View File

@ -46,6 +46,7 @@ permission-store-dbus.[ch]
flatpak-system-helper
xdg-desktop-portal
*.service
flatpak.conf
flatpak.env
flatpak.sh
document-portal/xdp-dbus.[ch]

View File

@ -133,6 +133,15 @@ flatpak.env: env.d/flatpak.env.in
$(AM_V_GEN) $(SED) -e "s|\@localstatedir\@|$(localstatedir)|" \
-e "s|\@sysconfdir\@|$(sysconfdir)|" $< > $@
dbussnippetdir = $(systemduserunitdir)/dbus.service.d
dbussnippet_DATA = flatpak.conf
EXTRA_DIST += dbus.service.d/flatpak.conf.in
DISTCLEANFILES += flatpak.conf
flatpak.conf: dbus.service.d/flatpak.conf.in
$(AM_V_GEN) $(SED) -e "s|\@localstatedir\@|$(localstatedir)|" \
-e "s|\@sysconfdir\@|$(sysconfdir)|" $< > $@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = flatpak.pc
EXTRA_DIST += flatpak.pc.in

View File

@ -0,0 +1,2 @@
[Service]
Environment=XDG_DATA_DIRS=%h/.local/share/flatpak/exports/share/:@localstatedir@/lib/flatpak/exports/share/:/usr/local/share/:/usr/share/