Pidgin plugin - how to get a _client_ DBUS connection

Michal Witkowski neuro at
Wed Jan 14 19:45:59 EST 2009

I'm trying to write a knotify4 backend for pidgin's notifications using dbus. I've already 
made a simple program that sends an appropriate event to knotify4, which, frankly is a 
huge success already :) The notification appears and I even created a separate profile for 

Now I'm strugling to initialize my purple plugin. I need a DbusGConnection to the 
DBUS_SESSION_BUS. In my short app i did it like this: 
connection = dbus_g_bus_get (DBUS_BUS_SESSION, &error);
However, during plugin initialization this always returns NULL with no error message. I 
suppose this has something to do with the fact that purple already has such a connection 

I tried grepping around and found:
connection = purple_dbus_get_connection();
but this segfaults when i try to do dbus_g_proxy_new_for_name with such a connection.

Could someone please guide me how to set up a DBus session/connection from a Pidgin plugin 
to an external application?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: event.c
Type: text/x-csrc
Size: 2322 bytes
Desc: not available
URL: <>

More information about the Devel mailing list