3

Is there a way to get the kernel messages into the KDE notification system?

I want to see a GUI notification when my kernel detected a problem.

1
  • Gold Star question. My 10 cents python (choose your fave) script to grep the kernel message log every x seconds and pipe the results to notify from x second to y second with possibly a filter to only pipe messages containing error, trouble ahead, crash and burn etc.....
    – Allan
    Feb 2, 2011 at 21:41

1 Answer 1

1

You could put this into your autostart:

sh -c 'tail -n 1 -f /var/log/syslog | while read LINE; do notify-send "$LINE";done'

or into a bash script watch_syslog.sh:

#!/bin/sh
tail -n 1 -f /var/log/syslog | while read LINE; do notify-send "$LINE";done

at least this works under GNOME... You only need to substitute the appropriate tool for KDE instead of notify-send:

tail -n 1 -f /var/log/syslog | while read LINE; do kdialog --passivepopup "$LINE" 3;done
1
  • notify-send also works on KDE. Thx Feb 5, 2011 at 6:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .