bashscriptingkde-plasmakde4

Activating KDE 4 notifications from bash scripts


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?


Solution

  • kdialog's passive popup option can be used.

    kdialog --passivepopup <text> <timeout>
    

    Example:

    kdialog --passivepopup 'This is a notification' 5