Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!

Disable the startup chime via Unix scripts UNIX
There have been other hints on this, but I thought I'd post a very simple way for UNIX admins to disable their startup chime.

First, create the following file as /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"
This will mute the system's volume on shutdown, while saving its previous status. Next, create /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
This will unmute the volume if it was muted before.

[robg adds: I haven't tested this one...]
    •    
  • Currently 0.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (0 votes cast)
 
[22,341 views]  

Disable the startup chime via Unix scripts | 13 comments | Create New Account
Click here to return to the 'Disable the startup chime via Unix scripts' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Disable the startup chime via Unix scripts
Authored by: owsla on Mon, Oct 17 2005 at 7:46AM PDT
There's a preference pane you can install to do this using a pretty GUI. It's called StartupSound.prefPane:

http://www5e.biglobe.ne.jp/~arcana/StartupSound/index.en.html

Works great on Panther and Tiger.

[ Reply to This | # ]
prefpane installs a kernel extension and writes directly to PRAM
Authored by: caesurae on Mon, Oct 17 2005 at 11:42AM PDT
i trashed a perfectly good OS 10.3.9 install on an iMac DV using this prefpane, and reinstalling wasn't easy...after repeatedly clearing the PRAM and resetting OF, i eventually had to reset the PMU to get it to stop having problems.

the prefpane modifies some low-level PRAM resources using a kernel extension (ArcanaPRAM.kext) in order to perform it's function. the author recommends you backup your data before installing, and there is a warning on the website about booting in safe mode to uninstall if your computer has problems booting up. unfortunately, following these instructions did not solve my problem. *shrug*

to be fair, i also installed this software (before realizing it installs a kernel extension) on an eMac and it worked as advertised, and i was able to uninstall it successfully.

[ Reply to This | # ]
Disable the startup chime via Unix scripts
Authored by: blaylock on Sat, Feb 24 2007 at 7:58PM PST
The updated link for the Arcana StartupSound.prefPane tool is http://www5e.biglobe.ne.jp/~arcana/StartupSound/index.en.html The old link above leads to an older version. The newer version (1.1) also works for Mac Intels (I just downloaded and installed it and it worked like a charm on my MacBook Pro)

[ Reply to This | # ]
Updated Link (for real this time)
Authored by: blaylock on Sat, Feb 24 2007 at 8:01PM PST
I accidentally posted the *old* link on my last comment. Here is the new link: http://www5e.biglobe.ne.jp/~arcana/index.en.html

[ Reply to This | # ]
Disable the startup chime via Unix scripts
Authored by: gidds on Mon, Oct 17 2005 at 2:07PM PDT
Oh, is the startup chime still there? Mine disappeared a while back; probably one of the later 10.2 upgrades. (I didn't bother with 10.3, and I'm fairly sure it went before I upgraded to 10.4.) Can't say I miss it!

---
Andy/

[ Reply to This | # ]
Disable the startup chime via Unix scripts
Authored by: cilly on Mon, Oct 17 2005 at 3:48PM PDT
There are two issues, which prevented the script from working:

1. use brackets: instead of $OSA use the following:

${OSA}

2. make sure the following line is in a single line:

echo OUTPUT_MUTED=`$OSA -e "output muted of (get volume settings)"` > /etc/volume.settings



[ Reply to This | # ]

one modification
Authored by: ra5ul on Mon, Oct 17 2005 at 9:38PM PDT
nice script, but it will yield unexpected results with:

set noclobber
and/or

set -C
in, say, an update to /etc/rc.common. use `>!' instead of `>' for certainty.

[ Reply to This | # ]
ugh...
Authored by: ra5ul on Thu, Nov 3 2005 at 1:08PM PST
this should be
 '>|' 
and not (wham!)
 '>!' 
anyway, this script won't run on a quick restart or
 `sudo reboot` 


[ Reply to This | # ]
Disable the startup chime via Unix scripts
Authored by: faderboy on Sat, Jan 28 2006 at 12:36PM PST
I set this up in Panther but the chime still plays upon start up.
When I run "sh ./etc/rc.shutdown.local" in Terminal the application performs correctly. So does "sh ./etc.rc.local"

/etc/rc.shutdown.local doesn't seem to be a part of the shutdown chain of commands just yet.

Ideas?

Please be gentle... I'm new at this.


[ Reply to This | # ]
does not work for me
Authored by: jpkelly on Fri, Sep 15 2006 at 7:48PM PDT
Great Hint!
I cant get it to work though.
I have narrowed it down to the reason being: the osascript command is acting on the wrong home directory. (I think)
I can run the commands/.local files manualy and they work but only from my user shell, if I run it from a root shell it does not work.
I presume the .logout is run as root during logout.


[ Reply to This | # ]
Disable the startup chime via Unix scripts
Authored by: zakmck on Sun, Apr 15 2007 at 3:56AM PDT
Unfortunately if I have the headphones connected it's their volume that is muted before shutdown and reset later. Is there a way to specify the speakers?



[ Reply to This | # ]
Disable the startup chime via Unix scripts
Authored by: ambrose on Fri, May 4 2007 at 11:45PM PDT
The current link for StartupSound PrefPane 1.1b is http://www5e.biglobe.ne.jp/~arcana/StartupSound/BETA/index.en.html

[ Reply to This | # ]
Disable the startup chime via Unix scripts
Authored by: Hamid on Sat, May 5 2007 at 2:01AM PDT
I use Psst! You can set the start up volume as you like.
It runs in the background and uses no CPU:

http://www.satsumac.com/Psst.php


[ Reply to This | # ]