7
1
I'm writing a shell script from which I'd like to display a desktop notification which stays in one corner of the display until the user clicks on it, and if multiple notifications are sent, then all of them are displayed and visible at the same time in one on the screen. I've tried notify-send
, which worked perfectly on Ubuntu Hardy, but it cannot do what I need on Ubuntu Lucid. What should I use instead?
I've also tried pynotify
(python-notify
) and libnotify
, but they all seem to use the same backend, which cannot do what I want by default.
I've tried
$ notify-send foo
, but it displays a notification which times out after a few second (not good), and
$ notify-send -t 0 foo
displays a notification in a window in the middle of the screen (not good). If I do
$ notify-send foo
$ notify-send bar
only one of the notifications are displayed at the same time (not good).
After some more digging I've found:
- http://www.markshuttleworth.com/archives/253 explains that Ubuntu changed the notification mechanism in 2008.
/usr/lib/notify-osd/notify-osd
is the backend binary which displays the notifications
1@pts Thanks!
$ sudo apt-get install --reinstall notify-osd
worked for me. – Ionică Bizău – 2014-06-24T13:29:27.4501How does this fix affect other apps? – Matti Pastell – 2010-12-14T14:59:42.060
All apps would send their notification to notification-daemon. – pts – 2011-01-09T17:42:38.373
Multiple notifications seems not to be supported. How can I revert the changes? – Ionică Bizău – 2014-06-18T05:59:32.953
For me, multiple notifications are supported on Ubuntu Lucid. To revert the changes, do a
sudo apt-get install --reinstall ...
on all packages containing all changed files. (Usedpkg -S ...
to find out which packages contain which files.) – pts – 2014-06-18T08:09:08.853