The default session.conf for DBus on Windows (https://code.google.com/p/dbus-windows-installer/downloads/list) uses <listen>autolaunch:scope=install-path</listen>
which, as the name implies, uses the current path of the dbus-daemon executable to somehow determine the session address.
Is there a way to specify an explicit path instead? perhaps something with tcp:
?
After many attempts, I have found the solution. Even though the 1.4.3 version of DBus for Windows that is (at least for now) available at https://code.google.com/p/dbus-windows-installer/downloads/list is quite old, it does in fact support tcp:
syntax.
Installing DBus-Windows-Installer-1.4.1-2.exe
does two things:
C:\Program Files (x86)\DBus
C:\Program Files (x86)\DBus\bin
to the %PATH%
Having the latter is necessary so that your application can access DBus DLLs and EXEs at runtime. To make this installation use the tcp:
syntax, you have to
C:\Program Files (x86)\DBus\etc\session.conf
to <listen>tcp:host=localhost,port=54321,family=ipv4</listen>
C:\Program Files (x86)\DBus\bin\dbus-env.bat
to set DBUS_SESSION_BUS_ADDRESS=tcp:host=localhost,port=54321,family=ipv4
dbus-env.bat
and then run dbus-daemon.exe --session
dbus-env.bat
and then run dbus-monitor.exe --session
dbus-env.bat
and then actually runs your applicationAs I said above, DBus 1.4.3 is quite old. In fact, according to https://code.google.com/p/support/wiki/ReadOnlyTransition it might not even be available for download soon. At the time of this writing, the latest stable branch is 1.10. So, here are the instructions for building your own latest DBus
Install CMake
Get libexpat
nmake install
to install to C:\Program Files (x86)\DBus
or you can make a distributable "deploy package" by
<listen>tcp:host=localhost,port=54321,family=ipv4</listen>
c:\temp\dbus-deploy\bin\dbus-env.bat
to set DBUS_SESSION_BUS_ADDRESS=tcp:host=localhost,port=54321,family=ipv4