Can the macOS startup sound/chime/ bong be changed on a MacBook Pro?
Solution 1:
You technically can't...
But there are a few things you can do instead.
Using a few techniques I picked up on the interwebs, I've figured out a way to both
- Disable the boot chime (seriously, I don't recommend this. This is here for debug purposes, disabling it can be a very bad plan)
- Run a sound at login (not boot - for some reason, at least in El Capitan, using
Afplay
at boot throughcrontab
and LaunchDaemons is not working. If someone else can get it to work, lemme know, I'll add it)
Disabling the boot chime
I seriously recommend not doing this. Debug is important, and if there's a hardware issue, you need to know what startup chime you have. Turn back, ye who fear.
- Go into Terminal.app.
- Run the command
sudo nvram SystemAudioVolume=%80
- This can be undone with
sudo nvram -d SystemAudioVolume
- Note that this does not work in OS X El Capitan (because changes ಠ_ಠ)
- This can be undone with
The boot chime is now disabled.
Adding a login chime
- Go into Automator.app.
- Hit New Document
- Select Application, and hit Choose.
- Drag Run Shell Script in the second left-hand column into the main pane.
- Type in the command
obviously replacingAfplay -q 1 /path/to/sound/file
/path/to/sound/file
with the path to the sound file. - Save as an Application and place it in your Applications folder.
- Quit Automator.app
- Go to System Preferences.
- Click on Users and Groups.
- Click on your user in the left-hand-most column.
- If necessary, click the lock in the lower-left corner to allow for a preferences change.
- Click the + underneath the main pane on the right.
- Select the Application you just made and hit Add.
- Click the Hide checkbox.
That's it.
You now have no startup chime(use caution) and a login chime. Hooray!
Solution 2:
From my personal experience, there isn't really any way to change Mac's startup sound. For some reason, that's embedded right inside the computer itself—even if I started a Mac in Windows 10, the same startup sound can be heard but before Windows boots up.
However, you can mute it and just add another sound, but unlike Windows 10, you have to get logged in before you hear the sound. Well, that was just what Addison said. However, his solution and my suggestion will only apply only to your user account!
In addition to Addison's work, I'd like to add this…
- When the system turns off, there should be some sort of terminal code (usually the
logouthook
code (search online for that). In my case, thelogouthook
code did not work, but I hope it works in yours. - In addition to the startup sound, the code should be able to restore the volume of the computer back to the same level before it was muted—or else you will forget that you have muted it.
An Example
I have two examples, but I will only send one since the other one relies on AppleScript and my AppleScript renderer is broken!
These are the codes you would have to place in Automator. You have to run this as an app. This includes only very simple codes.
- Set Computer Volume
- You can set the volume as any volume you want. Take note that since Automator does simple tasks, this will not be able to restore the sound level before you turned the Mac off, unlike what I said. However, more complex script editors can do this.
- Do Shell Script
- Use the code
afplay
followed by the local URL to the video/audio file.- For instance,
afplay ~/Music/Startup.mp4
- For instance,
- Please only use the zsh or the bash command-line.
- Use the code
I hope this helps!