LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   A Solution for Disabling the Annoying PC Beep (Ubuntu) (https://www.linuxquestions.org/questions/linux-hardware-18/a-solution-for-disabling-the-annoying-pc-beep-ubuntu-801056/)

Jaysonfw 04-09-2010 10:28 AM

A Solution for Disabling the Annoying PC Beep (Ubuntu)
 
When in a virtual tty, Ubuntu has an extremely annoying audible beep alert to notify the user that he is trying to do something that can't be done. Say for instance, hitting the backspace key at the command prompt. The cursor can not back up from there, so the system issues out a loud obnoxious BEEP in response. I am in a virtual tty often, and have found myself on a quest to eradicate that annoying BEEP from my system, if it is the last thing I do. After trying several modprobe, and other solutions, that did not work, I have found a solution that does.

alsamixer has a setting for 'PC Beep' that can be muted, silencing all audible system complaints from a virtual tty.

It would be a pain to do this every time, so...

amixer is a command line interface to alsamixer. By placing the following command in my .bashrc file, I have solved my problem.

amixer set 'PC Beep' disable

Hope that helps someone else.

David the H. 04-09-2010 11:27 AM

The beep in the bash shell is generally issued by the readline library, and can be disabled in its configuration settings. Just add "set bell-style none" to your ~/.inputrc file and it should disable the readline notifications, while leaving the system speaker enabled for use by other commands (such as issuing 'echo -e "\a"' :)).

You can read more about readline in the bash man page.

FYI, kde's konsole also has settings for configuring how the bell/system notification behaves.

Jaysonfw 04-09-2010 12:04 PM

Quote:

Originally Posted by David the H. (Post 3930076)
The beep in the bash shell is generally issued by the readline library, and can be disabled in its configuration settings. Just add "set bell-style none" to your ~/.inputrc file and it should disable the readline notifications, while leaving the system speaker enabled for use by other commands (such as issuing 'echo -e "\a"' :)).

I knew there had to be something!
Thanks for the proper way to do this.


All times are GMT -5. The time now is 05:54 AM.