How can I mute alerts on Ubuntu Precise on the command line, like in System settings > Sound > Sound effects?
If you're just trying to mute audio, this should work on most modern Ubuntu distros:
amixer set Master mute
Of course, YMMV with older distros or custom sound setups.
Update: (for event sounds only)
I don't have an Ubuntu 12.04 LiveCD handy to test, but on 16.04 you can use
gsettings to disable just the
event-sounds key like so:
gsettings set org.gnome.desktop.sound event-sounds false
Note: That only applies the settings for the current user.
The core settings haven't changed much over the past few years, so it may do what you need. Run the command with
true to re-enable event sounds.
gsettings is just a wrapper for
dconf, so if you want graphical state verification, you can
sudo apt-get install dconf-editor. Running
dconf-editor will give you a GUI to manage a number of higher-level system settings. Use the left dropdown list to navigate to
sound to find the
Old thread, but since I encountered the same issue on debian I thought I'd tell what I found as a close solution.
I'd live boot into a clean iso of the distro and open the System settings > Sound > Sound effects and turn these sounds off as I preferred, then I'd copy the file
~/.config/pulse/*-stream-volumes.tdb and save it on my hard drive. Then whenever I'd need to turn off the "sound effects" on an installed environment or while building a custom version of the distro I'd
cp saved-pulse-volumes.tdb ~/.config/pulse/*-stream-volumes.tdb. This worked like a charm for me.
Note: In the time of this answer, the dconf key:
org.gnome.desktop.sound event-sounds didn't turn off the slider volume sound effect, at least not in debian.