Weird pynotify behaviour in Ubuntu 9.10
I wrote a small app and I am using pynotify to show some messages to the user.
It all works fine here in arch, but when I tested it in Ubuntu, the behaviour was very weird.
Because of the way Ubuntu shows notifications (as what seems to be a rip of of growl), I can't click on them, or interact with them in any way, for that matter.
The biggest problem, however, is that it only 开发者_StackOverflow中文版shows one notification at a time, and has to wait (a long time, by default) untill one of them goes away to show the next one.
Given the nature of the little app I'm writing (a simple monitor that runs a command every time a file is changed), the results must appear to the user in real time.
I have tried to set a small timeout with message.set_timeout()
, but Ubuntu just seems to ignore it.
--
So, here is my question: Am I the only one to notice that? Am I doing something wrong?
If not, is there any way to change that behaviour in Ubuntu? Any workaround?
Thanks in advance for your time
Yes, Ubuntu 9.10 replaced upstream's notification-daemon with their own notify-osd, and generally made a mess of things.
You can ensure notification-daemon is installed (via whatever your favorite package manager front-end is) and use it in favor of notify-osd:
$ sudo mv /usr/share/dbus-1/services/org.freedesktop.Notifications.service /usr/share/dbus-1/services/org.freedesktop.Notifications.service.disabled $ sudo mv /usr/share/dbus-1/services/org.freedesktop.Notifications.service.notify-osd /usr/share/dbus-1/services/org.freedesktop.Notifications.service
Unfortunately this will get overwritten whenever the package is updated... it's already using a dpkg-diversion so it's hard to re-divert it permanently.
精彩评论