Deploying DBus on OSX

Pablo Martí Gamboa pmarti at
Fri May 21 02:20:45 PDT 2010

Hi all,

I would like to discuss DBus deployment experiences/tips on OSX. More and
more apps
from the OSS community depend on DBus for IPC, and a lot of developers would
like to
have their apps working on OSX. At the moment (AFAIK) unless you are a C#
-because of ndesk-dbus- you are pretty much out of luck. I'll explain

There are two blessed ways of installing apps on OSX

 - Double-click on a .pkg which installs a packaged directory, this is the
install method more
similar to the Linux way of installing packages.[0]
 - Drag and Drop to the Applications folder. is just
a collection of
dirs, executables and libraries that bundles all its dependencies. The
executables and libraries
have been modified with the otool[1] library so they look for their linked
libraries in a path relative
to the main executable of This makes relocatable,
so it can live
anywhere in your FS and will still work.

Being D&D the preferred one in the OSX world.

Why you are out of luck? Well, deploying plain DBus poses a number of
challenges on OSX:

 - DBus expects having a $prefix/var/lib/machine-id present at startup, if
you compiled DBus
on /opt/foo, and relocated your libs and binaries with otool, is not going
to work without further
user interaction (like having him creating /opt/foo and chown'ing it)
- DBus expects having a $prefix/etc/dbus/{session,system}.d and
leading to further interaction of the user...

I know that this requirements are key to how DBus works (security and all),
I was just wondering
if anyone could share any tips/advices regarding DBus deployment on OSX. Is
it even possible to deploy
a self-contained DBus-powered app on OSX? The day that happens, we'll see
more and more OSS apps
in the OSX land.

For now I'm using packagemaker and distributing my application as a .pkg and
restricting the ability of the
user to specify the install path (otherwise I would face the same problems)

PS: None of this problems would be solved by the lingering patches for OSX
in bugzilla[2]


Thanks a lot for your time and insights

All the best,

Pablo Martí
python -c "print '706d617267616d40676d61696c2e636f6d'.decode('hex')"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the dbus mailing list