How to write to KDE's OSD or notification from console?

Solution 1:

notify-send 'why hello there'

notify-send is part of the package libnotify-tools.


perl -MDesktop::Notify -e'Desktop::Notify->new->create(body => q{why hello there})->show'

Desktop::Notify is available on CPAN.

Solution 2:

As an alternative:

kdialog --passivepopup 'why hello there' 5

5 is the number of seconds it will last.
Run kdialog --help for other options, like title.