How can I send a custom desktop notification?
There are a 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"
and
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!"