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.
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