summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Matos <tiagomatos@gmail.com>2016-05-25 11:21:09 +0900
committerfujiwarat <takao.fujiwara1@gmail.com>2016-05-25 11:21:09 +0900
commit84c18f1d382548c52138822a11473d2dac79e485 (patch)
treeec65c75ee534665bee565103c103278806522b5d
parent0432aa66b8728bc266da3c2cca84587bc44b3557 (diff)
downloadibus-84c18f1d382548c52138822a11473d2dac79e485.tar.gz
Install a DBus service file
With the transition to user scoped DBus sessions (vs. login sessions) there's a need to start ibus-daemon via DBus activation so that the process gets properly tracked and disposed of when the login session ends. Otherwise the ibus-daemon process lingers on and keeps the whole login session up. We already connect and own a well known name on DBus. The remaining missing piece is the DBus service file which we introduce here. BUG=https://github.com/ibus/ibus/pull/1853 R=Shawn.P.Huang@gmail.com Review URL: https://codereview.appspot.com/295340043 Patch from Rui Matos <tiagomatos@gmail.com>.
-rw-r--r--bus/Makefile.am11
-rw-r--r--bus/org.freedesktop.IBus.service.in3
2 files changed, 14 insertions, 0 deletions
diff --git a/bus/Makefile.am b/bus/Makefile.am
index 26cb2f88..4dabacf5 100644
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
@@ -174,4 +174,15 @@ man_onedir = $(mandir)/man1
%.1.gz: %.1
$(AM_V_GEN) gzip -c $< > $@.tmp && mv $@.tmp $@
+
+dbusservice_in_files = org.freedesktop.IBus.service.in
+dbusservice_DATA = $(dbusservice_in_files:.service.in=.service)
+dbusservicedir=${datadir}/dbus-1/services
+
+org.freedesktop.IBus.service: org.freedesktop.IBus.service.in
+ $(AM_V_GEN) sed -e "s|\@bindir\@|$(bindir)|" $< > $@.tmp && mv $@.tmp $@
+
+EXTRA_DIST += $(dbusservice_in_files)
+CLEANFILES += $(dbusservice_DATA)
+
-include $(top_srcdir)/git.mk
diff --git a/bus/org.freedesktop.IBus.service.in b/bus/org.freedesktop.IBus.service.in
new file mode 100644
index 00000000..cc888342
--- /dev/null
+++ b/bus/org.freedesktop.IBus.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.freedesktop.IBus
+Exec=@bindir@/ibus-daemon --replace --xim --panel disable