I've started using dbus on OSX, and OSX sets the environment variable TMPDIR for each user as a temporary directory for each users session. The configure script for DBUS picks up on the fact that TMPDIR is defined, and it sets this directory as the target directory for the session <listen> named pipe. This has two problems:
(1) other users do not have the same temporary directory as I do
(2) my temporary directory will change with each login (I believe) and certainly with each reboot
To resolve these problems, I introduced shell expansion to <listen>, but only when the "expand_env" attribute is set to "yes". So under Mac OSX, the session.conf file can contain:
All shell variables must be defined and only the "$(NAME)" syntax is supported. Backslash can be used to escape characters.
The only thing I've left undone is adding a "unsupported" stub or something similar for non-Unix platforms. Attached is a tarfile with the files I modified (these modifications were against version 1.1.20).
Please consider adding this feature to the next version of DBUS.
See also Bug #14259 which adds explicit support for Mac OS X to DBus. I believe once that bug is finished this change will not be necessary.
*** This bug has been marked as a duplicate of bug 14259 ***