How can I mute alerts on Ubuntu Precise on the command line, like in System settings > Sound > Sound effects?
2 Answers
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 org > gnome > desktop > sound to find the event-sounds option.
-
Not muting audio altogether, but muting the annoying sound effects like feedback when adjusting the volume, the terminal bell etc. See this screenshot: i.sstatic.net/DgndP.pngJoó Ádám– Joó Ádám2016-09-11 18:00:18 +00:00Commented Sep 11, 2016 at 18:00
-
Updated to disable
event-soundsonly.codewithmichael– codewithmichael2016-09-11 18:50:28 +00:00Commented Sep 11, 2016 at 18:50 -
Thanks. Unfortunately, that key must be responsible for something else, since setting the preference from the GUI has no effect on the dconf setting. Actually, I just diffed the output of
gsettings list-recursivelybefore and after changing the setting and there’s no difference whatsoever. What I have found though, is that~/.pulse/097d18fb4ffdc9214b29c17d0000000f-stream-volumes.tdbdoes change when I change the setting on the GUI, but I know nothing about those files.Joó Ádám– Joó Ádám2016-09-11 19:19:30 +00:00Commented Sep 11, 2016 at 19:19 -
event-soundsis sort of a blanket meta setting. Adjusting individual sound effect settings in the Gnome settings window provides a subset adjustment. From past experience, settingevent-soundstofalseentirely disables the individual sound settings section in the Gnome sound settings window (along with disabling the notification sounds themselves). Unfortunately, I don't know any console commands to affect the sound effects individually. I do know the~/.pulse/*.tdbfiles control PulseAudio-specific settings on a per-user basis, but that's all I know on that one.codewithmichael– codewithmichael2016-09-11 19:39:56 +00:00Commented Sep 11, 2016 at 19:39 -
By the way, did you actually test to see if the notification sounds were muted after running the
gsettingscommand (aside from what the settings window says)?codewithmichael– codewithmichael2016-09-11 19:42:11 +00:00Commented Sep 11, 2016 at 19:42
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.