How to get DBus sender's information in the code

Serkan Kaba serkan at
Thu May 5 00:55:58 PDT 2011

2011/5/4 Mike Gorse <mgorse at>:
> Hi Tao,
> I'm not sure if I'm understanding your question correctly, but, when your
> app receives a message, you can call dbus_message_get_sender to get the
> caller's D-Bus id, and, assuming you are using dbus-daemon to route the
> messages, you can call GetConnectionUnixProcessID to get the pid of the
> process that sent the message.  It is described in the D-Bus specification
> (
and there's GetConnectionUnixUser to get the uid of the user sending
the message.
> Hth,
> -Mike G-
> On Wed, 4 May 2011, tao wu wrote:
>> Hi,
>> The scenario is like this:
>> In a Linux based handheld device I have a C app which has dbus APIs
>> ready to be called by 3rd party apps. The DBus APIs are called during
>> booting time.
>> Is there any system API I can use to in my functions to print the
>> caller's ID and save it to syslog?
>> Thanks in advance!
>> _______________________________________________
>> dbus mailing list
>> dbus at
> _______________________________________________
> dbus mailing list
> dbus at

More information about the dbus mailing list