How to write notification displaying application?
Krzysztof Konopko
krzysztof.konopko at gmail.com
Fri Apr 12 01:08:34 PDT 2013
Hi,
In your MATCH string you're missing eavesdrop='true':
MATCH = "type='method_call',interface='org.freedesktop.
Notifications',member='Notify',eavesdrop='true'"
I tried it on my laptop and now it's OK.
This is required since 1.6.x series I think so might not be googlable yet.
Cheers,
Kris
2013/4/12 Piotr Husiatyński <piotrhusiatynski at gmail.com>
> Hi,
> I'm trying to write an application that will display all notifications. I
> want to register new service for the org.freedesktop.Notifications.
> I searched for working examples, but I got stuck with nothing. So far, I'm
> trying to have a working example using python 2.7. I'm sending messages
> using notify-send and except of my broken script, all notification daemons
> are working (receiving messages).
> I will appreciate any help on that.
>
> Here's what I'm doing:
>
>
> import gtk
> import dbus
> from dbus.mainloop.glib import DBusGMainLoop
>
> MATCH =
> "type='method_call',interface='org.freedesktop.Notifications',member='Notify'"
>
> def message_filter(connection, message):
> print(message)
>
> def main():
> DBusGMainLoop(set_as_default=True)
> bus = dbus.SessionBus()
> bus.add_match_string(MATCH)
> bus.add_message_filter(message_filter)
> gtk.main()
>
> if __name__ == "__main__":
> main()
>
> _______________________________________________
> dbus mailing list
> dbus at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dbus
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/dbus/attachments/20130412/1e836bb5/attachment.html>
More information about the dbus
mailing list