Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is there a way to get the kernel messages into the KDE notification system? I want to see in KDE when my kernel detected a problem.

share|improve this question
    
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 '11 at 21:41

1 Answer 1

up vote 0 down vote accepted

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
share|improve this answer
    
notify-send also works on KDE. Thx –  Andreas Roth Feb 5 '11 at 6:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.