Search code examples
ipcdaemondbus

dbus-daemon - session.conf - windows configuration issue with the noncefile


I have an issue with running dbus-daemon on Windows 7 platform. I downloaded dbus 1.4.18 sources and built it using cmake and visual 2010 compilator. Then I started dbus-daemon using dbus-launch and it works. After that I tried to connect to the bus using a simple code:

DBusConnection* conn;
DBusError err;

dbus_error_init(&err);
conn = dbus_bus_get(DBUS_BUS_SESSION, &err);

but still I have the same error:

"Server address of type nonce-tcp was missing argument noncefile"

So I killed dbus-daemon proccess, opened session.conf file and added noncefile path inside tag like you can see below:

<listen>nonce-tcp:noncefile=C:\my_temporary_path</listen>

Then and tried to start it once again, but I cannot see a dbus-daemon process on a task list I don't have any error message also though I started dbus-daemon in verbose mode. I tried to add some more parameters like host and port as I found into documentation:

http://dbus.freedesktop.org/doc/dbus-specification.html

But deamon still doesn't work. When I get back to previous setting "nonce-tcp:" everything looks fine.

What did I do wrong?

  • %temp% - this is the place where nonce files are created by dbus-daemon.

Solution

  • <listen>nonce-tcp:</listen> is OK for the daemon configuration. IIUC the daemon is supposed to add the noncefile parameter when writing out the address that the clients should use. The client should look for the address via the mechanism described in http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-types. Sorry, I don't know how that works out on Windows, it looks like consulting the sources of libdbus is necessary.