How to get DBus sender's information in the code

tao wu wutao.twu at
Thu May 5 21:36:25 PDT 2011

Hi Mike,

It works now. Thanks a lot!


On Wed, May 4, 2011 at 7:06 PM, Mike Gorse <mgorse at> wrote:
> 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
> (
> 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

More information about the dbus mailing list