[plug] Intercepting Default Beep

Leon Brooks leon at brooks.smileys.net
Wed Apr 7 04:20:15 WST 1999

Trevor Phillips wrote:
> Mike Holland wrote:
> >    Are you willing to go into the source code? Xterm cant do it, but it
> > does have 'visual bell' wich replaces the beep with a flash. So if you
> > look at the source for that, it might be very easy to adapt.

> I was thinking something more generic, so all apps that beep are
> affected.

It would indeed be generic, since it would be operating on the
terminal-output data rather than any app. I suspect that Xterms use the
kernel to beep too, but if not, the Right Thing would involve hacking
the X server. Rather than run a program from the kernel to play the wave
file every time a beep happened, I think a beepd is in order. You could
do fabulously useful things with it like queueing beeps and limiting the
queue depth to, say, 3. More than 30 beeps in two minutes, say, could
activate the coffee urn. Also consider fabulously useless things like
varying the beep tone or action to suit the UID of the beeping
application's owner.

"...and a moderate swell." -- Weather forecast, Alice Springs, Central

More information about the plug mailing list