You can't do this normally. However, there is a patched version of notify-osd that supports it:
From Ubuntu 16.04 onwards:
You'll need to add two PPA's:
sudo add-apt-repository ppa:leolik/leolik
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt update
Then install it like this:
sudo apt-get upgrade
sudo apt-get install notifyosdconfig
The configuration dialog should be in Applications->Accessories or notifyosdconf
from the terminal. There's a setting for the standard notification duration as per screenshot above if you don't set it the --expire-time
parameter.
Example:
notify-send --urgency=LOW --expire-time=1 --icon=face-laugh "test" "1 second"
Older versions: (9.10-14.10)
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 or notifyosdconf
from the terminal. There's a setting for notification duration as per screenshot above.
Example:
notify-send --urgency=LOW --expire-time=1 --icon=face-laugh "test" "1 second"