[NBLUG/talk] Play a sound when the screensaver terminates?

Andrew argonaut at softhome.net
Wed Jan 7 15:45:02 PST 2004


Lincoln Peters wrote on Wed, 07 Jan 2004 14:41:25 -0800:

> I'm trying to discourage a cat who is developing the habit of
> nesting on a computer desk, leaving fur all over the mousepad
> and occasionally stepping on the keyboard.  Since the mouse
> moves every time she jumps on the desk, I figure that if I
> could set up the screensaver to play a WAV file (probably
> /usr/share/sounds/error.wav) whenever it deactivates, I might
> be able to scare the cat away when she jumps on the desk.

Assuming the screensaver is a native KDE app, you may be able to
use KDE's DCOP interface. It's a means of sending messages from
you (or eg. a shell script) to KDE apps or from one KDE app to
another. I was just reading about it in November's Linux Magazine
(from the UK -- it's still on the shelf at Border's bookstore).
Luckily, the article is downloadable in PDF format from
http://www.linux-magazine.com/issue/36/KDE_Scripting_DCOP.pdf
so you don't have to go to Border's. Maybe you can get KDE's
screensaver to send a message to another KDE app to make it play
a sound.

A.



More information about the talk mailing list