Apple OSX: Mute startup sound / 'chime' in OSX 10.7 Lion and others
Saturday, July 30, 2011 9:39:11 AM
Acid got a working solution for OSX Lion which disables the startup sound without affecting your sound volume after logging in again. This was posted as a comment at the official Apple Forum originally. Thanks to Acid for this!
1. Login as administrator and open a terminal window
2. Create scriptfile for muting
3. Enter this as content, when done press control+O to save and control+X to exit:
4. Create scriptfile for unmuting
5. Enter this as content, when done press control+O to save and control+X to exit:
6. Make both files executable:
7. Check if any hooks already exist (these will be overwritten, so make sure it is OK for you)
8. Add hooks for muting
Notes:
- /path/to/ is the location of the scripts, I used /Library/Scripts/
- you can skip the unmuting loginhook (i.e. each logout will silence your machine), but I like it this way because I always have sound available exactly at the volume level I set last time
- root has to be the owner of the script files - running an editor from command line with sudo is the easiest way to achieve that (otherwise you need to chown)
- to delete the hooks, use the following:
sudo defaults delete com.apple.loginwindow LoginHook
sudo defaults delete com.apple.loginwindow LogoutHook
1. Login as administrator and open a terminal window
2. Create scriptfile for muting
sudo nano /path/to/mute-on.sh
3. Enter this as content, when done press control+O to save and control+X to exit:
#!/bin/bash osascript -e 'set volume with output muted'
4. Create scriptfile for unmuting
sudo nano /path/to/mute-off.sh
5. Enter this as content, when done press control+O to save and control+X to exit:
#!/bin/bash osascript -e 'set volume without output muted'
6. Make both files executable:
sudo chmod u+x /path/to/mute-on.sh sudo chmod u+x /path/to/mute-off.sh
7. Check if any hooks already exist (these will be overwritten, so make sure it is OK for you)
sudo defaults read com.apple.loginwindow LoginHook sudo defaults read com.apple.loginwindow LogoutHook
8. Add hooks for muting
sudo defaults write com.apple.loginwindow LogoutHook /path/to/mute-on.sh sudo defaults write com.apple.loginwindow LoginHook /path/to/mute-off.sh
Notes:
- /path/to/ is the location of the scripts, I used /Library/Scripts/
- you can skip the unmuting loginhook (i.e. each logout will silence your machine), but I like it this way because I always have sound available exactly at the volume level I set last time
- root has to be the owner of the script files - running an editor from command line with sudo is the easiest way to achieve that (otherwise you need to chown)
- to delete the hooks, use the following:
sudo defaults delete com.apple.loginwindow LoginHook
sudo defaults delete com.apple.loginwindow LogoutHook

1 2 Next »
Unregistered user # Tuesday, August 2, 2011 7:11:00 PM
Unregistered user # Sunday, August 7, 2011 8:00:24 AM
mereh # Monday, August 8, 2011 9:46:47 AM
Unregistered user # Wednesday, August 10, 2011 10:25:56 AM
Unregistered user # Friday, August 12, 2011 6:08:05 PM
mereh # Saturday, August 13, 2011 9:06:28 PM
Originally posted by anonymous:
Did you replace "/path/to/" with an existing folder? This could be the problem if it didn't work ..
Unregistered user # Wednesday, August 17, 2011 3:16:12 PM
Unregistered user # Thursday, August 18, 2011 11:17:07 PM
Unregistered user # Sunday, August 21, 2011 5:00:06 AM
Unregistered user # Monday, August 22, 2011 2:15:04 PM
Unregistered user # Thursday, September 1, 2011 12:37:20 PM
Unregistered user # Sunday, September 11, 2011 2:32:52 PM
Unregistered user # Sunday, September 11, 2011 2:33:07 PM
Unregistered user # Sunday, September 11, 2011 2:33:21 PM
Unregistered user # Tuesday, September 13, 2011 4:27:16 PM
Unregistered user # Monday, September 19, 2011 10:17:20 PM
mereh # Monday, September 19, 2011 10:32:15 PM
Unregistered user # Sunday, October 2, 2011 9:05:36 AM
Unregistered user # Tuesday, October 4, 2011 3:39:40 AM
Unregistered user # Tuesday, October 4, 2011 3:40:26 AM
Unregistered user # Tuesday, October 4, 2011 3:45:56 AM
mereh # Tuesday, October 4, 2011 8:41:50 AM
-rwxr-xr-x
owner: root
group: wheel
you can check this in terminal with "ls -la" without quotes.
You must create these files as root (with sudo).
mereh # Tuesday, October 4, 2011 8:51:31 AM
Unregistered user # Tuesday, October 4, 2011 11:55:21 AM
Unregistered user # Wednesday, October 5, 2011 3:03:51 PM
Unregistered user # Friday, October 7, 2011 6:30:47 AM
Unregistered user # Thursday, October 13, 2011 11:38:33 PM
Unregistered user # Friday, October 14, 2011 4:46:08 AM
Unregistered user # Saturday, October 15, 2011 2:31:56 AM
Unregistered user # Tuesday, October 18, 2011 8:41:04 AM
Unregistered user # Tuesday, October 18, 2011 8:46:18 AM
mereh # Wednesday, October 19, 2011 9:17:25 AM
"you can skip the unmuting loginhook" means that your mac will be always muted when you start up, anyway what level the volume was set when you logged out. Yes you can ignore the mute-off stuff if that is OK for you.
Unregistered user # Thursday, October 20, 2011 3:44:18 AM
Unregistered user # Thursday, October 20, 2011 3:53:39 AM
mereh # Thursday, October 20, 2011 7:45:20 AM
Unregistered user # Thursday, October 20, 2011 11:26:11 AM
Unregistered user # Thursday, October 20, 2011 11:27:56 AM
Unregistered user # Friday, October 21, 2011 6:14:09 AM
Unregistered user # Friday, October 21, 2011 8:08:54 AM
Unregistered user # Friday, October 21, 2011 8:12:02 AM
mereh # Sunday, October 23, 2011 6:40:02 PM
You can test the scripts by just executing them without hooks. This could help you to find the problem.
sh mute-on.sh
or
./mute-on.sh
Inside the folder where you placed the scripts. Your sound should be muted after.
Unregistered user # Sunday, November 6, 2011 8:18:44 PM
Unregistered user # Monday, November 7, 2011 10:53:51 PM
mereh # Wednesday, November 9, 2011 9:30:50 AM
@Anonymous user asking for youtube..anybody here who can do this?
Unregistered user # Monday, November 21, 2011 9:26:11 PM
Unregistered user # Sunday, November 27, 2011 12:02:33 AM
Unregistered user # Tuesday, November 29, 2011 11:10:05 AM
Unregistered user # Monday, December 5, 2011 11:30:20 PM
Unregistered user # Friday, December 16, 2011 9:13:12 PM
Unregistered user # Monday, December 19, 2011 10:35:34 PM