DBus on OS X: reintroducing "classical" X11 (auto-)start as a fall-back
Simon McVittie
simon.mcvittie at collabora.co.uk
Tue May 26 03:45:17 PDT 2015
On 21/05/15 09:53, René J.V. Bertin wrote:
> The current DBus implementation for OS X only supports (auto) starting
> through launchd, when the user is logged in a local, "Aqua" session.
D-Bus on OS X can at least theoretically support other transports and
autolaunching mechanisms; my understanding is that the IPC offered by
the Darwin kernel is broadly similar to FreeBSD, so everything that
works on FreeBSD ought to work on Darwin.
<https://bugs.freedesktop.org/show_bug.cgi?id=18013> also mentions X11
autolaunching on OS X.
However, it is entirely possible that a dbus compiled with
--enable-launchd does not gracefully fall back to other possibilities.
The launchd support does not follow the same code paths as X11
autolaunching, and I have never really understood why not. I would be
happy to review tested patches to make them more similar.
X11 autolaunching is poorly understood and not amazingly reliable, so if
it is possible to do so, I would encourage OS X users to arrange for a
$XDG_RUNTIME_DIR as described in
<http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>
to exist, then use $XDG_RUNTIME_DIR/bus as the D-Bus Unix socket, the
same as is done on Linux systems with systemd if dbus >= 1.9.14 is
compiled with --enable-user-bus. dbus >= 1.9.14 can be instructed to
listen on "unix:runtime=yes" to achieve that.
I would also encourage you to write down the semantics that you think
the session bus on OS X should have (preferably in a feature-request bug
report on freedesktop.org Bugzilla) *before* trying to implement them.
One of the major historical problems with X11 autolaunching is that it
addresses a large, vaguely-defined and sometimes conflicting set of
requirements, such that we cannot be confident that any particular
change is not a regression.
--
Simon McVittie
Collabora Ltd. <http://www.collabora.com/>
More information about the dbus
mailing list