summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorBenjamin Reed <rangerrick@befunk.com>2009-07-19 11:45:34 -0400
committerRalf Habacker <ralf.habacker@freenet.de>2010-12-06 21:33:14 +0100
commitf1b9aac417d8fb716d6ed19128fe429e8a41adba (patch)
tree48684c21f9471938e45f4ad2bde37ef593c9c18b /bus
parenteb66c0a9c001ea08793b38470d12611ffaafa436 (diff)
Enable launchd.
This patch enables support for Mac OS X's launch daemon for startup as well as sharing of the DBus session bus environment. It includes a LaunchAgent plist for automatic start of the session bus.
Diffstat (limited to 'bus')
-rw-r--r--bus/Makefile.am8
-rw-r--r--bus/org.freedesktop.dbus-session.plist.in31
2 files changed, 38 insertions, 1 deletions
diff --git a/bus/Makefile.am b/bus/Makefile.am
index 17c0df8f..efa8ab5b 100644
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
@@ -9,12 +9,18 @@ EFENCE=
CONFIG_IN_FILES= \
session.conf.in \
- system.conf.in
+ system.conf.in \
+ org.freedesktop.dbus-session.plist.in
config_DATA= \
session.conf \
system.conf
+if DBUS_ENABLE_LAUNCHD
+agentdir=$(LAUNCHD_AGENT_DIR)
+agent_DATA=org.freedesktop.dbus-session.plist
+endif
+
if DBUS_USE_LIBXML
XML_SOURCES=config-loader-libxml.c
endif
diff --git a/bus/org.freedesktop.dbus-session.plist.in b/bus/org.freedesktop.dbus-session.plist.in
new file mode 100644
index 00000000..ac5a9d45
--- /dev/null
+++ b/bus/org.freedesktop.dbus-session.plist.in
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>Label</key>
+ <string>org.freedesktop.dbus-session</string>
+
+ <key>ServiceIPC</key>
+ <true/>
+
+ <!-- bug in 10.4's launchd - on-demand loading does not work -->
+ <key>OnDemand</key>
+ <false />
+
+ <key>ProgramArguments</key>
+ <array>
+ <string>@DBUS_DAEMONDIR@/dbus-daemon</string>
+ <string>--nofork</string>
+ <string>--session</string>
+ </array>
+
+ <key>Sockets</key>
+ <dict>
+ <key>unix_domain_listener</key>
+ <dict>
+ <key>SecureSocketWithKey</key>
+ <string>DBUS_LAUNCHD_SESSION_BUS_SOCKET</string>
+ </dict>
+ </dict>
+</dict>
+</plist>