| Or would you rather view Hme!, Projects! , Tux the penguin!, My resume. |
I implemented this in about 4 hours when I got really bored one day
Basically, it is a library stuff that can be loaded with the LD_PRELOAD environment variable. It overloads the strerror, perror and error standard C functions and detects EACCESS and EPERM errors. Whenever it detects one of those errors,
it forks and has the forked program copy /etc/hal_snd to /dev/hal_dev.
Compile instructions:
gcc -O2 -c hal.o ld ld -shared hal.o -o hal.so --staticSetup instructions
cp hal.so /lib/hal.so cp hal_sound_effect /etc/hal_snd ln /dev/audio /dev/hal_dev -sThen, each time you login, do: