Activating KDE 4 notifications from bash scripts

kdialog --passivepopup 'message including html' timeout

is an option for KDE where the timeout is not necessary. you can tune this even with adding a headline (--title) and so on --> see kdialog --help

on the one hand it is worth mentioning, that kdialog was installed on my openSuSE KDE4 system whereas notify-send is not installed here.

on the other hand the advantage of notify-send is that you can use it with different desktop environments


kdialog's passive popup option can be used.

kdialog --passivepopup <text> <timeout>

Example:

kdialog --passivepopup 'This is a notification' 5

You may also use notify-send (on Debian-based systems, install the libnotify-bin package):

notify-send -i 'dialog-information' 'Summary' '<b><font color=red>Message body.'

To my best knowledge, this should work on several window managers (such as KDE and Gnome).

Edit: HTML formatting of the message will only work with certain notification daemons and should thus be avoided.