Debugging dbus communication

Thiago Macieira thiago at kde.org
Wed May 8 16:26:04 PDT 2013


On quinta-feira, 9 de maio de 2013 01.20.55, László Monda wrote:
> I assume this is what I'm looking for:
> 
> method call sender=:1.1263 -> dest=org.freedesktop.DBus serial=7
> path=/org/freedesktop/DBus; interface=org.freedesktop.DBus;
> member=AddMatch
>    string
> "type='signal',interface='ca.desrt.dconf.Writer',path='/ca/desrt/dconf/Writ
> er/user',arg0path='/org/gnome/desktop/screensaver/'"
> 
> Correct?

Correct.

> Also, based on what I've read the sender is randomly-assigned client
> ID that I cannot trace back.  Still, is there any way to know what
> processes operate behind those IDs?

Yes, you can call the GetConnectionUnixProcessID method on the bus daemon with 
that sender ID and it will tell you the PID of the process.

If you have qdbus, you can run:
	qdbus org.freedesktop.DBus / GetConnectionUnixProcessID :1.1263

(technically speaking, calling with object path / is incorrect, but works)

Or with dbus-send:
 dbus-send --print-reply --dest=org.freedesktop.DBus / 
org.freedesktop.DBus.GetConnectionUnixProcessID string::1.1263

Other D-Bus tools will offer similar mechanisms.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20130508/c940aa1e/attachment.pgp>


More information about the dbus mailing list