From e2f7ea87a31dea3f885f1c2894a983b23e4019b8 Mon Sep 17 00:00:00 2001 From: Roland Winklmeier Date: Mon, 9 Oct 2017 09:03:18 +0200 Subject: [PATCH] [MacOS] Write dbus session launchd script during installation DBus session needs to be started from a central place. On Mac OS, the recommended solution is launchd service since all dbus clients will query launchd for the session address first. All other solutions would be hacky. With this script, launchd will start dbus-daemon on demand and provide the enviromental variable DBUS_LAUNCHD_SESSION_BUS_SOCKET. We put this into the user launch agents folder to make it a user session. ref T170 --- installer/installbuilder/project.xml | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/installer/installbuilder/project.xml b/installer/installbuilder/project.xml index 33929ff9f..1b98287da 100644 --- a/installer/installbuilder/project.xml +++ b/installer/installbuilder/project.xml @@ -40,6 +40,51 @@ + + ${user_home_directory}/Library/LaunchAgents/org.freedesktop.dbus-session.plist + utf-8 + + + + + Label + org.freedesktop.dbus-session.plist + + ProgramArguments + + ${installdir}/bin/dbus-daemon + --nofork + --config-file=${installdir}/share/dbus-1/session.conf + + + Sockets + + unix_domain_listener + + SecureSocketWithKey + DBUS_LAUNCHD_SESSION_BUS_SOCKET + + + +]]> + + + osx + + + + + launchctl + load -w ${user_home_directory}/Library/LaunchAgents/org.freedesktop.dbus-session.plist + ${installdir} + + + osx + + + +