Switch off sound on Ubuntu before login

Posted in Linux on May 15th, 2008 by Philipp C. Heckel – 1 Comment

Most of the Ubuntu users know the situation: You’re sitting in a public place, let’s say a lecture or a cafĂ©, and you forgot to switch off the sound of your laptop. Unfortunately, you can’t avoid the first short drumming. But by using the following command, it is at least possible to switch off the longer welcome melody of Ubuntu before you actually log in.

Preparation: Create a short mute-script

Create your custom .bin-directory, add it to your .bashrc, create a mute-script and make it executable.

 $ mkdir ~/.bin
 $ echo -e '\n# Private binaries\nexport PATH=$PATH:~/.bin' >> ~/.bashrc
 $ echo -e '#!/bin/bash\namixer set Master mute' > ~/.bin/mute
 $ chmod +x ~/.bin/mute

Avoid the embarrassment: Use the script

You can now use the script by simply typing mute in your console window. To use it before logging into GNOME/KDE, follow these steps.

  • Switch to a different tty by pressing CTRL+ALT+F1
  • Log in with your username and password
  • Run the script by typing mute
  • And finally switch back to the graphical login window: CTRL+ALT+F7

Well, I hope this helps a little. Of course you don’t have to use the script but can just type:

$ amixer set Master mute

.

  1. jonny rocket says:
  1. There are no trackbacks for this post yet.

Leave a Reply