<div dir="ltr"><div><div><div>Now it does work, but only if there's another application that is handling notifications.<br><br></div><div>I checked documentation for this: <a href="http://dbus.freedesktop.org/doc/dbus-daemon.1.html">http://dbus.freedesktop.org/doc/dbus-daemon.1.html</a><br>
</div><br>"Eavesdropping" occurs when an application receives a message that
was explicitly addressed to a name the application does not own, or
is a reply to such a message."<br><br></div>This make sense, because it appears that my code is listening to messages and gives me those that are matching the filter, but none of those messages are for my app directry. That's why there's nothing comming if there's no other application listening to notifications.<br>
</div><div>Where can I learn how to register my application so that all notifications will be send directly to it?<br></div><div><div><div><div><br></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
2013/4/12 Krzysztof Konopko <span dir="ltr"><<a href="mailto:krzysztof.konopko@gmail.com" target="_blank">krzysztof.konopko@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi,<div><br></div><div>In your MATCH string you're missing eavesdrop='true':</div><div><span style="font-family:arial,sans-serif;font-size:13px">MATCH = "type='method_call',interface=</span><span style="font-family:arial,sans-serif;font-size:13px">'org.freedesktop.</span><span style="font-family:arial,sans-serif;font-size:13px">Notifications',member='Notify'</span><font face="arial, sans-serif">,eavesdrop='true'</font><span style="font-family:arial,sans-serif;font-size:13px">"</span></div>
<div></div><div class="gmail_extra"><br></div><div class="gmail_extra">I tried it on my laptop and now it's OK.</div><div class="gmail_extra"><br></div><div class="gmail_extra">This is required since 1.6.x series I think so might not be googlable yet.<br>
<br>Cheers,</div><div class="gmail_extra">Kris<br><br><div class="gmail_quote">2013/4/12 Piotr Husiatyński <span dir="ltr"><<a href="mailto:piotrhusiatynski@gmail.com" target="_blank">piotrhusiatynski@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><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>
<br></div></div>_______________________________________________<br>
dbus mailing list<br>
<a href="mailto:dbus@lists.freedesktop.org" target="_blank">dbus@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dbus" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>
<br></blockquote></div><br></div></div>
<br>_______________________________________________<br>
dbus mailing list<br>
<a href="mailto:dbus@lists.freedesktop.org">dbus@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/dbus" target="_blank">http://lists.freedesktop.org/mailman/listinfo/dbus</a><br>
<br></blockquote></div><br></div>