Comment 11 for bug 1633520

Revision history for this message
In , Michael Terry (michael-terry) wrote :

Created attachment 127303
proposed patch

It would be nice if DBus added support for a runtime relocatable root in Unix. i.e. at runtime, be able to be run from /opt/dbus/ or some such, without having that be a compile-time prefix.

I notice the Windows version has some basic support for this. Detecting its installation directory and treating paths as relative to that.

My specific use case is testing a snap [1] of a full desktop environment. This bundled in dbus and session services and all sorts of things. The session DBus was trying to activate services with their compile-time hardcoded paths and not finding them.

And I bet similar use cases exist.

The plumbing already exists to fix those paths up, thanks to the Windows support.

So I threw together a patch for the Unix side of things, to listen to the new variable DBUS_ROOT. If you prefer a different env name, let me know.

[1] http://snapcraft.io/