Saturday, May 06, 2006

Mute the startup sound in MAC OS X

Your MAC too noisy, well follow this:

First, write a small script:
#!/bin/tcsh -f
osascript -e 'set volume 0'

I named mine shutup.sh and saved it to /usr/local/bin/. Next, make it executable:
$ sudo chmod u+x /usr/local/bin/shutup.sh
Add it as a logout hook using the defaults write command:
$ sudo defaults write com.apple.loginwindow
LogoutHook /usr/local/bin/shutup.sh

(note that the whole command is supposed to be a single line, just splitted for readability, but you can still copy/paste that line as-is into your shell)

Make a small AppleScript with Script Editor to set the sound back to a normal level when the user logs back in.
set volume 3
Save it as a run-only application, and add it to your login items. Restart and listen to the startup sound, because you won't have to hear it again ;)

No comments: