Location of system socket

Simon McVittie smcv at collabora.com
Mon Dec 17 12:30:31 UTC 2018

On Sun, 16 Dec 2018 at 17:27:33 -0800, Thiago Macieira wrote:
> On Sunday, 16 December 2018 13:20:04 PST Felipe Gasper wrote:
> > My MacPorts dbus install puts the system socket at
> > /opt/local/var/run/dbus/system_bus_socket. That path is hard-coded into
> > libdbus but doesn’t appear to be available to any other client library.
> > 
> > Is this a bug in the MacPorts installation, then?
> If all libraries agree on whatever the path is, no.

The formal specification is in

Depending how you look at it, you could argue that macOS doesn't really
have a well-known system bus at all, because the well-known system bus is
where you find OS-level services, but your OS vendor (Apple) doesn't use
D-Bus for any of their OS-level services.

The location of the well-known D-Bus system bus socket is really a
feature of the operating system design, not D-Bus, in the same way
that "you can find the executables in /usr/bin" is a feature of the OS
design (which is also untrue in MacPorts). Environments for "foreign"
software built over an existing OS (like Cygwin on Windows and MacPorts
on macOS) are basically half an operating system built on top of a different
operating system, so it's up to the MacPorts maintainers how they design
their half-an-OS. As long as they're consistent (for example configuring
the same system bus socket for libdbus, GLib's GDBus and any other D-Bus
implementations they ship), the result works.

If the MacPorts maintainers are *not* consistent about how they set up
the system bus socket for libdbus and GLib's GDBus, then that's a bug
(or perhaps an unsupported feature, if they don't intend to provide a
system bus) in either their dbus package, their GLib package or both.

Also note that we have considered redefining the interoperable location
of the D-Bus system bus socket on FHS systems to be in /run/dbus (which
is equivalent on most Linux systems), although that plan was spoiled by
the fact that Slackware has both /var/run and /run and they are not
equivalent, so we will need a cleverer plan if we are going to do that:


More information about the dbus mailing list