<div dir="ltr">Hi,<br>I'm trying to write an application that will display all notifications. I<br>want to register new service for the org.freedesktop.Notifications.<br>I searched for working examples, but I got stuck with nothing. So far, I'm<br>
trying to have a working example using python 2.7. I'm sending messages<br>using notify-send and except of my broken script, all notification daemons<br>are working (receiving messages).<br>I will appreciate any help on that.<br>
<br>Here's what I'm doing:<br><br><br>import gtk<br>import dbus<br>from dbus.mainloop.glib import DBusGMainLoop<br><br>MATCH = "type='method_call',interface='org.freedesktop.Notifications',member='Notify'"<br>
<br>def message_filter(connection, message):<br>    print(message)<br><br>def main():<br>    DBusGMainLoop(set_as_default=True)<br>    bus = dbus.SessionBus()<br>    bus.add_match_string(MATCH)<br>    bus.add_message_filter(message_filter)<br>
    gtk.main()<br><br>if __name__ == "__main__":<br>    main()<br></div>