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

I have a custom script and I want to send a desktop notification (the one that appears in the top right corner of the screen) with a custom message. How do I do that?

share|improve this question
up vote 54 down vote accepted

There is bunch of other cool features with notify-send

We can run a command and make it display in the notification:

notify-send <title> <`command`>
notify-send Date "`date`"
notify-send Disk "`df / -H`"

We can use icons with the notifications

notify-send -i <icon> <Message>
notify-send -i face-wink "Hello! January"

Really annoying pop up

notify-send  -t 0 "Bringing down the system"


notify-send <title> <message>
notify-send "who am i" "I am January"

For more options check here

share|improve this answer
Thank you. Where can we get a list of icons, e.g. the face-wink that you used? – Paddy Landau Sep 24 '12 at 10:56
check out my answer here – devav2 Sep 24 '12 at 13:07
Thank you! I now have an extra set of useful knowledge. – Paddy Landau Sep 24 '12 at 16:37
notify-send -t 0 works but notify-send "who am i" "I am January" does not work :( - on ubuntu 15.10 – AlikElzin-kilaka May 23 at 9:19
Worked with --urgency=critical – AlikElzin-kilaka May 23 at 9:50

Just to add to the other answers, when running the command locally from cron, I use

DISPLAY=:0.0 /usr/bin/notify-send "TITLE" "MESSAGE"
share|improve this answer

I stumbled upon that one by chance. Answer: use the program notify-send:

notify-send "Hello world!"
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.