Disable annoying alarms in Linux

Source: Internet
Author: User
In Linux, shut down the annoying bell-general Linux technology-Linux technology and application information. The following is a detailed description. My machine is equipped with a PC speaker. Every time I run a command on the terminal after linux is installed, errors or other situations may sound annoying. So I tried to remove it. I searched the internet for a while and finally found the answer and shared it with you.

In the X Window System, you can use the xset command. The command is as follows: xset B off (enter xset and press enter to obtain the xset Command Option)

In the gnome environment, there is a system setting, which is hard to remember. (It has been useless for a long time) it seems that there is an option to close the system Bell, and it is OK to remove the previous check.

The two above are self-developed. On the console terminal, how does one close the bell?

In the past, the system rang because our application wanted the terminal to issue a 0x7 character. After the terminal receives this character, it will ring and the solution to the problem has appeared. Right, we will not allow our program to send this character to the terminal.

For example, you can run the "setopt nobeep nohistbeep nolistbeep" command for zsh"

Or tell our application to send other characters to the terminal, such as null characters. This involves two files: terminfo and termindo. I didn't try it.

Another way is to remove the driver module of the PC horn. The command used is rmmod pcspkr.

In addition, the program CT, script, or screen is used to run our program on a virtual terminal. They will interpret the character 0x7 as other characters. Gnu screen is the simplest method ~ /. Add the following two lines to the screenrc file:

Vbell on
Termcapinfo * vb =
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.