D-Bus on Win32, and dbus-glib question

Ralf Habacker ralf.habacker at freenet.de
Tue Nov 20 13:40:43 PST 2007


Gnaural schrieb:
> Thanks! Using the low-level D-Bus API, I was able to
> cross-compile with MinGW successfully, and to my
> delight, the D-Bus feature of my app worked great In
> fact, better than it's parent (the linux version),
> since that one has a serious problem detailed in my
> 20071116 post (re: a bad dbus/gtk_dialog_run
> interaction).
>
> The only problem in the Windows test (WinXP Home): the
> dbus-daemon didn't autostart properly. It looked like
> the DLL was trying to autostart, but failing and in
> turn froze any D-Bus app I tried to launch (server or
> client). 
>
> Specifically, on top of my app would be another
> console-style window with some title text about
> "lanching dbus daemon" or such (sorry, I had to borrow
> the Windows computer quickly).
>
> The fix was to open another console and manually
> launch the daemon with:
> dbus-daemon --config-file=session.conf
>
> BTW, I am using the dll, session.conf, and
> dbus-daemon.exe precompiled from here:
> http://82.149.170.66/kde-windows/win32libs/zip/complete/dbus-mingw-1.1.2.20070919.zip
>
>   
I just unziped the related zip file into a local dir on my xp home pc, 
say c:\temp\dbus, opened a command shell in c:\temp\dbus\bin and run  
"start dbus-monitor". 
The first time a popup windows opens and told me that libexpat.dll is 
missing. I downloaded 
http://82.149.170.66/kde-windows/win32libs/zip/complete/expat-2.0.1.zip 
and unpacked it into the same folder as the dbus zip file.

After a retry a new command windows opens and the following content was 
printed

create process "C:\temp\dbus\bin\dbus-daemon.exe" 
"C:\temp\dbus\bin\dbus-daemon.exe"  --session
-> indicates dbus-daemon autostart

signal sender=org.freedesktop.DBus -> dest=:1.0 
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; 
member=NameAcquired
   string ":1.0"
method call sender=:1.0 -> dest=org.freedesktop.DBus 
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='method_call'"
method call sender=:1.0 -> dest=org.freedesktop.DBus 
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='method_return'"
method call sender=:1.0 -> dest=org.freedesktop.DBus 
path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
   string "type='error'"
-> these are message from dbus-monitor

Then sysinternal "pslist" shows me that dbus-daemon is really running

dbus-monitor      10580   8   1   46    628     0:00:00.015     0:00:13.937
dbus-daemon       10252   8   2   55    676     0:00:00.046     0:00:13.890

so no problem here. I suggest you should try in the same manner. If you 
have still problems you can set DBUS_VERBOSE=1 before running "start 
dbus-monitor" to get a very detailed log.

Ralf

> --- Ralf Habacker <ralf.habacker at freenet.de> wrote:
> [...]
>   
>> libdbus-1 on win32 contains code to autostart the
>> dbus-daemon on demand, 
>> so there is no need to launch is specific. It has
>> only to be in the PATH 
>> environment variable or in the same directory as the
>> application.
>>     
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>   



More information about the dbus mailing list