Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to change how long the libnotify notifications last? I've googled around for this for months and no still no luck.

I'm actually starting to think that you can't change it. I can't even find anywhere in the API where developers can control this.

share|improve this question
Can you please rephrase the question as "How do I change how long notifications are displayed?"; "Notification Display Time" is pretty confusing, and not phrased as a question. – David Siegel Jul 28 '10 at 19:48
edited, thanks. – helloandre Jul 28 '10 at 19:49
up vote 10 down vote accepted

You can't do this normally. However, there is a patched version of notify-osd that supports it. You'll need to add two PPA's:

sudo add-apt-repository ppa:leolik/leolik
sudo add-apt-repository ppa:amandeepgrewal/notifyosdconfig
sudo apt-get update

Then install it like this:

sudo apt-get upgrade
sudo apt-get install notifyosdconfig

The configuration dialog should be in Applications->Accessories. There's a setting for notification duration.

share|improve this answer
those two ppa's are the same? after googling 'notifyosdconfig ppa' i think the second one you meant was sudo add-apt-repository ppa:amandeepgrewal/notifyosdconfig – helloandre Jul 29 '10 at 0:14
Yep, that's it. Thanks, edited post. – snostorm Jul 29 '10 at 11:50
Just a note, though the above program works beautifully, you're still limited by a maximum time of 10 seconds. You can go below 10 seconds, but not above (which is what I was after when I started looking). – begtognen Nov 16 '10 at 20:59

crude but effective and then some - caveat this also kills pending notifications
this can only shorten display times just change the 1.5 in sleep 1.5; below:

details in Close button on notify-osd?

Expiry time in notify-send notifications

dbus-monitor "interface='org.freedesktop.Notifications'"            \
| grep --line-buffered  "member=Notify"                             \
| sed -u -e 's/.*/sleep 1.5; killall notify-osd/'                   \
| bash

self - How do I change how long notifications are displayed?
Expiry time in notify-send notifications

share|improve this answer

The duration of the notification is, I believe, dependent on the length of the message.

From the perspective of someone who was worked with it indirectly (by using the pynotify module in Python), I have discovered that specifying a duration for a message is not possible.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.