An on-screen Alerter
This is my version of an item I saw from the Jun 2006 Issue 14 of the TUX Magazine. http://www.tuxmagazine.com
To have a message display on the screen overriding all other windows etc. use the On Screen Display utility osd_cat.
To alert when new email arrives, such as notifications from the Nagios monitoring system, the following setup is used.
Create a shell script, calling it something like nagios-alerter.sh:
echo "Alert from Nagios has Arrived" | \
osd_cat -p middle -A center -f -*-lucida-*-*-*-*-*-240 -d 30 -s 1
This script echos the text supplied into the osd_cat command which uses:
-p Position (top to bottom)
-A Alignment (left to right)
-f Font (Note the *-*- etc. need to be correct)
-d Delay - how long the message is displayed in seconds.
-s Shadow - which makes the text standout a little better, a value of 1 or 2, no more.
Now add a filter to Evolution
Tools -> Filters...
Rule Name: Nagios Alarm Alerter
If Sender Contains: -the from email address here-
Then Run Program: /path-to-script/nagios-alerter.sh
One nice thing about this is that even though I run my email client over a ssh session, using the -X option, the display is still forwarded and appears on my "client" machine.
The osd_cat utility comes as part of the xosd package which can be installed using YaST on SUSE 10.1 etc.Back to GNU/Linux Application Tips