Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,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 2.25 / 5
  You rated: 1 / 5 (8 votes cast)
 
[34,159 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 whoever posted them. This site is not responsible for what they say.
Disable the startup chime via Unix scripts
Authored by: owsla on Oct 17, '05 07:46:55AM
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 Oct 17, '05 11:42:56AM

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 Feb 24, '07 07:58:28PM
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 Feb 24, '07 08:01:39PM
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 Oct 17, '05 02:07:13PM

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 Oct 17, '05 03:48:21PM
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 Oct 17, '05 09:38:28PM
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 Nov 03, '05 01:08:45PM
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 Jan 28, '06 12:36:22PM

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 Sep 15, '06 07:48:17PM

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 Apr 15, '07 03:56:45AM

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 May 04, '07 11:45:01PM
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: Anonymous on May 05, '07 02:01:04AM
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 | # ]