Howto disable OSX boot sound
Posted by: fidel in How to, Terminal, _english, mac, tags: /etc/rc.local, /etc/rc.shutdown.local, boot-sound, cli, macosxhints.com, mute, StartUpSound.prefPane, unmute…or Howto disable the startup chime
Well there is already a gui-based solution for that problem, called:
But maybe you prefer a command-line based method
I found that hint on macosxhints.com
Basic idea:
- We create 2 files:
- (1) Mute the sounds while shutdown. This script will save the previous volume
- (2) Unmute the volume, if it was muted
Now lets see the scripts:
(1) /etc/rc.shutdown.local
#!/bin/sh
OSA=/usr/bin/osascript
echo OUTPUT_MUTED=`$OSA -e “output muted of (get volume settings)”`
> /etc/volume.settings$OSA -e “set volume with output muted”
and (2) /etc/rc.local
#!/bin/sh
OSA=/usr/bin/osascript
if [ -r /etc/volume.settings ]; then
. /etc/volume.settings# If the volume wasn’t muted before shutting down, unmute it on
# startup
if [ $OUTPUT_MUTED = "false" ]; then
$OSA -e “set volume without output muted”
fi
fi
Similar Posts:













Entries (RSS)