Skip to content

Commit

Permalink
Add a systemd user unit for the two D-Bus session services (bug #12236)
Browse files Browse the repository at this point in the history
  • Loading branch information
smcv authored and alexxcons committed Feb 9, 2018
1 parent 23894cd commit ade6805
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Makefile.am
Expand Up @@ -65,7 +65,7 @@ desktop_in_in_files = \
Thunar-bulk-rename.desktop.in.in \
Thunar-folder-handler.desktop.in.in
desktop_in_files = $(desktop_in_in_files:.desktop.in.in=.desktop.in)
%.desktop.in: %.desktop.in.in
%.desktop.in: %.desktop.in.in Makefile
$(AM_V_GEN) $(SED) -e "s,\@HELPERDIR\@,$(HELPER_PATH_PREFIX),g" < $< > $@
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
@INTLTOOL_DESKTOP_RULE@
Expand All @@ -81,14 +81,19 @@ appdata_in_files = thunar.appdata.xml.in
servicedir = $(datadir)/dbus-1/services
service_in_files = org.xfce.FileManager.service.in org.xfce.Thunar.service.in
service_DATA = $(service_in_files:.service.in=.service)
%.service: %.service.in

systemd_userdir = $(prefix)/lib/systemd/user
systemd_user_in_files = thunar.service.in
systemd_user_DATA = $(systemd_user_in_files:.service.in=.service)

%.service: %.service.in Makefile
$(AM_V_GEN) $(SED) -e "s,\@bindir\@,$(bindir),g" < $< > $@

polkit_policydir = $(datadir)/polkit-1/actions
polkit_in_in_files = \
org.xfce.thunar.policy.in.in
polkit_in_files = $(polkit_in_in_files:.policy.in.in=.policy.in)
%.policy.in: %.policy.in.in
%.policy.in: %.policy.in.in Makefile
sed -e "s,\@bindir\@,$(bindir),g" < $< > $@
polkit_policy_DATA = $(polkit_in_files:.policy.in=.policy)
@INTLTOOL_POLICY_RULE@
Expand All @@ -102,6 +107,7 @@ EXTRA_DIST = \
intltool-update.in \
$(desktop_in_in_files) \
$(service_in_files) \
$(systemd_user_in_files) \
$(appdata_in_files) \
$(polkit_in_in_files) \
m4/introspection.m4
Expand All @@ -116,6 +122,7 @@ DISTCLEANFILES = \
$(desktop_in_files) \
$(desktop_DATA) \
$(service_DATA) \
$(systemd_user_DATA) \
$(polkit_in_files) \
$(polkit_policy_DATA)

Expand Down
1 change: 1 addition & 0 deletions org.xfce.FileManager.service.in
@@ -1,3 +1,4 @@
[D-BUS Service]
Name=org.xfce.FileManager
Exec=@bindir@/Thunar --gapplication-service
SystemdService=thunar.service
1 change: 1 addition & 0 deletions org.xfce.Thunar.service.in
@@ -1,3 +1,4 @@
[D-BUS Service]
Name=org.xfce.Thunar
Exec=@bindir@/Thunar --gapplication-service
SystemdService=thunar.service
10 changes: 10 additions & 0 deletions thunar.service.in
@@ -0,0 +1,10 @@
[Unit]
Description=Thunar file manager
Documentation=man:Thunar(1)

[Service]
Type=dbus
ExecStart=@bindir@/Thunar --daemon
# This is the name that is taken second, so by the time this one is taken,
# we know everything is good.
BusName=org.xfce.FileManager

0 comments on commit ade6805

Please sign in to comment.