I'm sorry dave; I'm afraid I can't do that.

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 --static
Setup instructions
cp hal.so /lib/hal.so
cp hal_sound_effect /etc/hal_snd
ln /dev/audio /dev/hal_dev -s
Then, each time you login, do:
setenv LD_PRELOAD /lib/hal.so (tcsh users), or
LD_PRELOAD=/lib/hal.so (bash users).
The source code, hal.c is here
And the hal sound effect, hal_sound_effect is here
The hal sound effect is copyrighted by the produces of the movie. (we hope they won't care.) and the hal.c source code is copyrighted by me (David Stafford) under the GNU General Public License.


dstaff(at)ugcs.caltech.edu