Fancy Beeper mods for linux-2.4.x
Kill the beep!
Frank Johnson <ratty at they.org>
Fancy Beeper by Jason F. McBrayer <jmcbray-beep at carcosa.net> is a module for 2.2.x series linux kernels which allows you to change the behavior of the annoying PC speaker beep. This is especially handy for me because my machine is under my desk and I can't hear the beeps. With the help of this module, instead of an annoying beep, I have my box play a wav thru my speakers which are strategically placed ON the desk.
Only problem is I moved on to the 2.4.0-test kernels and I'm NOT going back. So I started with Jason's source and ended up with something that works for me.
UPDATE: patch integrates beep module into kernel module builds
2.4.1 patch will work on 2.4.2, 3 & 4 (at mild offsets)
You don't need beep.c, it's in the patch file and will be added to your kernel source tree. It's just there so you can read it outside of diff-file context. beepd_esd.pl isn't required either but you'll prolly want it as a framework to start with.
I'm running lk 2.4.4 with DevFS enabled. It's worked fine on the -preX kernels too. YMMV.
If you're not running DevFS you need to manually create a device major 10, minor 128 named "beep". (cd /dev/misc; mknod beep u 10 128) (I think)
This document assumes you've successfully compiled and run a 2.4.0 linux kernel.
You should now have a /dev/misc/beep device that you can read. 'beepd_esd.pl' does just this. You might have to play with some ownerships/permissions and edit the daemon to play the file of your choice. You have to kill the daemon when you want to rmmod the module. If there is no process listening on /dev/misc/beep and a beep event occurs, your normal beep will sound.
- cd into your linux-2.4.x source root
- # patch -p1 < (path to patch-2.4.x-fancy_beep)
- Configure, compile, and install your new kernel. Fancy Beeper will be found under "Character devices" inside the "Virtual terminal" config option.
- Reboot. Yeah, I'm sorry. It adds hooks to the main kernel so you have to restart your box.
- # insmod beep
Naturally you can rewrite beepd_esd.pl to do something other than play a sound thru your E-Sound Daemon. Or even in addition to it. The only limit is your imagination.
I am NOT an experienced kernel hacker so I have no idea if this will completely destroy your system but it works for me. If it breaks you get to keep the pieces.
Since this is mostly patches to Jason's code and other stuff I didn't write it's licensed under the same licenses they were released under. You can keep the perl script. Really. I don't mind. I have my own copy.