Thursday 5 January 2012

How to Silence Your Computer’s Startup Sound and Boot Like a Ninja

How to Silence Your Computer’s Startup Sound and Boot Like a Ninja

We've all been there: you're starting up your computer at night, or in class, and you cringe in embarrassment as your computer's startup sound reverberates loudly through the room. Here's how to prevent that from ever happening again.


Silence or Change the Startup Sound in Windows

How to Silence Your Computer's Startup Sound and Boot Like a NinjaLuckily, Windows gives you a number of easy options for tweaking your system's startup sound. To tweak it:
  1. Click on the Start menu and type "personalization" into the search box. Hit enter to go to the Personalization panel.
  2. Click on "Sounds" to enter the Sound preferences.
  3. Uncheck the "Play Windows Startup Sound" box at the bottom of the window. Hit OK. When you restart your computer, it shouldn't make any noise when you log in.
Alternatively, you can scroll down the "Program Events" window and find "Windows Logon". From there, you can choose a different sound from the "Sounds" dropdown list, or hit Browse to choose one from your system. It won't silence it, but if you just want to change it to something a bit more subtle, you can do that here too.

Silence the Startup Sound in OS X

The startup chime in OS X is a bit more obnoxious sounding, and quite a bit harder to turn off. Courtesy of Cult of Mac and the book Mac Kung Fu, here is one way to silence your startup chime. You'll need to be comfortable with a bit of Terminal work, but when you're done, it'll automatically mute your computer on shutdown and unmute it when you boot back up.
  1. Open a terminal and type in nano. Press Enter.
  2. Type this in the nano editor that pops up:
    #!/bin/bash
    osascript -e 'set volume with output muted'
  3. Press Ctrl+O, then type in ~/Documents/mute.sh when it asks you for the filename. Hit Enter to save the file. This puts the mute script in your Documents folder (don't worry, we're going to move it later).
  4. Next, we're going to create a second, slightly different script. change the second line in the script you just made to read unmuted instead of muted:
    #!/bin/bash
    osascript -e 'set volume with output unmuted'
  5. Press Ctrl+X, press Y to agree, then type in ~/Documents/unmute.sh for the file name. Hit Return to save the new file, and nano should quit.
  6. Run the following commands in the Terminal, hitting Enter after each one:
    sudo chmod u+x ~/Documents/mute.sh
    sudo chmod u+x ~/Documents/unmute.sh
    sudo mv ~/Documents/mute.sh /Library/Scripts/
    sudo mv ~/Documents/unmute.sh /Library/Scripts/
    sudo defaults write com.apple.loginwindow LogoutHook /Library/Scripts/mute.sh
    sudo defaults write com.apple.loginwindow LoginHook /Library/Scripts/unmute.sh
  7. Close the Terminal and reboot your machine.
That last block of commands made your mute and unmute scripts executable, then moved them to your Library folder and set them to run when you log in and out, respectively. You should notice that when you rebooted, you didn't hear the startup chime, and that setting should persist.
To undo these actions, just run the following two commands in a Terminal window:
sudo defaults delete com.apple.loginwindow LogoutHook
sudo defaults delete com.apple.loginwindow LoginHook
That's it! From now on, you'll never embarrass yourself in front of your classmates, your sleeping roommate, or anyone else that might be annoyed by the loud noises involuntarily coming from your speakers.

No comments:

Post a Comment