ok, if you really wanted to do this, I think it can be done as follows:
Make an mp3 of the sound.
download and compile mpg123 (or just install a precompiled binary..).
mpg123 is a command line utility for playing audio mpeg files (mpeg 1, 2, and 3).
There is an faq at
www.opensource.apple.com about creating startup items, so you could start with that. Basically, edit the startup items, and add /usr/sbin/mpg123 ~myname/Music/file.mp3
to one of the scripts.
Here's how I would do it:
Become root (sudo -s or su)
cd /System/Library/StartupItems (I know you're supposed to use /Library/StartupItems, but I haven't confirmed this)
mkdir StartSound
cd StartSound
pico StartupParameters.plist
ok, now enter this into the file (this is all parafrazed from something else on my system, so I think itl work):
{
Description = "custom startup sound";
Provides = ("coolsound");
Requires = ("Disks", "Resolver", "Desktop DB", "Input Managers");
OrderPreference = "Late";
Messages =
{
start = "Starting cool sound...";
stop = "Stopping cool sound...";
};
}
Thats all for that file, press control-x, press y, and hit return.
Ok, now we need the script to be executed. It must be named the same as the folder it resides in.
pico StartSound
and put this in it:
#!/bin/sh
. /etc/rc.common
if [ -d /usr/sbin/mpg123 ]; then
ConsoleMessage "Playing Startup Sound"
/usr/sbin/mpg123 ~blabla/Music/file.mp3
fi
exit pico (make sure to save the file - control-x, press y, press return)
now chmod the script so it can be executed:
chmod 700 StartSound
Ok, I think thats it. I haven't tried this, and it might not work at all, and it could really mess things up... but it might work. I think I'll try it tomarrow, I'll put it in, and if it fails to start up, boot into single user mode (apple-s) and remove the script.
btw, make sure the location of mpg123 is the same as the location you specify in the script, and the same for the mp3, don't misplace it. It might be smart to put the mp3 in ~root just to make sure it doesn't get removed.
Let me know if it works/blows up. I'll let yall know what it does on my comp... its freakin' 4am, so I'm going to bed.