Ubuntu: How can I send a custom desktop notification?


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?


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


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"  


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

notify-send "Hello world!"  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »