D-Bus windows help

Jesper Dam jalf at medical-insight.com
Tue Jul 10 00:14:28 PDT 2012

All we did to get it working was change CMakeLists.txt to set the 
default address as autolaunch: instead of nonce-tcp:
(We haven't appended Local\\ to the cDBusDaemonAddressInfo value, and 
it's worked perfectly for us on Win7)

That was really all it took to get it running for us. I haven't looked 
into which address the daemon ends up listening on (specifically, if the 
DBUS_SESSION_BUS_ADDRESS environment variable overrides the default 
specified in CMake as you'd expect it to), so it sounds like there might 
be an issue there. As long as we set the correct default in the CMake 
file, the daemon autolaunches as needed.

/ Jesper

On 07-07-2012 19:01, brett at stottlemyer.com wrote:
>> On 03/07/12 14:51, Jesper Dam wrote:
>>> You may find it a lot easier to get started if you use autolaunch: as
>>> your dbus address, instead of nonce-tcp.
>> If you know how autolaunching on Windows works/is meant to work, your
>> comments on <https://bugs.freedesktop.org/show_bug.cgi?id=38201> would
>> be very much appreciated.
>> I'd particularly like to know what the advantages and disadvantages of
>> autolaunch:, autolaunch:scope=*user and autolaunch:scope=*install-path
>> are, and how an application distributor should choose which one to use,
>> so we can make an informed decision about which one should be the D-Bus
>> default.
> It looks like autolaunch: uses named shared memory to detect the dbus
> daemon and establish a connection.  The name is fixed for autolaunch:, but
> if autolaunch:scope=*install-path is used, an extra hash is appended to
> the name.  I'm guessing scope=*user is similar, but with a different value
> appended.
> I've had no luck getting nonce-tcp: working.  If I use autolaunch:, I need
> to change the static value from
>    static const char *cDBusDaemonAddressInfo = "DBusDaemonAddressInfo";
> to
>    static const char *cDBusDaemonAddressInfo = "Local\\DBusDaemonAddressInfo";
> in dbus-sysdeps-win.c
> This looks to be the issue described at this link
> http://blogs.msdn.com/b/maartenb/archive/2008/05/07/memory-mapped-files-from-xp-to-vista.aspx
> I need to use the following command to start dbus-daemon, otherwise it
> starts as nonce-tcp:, it seems to ignore the environment variable
> DBUS_SESSION_BUS_ADDRESS (I guess there is a different way to set the
> address for the daemon)?
>    dbus-daemon --session --address=autolaunch:
> Since the address is not added if an application spawns the dbus-daemon, I
> need to start the daemon myself first.
> Now I am getting the verbose log showing connections being authenticated
> but they seem to quit immediately.  This is trying to get the Qt
> car/controller examples to connect, so there are two attempted
> connections.  Can someone that knows how to interpret the verbose logs see
> what is wrong?
> Thanks,
> Brett
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus

More information about the dbus mailing list