Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

There is an option in the Sound Preferences dialog, Sound Effects tab, to toggle Alert volume 'mute'. It works and suffices for my needs to disable the irritating system beep/bell.

However, I reinstall systems a LOT for testing purposes and would like to set this setting in a shell script so it's off without having to fiddle with a GUI. But for the life of me I can't seem to find where this can be toggled via a command line tool.

I've scanned through gconf-editor, pulseaudio's pacmd, grepped through /etc, even dug through the gnome-volume-control source code, but I am not seeing how this can be set.

I gather that gnome-volume-control has changed since a few releases ago.

Ideas?

share|improve this question
add comment

2 Answers

up vote 6 down vote accepted
  • Option 0: (this might be what you were looking for)

    sudo su gdm -c "gconftool-2 --set /desktop/gnome/sound/event_sounds --type bool false"
    
  • Option 1:

    Temporary:

    sudo modprobe -r pcspkr  
    

    Permanent

    echo “blacklist pcspkr” >> /etc/modprobe.d/blacklist
    
  • Option 2:

    Search for "set bell-style" in /etc/inputrc (options are none or visible)

  • Option 3:

    sudo mv -v /usr/share/sounds/ubuntu/stereo/*.ogg {*.disabled}
    
  • Option 4:

    man xset
    
share|improve this answer
    
I've actually already done that, but the Alert bell comes through the audio speakers via pulseaudio, not the on-board PC speaker (which I left unplugged in the case anyway). –  Bryce Feb 9 '11 at 22:15
    
It seems to me that a few releases back this could be controlled via gconf, but I didn't see anything with gconftool-2 or gconf-editor. There is also a pacmd utility for manipulating sound settings, which seems like it should be the right tool but I can't discern what sequence of commands would result in toggling that setting. (I tried running pacmd info before and after toggling the Alert mute and diffing the output, but didn't see anything relevant.) –  Bryce Feb 9 '11 at 22:18
    
Hmm, it would be nice if the downvoters said why they downvoted so I could "fix" the answer... –  bumbling fool Feb 10 '11 at 15:23
add comment

Hunted for this for a long while. Especially since I do not use pulseaudio and I cannot mute the alert sound from the UI (WTF!?)

This does it. Oh the sweet joy of silence!

# gsettings set org.gnome.desktop.sound event-sounds false
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.