Activating KDE 4 notifications from bash scripts

Massimiliano Fliri picture Massimiliano Fliri · Sep 4, 2009 · Viewed 9.8k times · Source

I have a bash script activated by crontab and running in background. I would like to add to it the ability to send notifications during the execution. My KDE 4 desktop has a fancy notification system which pops out non-modal messages from the tray bar, and this would be perfect for my needs. So I was searching for a way to generate these notifications from a bash scripts, but I have almost no knowledge of the KDE platform and so I'm stuck. Can anybody point me to a solution?

Answer

Alan Haggai Alavi picture Alan Haggai Alavi · Sep 4, 2009

kdialog's passive popup option can be used.

kdialog --passivepopup <text> <timeout>

Example:

kdialog --passivepopup 'This is a notification' 5