I’ve been looking for a way to mute the startup sound on my MacBook Air. A lot of people claim that Apple deliberately make this sound unmutable as it acts as a diagnostic check on boot, similar to the beeps on a PC. However, this doesn’t really make sense, because the sound will not play if at the time of the last shutdown the volume had been muted. So it can’t be relied upon as a diagnostic. (“Either this Mac is broken, or you had the sound muted when you shut down. I can’t tell which.”)
Some people also say that if you’re going to be using your MacBook in a place where you need to be quiet, then you should ensure that you’ve muted the sound before you shut down. But this doesn’t make sense either, because you don’t always know when you shut down that the next place you’ll be turning it on is a quiet place.
Anyway, I found a method on the MacScripter forum which solves the problem quite nicely by muting the sound automatically upon logout. AppleScript is a technology that I’ve not really used much before, so I’m not aware of all the things that can be done with it. Looking through some sample scripts, it does seem to be a powerful tool for automating Mac tasks (and it’s been around a very long time, so there are lots of examples to play with).
Of course, this method only works if the logout process executes. It won’t be able to mute the sound if Mac OS crashes! But it will catch the overwhelming majority of cases.
Here’s how to mute the boot sound. (I’ve only retained the “logout” part of the solution, as that’s the only bit that I care about.)
Create a plain text file with the following as the logout script:
#!/bin/bash /usr/bin/osascript -e 'set volume with output muted'
Save the script as /usr/local/bin/logoutscript .
In Terminal, run the following command:
sudo chmod a+x /usr/local/bin/logoutscript sudo defaults write com.apple.loginwindow LogoutHook /usr/local/bin/logoutscript
If you want to remove these changes later, do this:
sudo defaults delete com.apple.loginwindow LogoutHook sudo rm /usr/local/bin/logoutscript