Skip to Main Content
Linux Desktop Hacks
book

Linux Desktop Hacks

by Nicholas Petreley, Jono Bacon
March 2005
Beginner to intermediate content levelBeginner to intermediate
342 pages
15h 55m
English
O'Reilly Media, Inc.
Content preview from Linux Desktop Hacks
90
|
Chapter 4, Related to X
#27 Make Applications Trigger On-Screen Alerts
HACK
Now follow these steps to configure KMail to execute the script when new
mail arrives:
1. Start up KMail and then click Settings
Configure KMail.
2. Click the button entitled Other Actions at the bottom of the dialog,
located right below the Detailed New Mail Notification box, which
should be checked by default.
3. Click the More Options button at the bottom of the next dialog box
that appears.
4. Check the “Execute a program” box.
5. Enter
~/youhavemail in the edit field for this selection.
6. Click the Apply and/or OK buttons until you are back to the KMail
interface.
Jpilot
You can configure the Jpilot personal information manager (PIM) to run a
script that displays an on-screen message when a scheduled event occurs. Fire
up your favorite editor, and enter this script into a file called ~/jpilotalert. (This
script executes from your home directory, so you don’t need any special privi-
leges for it to work.)
#!/bin/bash
# figure out which display we're currently using
# then export the DISPLAY environment variable
HOST="$(xrdb -symbols | grep SERVERHOST | cut -d= -f2)"
DISPLAYNUM="$(xrdb -symbols | grep DISPLAY_NUM | cut -d= -f2)"
THISDISPLAY=$HOST:$DISPLAYNUM.0
export DISPLAY=$THISDISPLAY
echo "You have an appointment scheduled for $1 $2"'!' | osd_cat -s 2 -c
yellow -p middle \
-f -adobe-helvetica-bold-r-normal-*-*-240-*-*-p-*-*-* ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Server Hacks, Volume Two

Linux Server Hacks, Volume Two

William von Hagen, Brian K. Jones
Introducing Linux Distros

Introducing Linux Distros

Jose Dieguez Castro

Publisher Resources

ISBN: 0596009119Supplemental ContentCatalog PageErrata