- 论坛徽章:
- 0
|
很是烦终端里的BELL声,还有手机的按键声,听着让人很是心烦!所以,一向是关掉所有类似的声响,让自己可以多点时间清静一下。
在debian的etch中,在“/etc/inputrc"中加入了”set bell-style none“,只解决了在终端里的BELL。(关于inputrc文件可以用"man readline"查看详细说明。)但是,以vim里,还是有!于是在”/etc/vim/vimrc"中再加入“set vb"彻底把BELL关了!
网上的个关于这个的FAQ:
原文:http://www.cyberciti.biz/faq/how-to-linux-disable-or-turn-off-beep-sound-for-terminal/
Q. This beep sound is annoying, how do I disable it forever?
A. To be frank there are many ways exists - to turn off terminal
beep. Use any one of the following method as per your requirements.
If you are using Gnome terminal
a) Open Gnome terminal
b) Click on Settings > Preferences > Silence Terminal Bell
Or Click on General Tab -> General -> Un-Check Terminal bell option
If you are using xterm
Open ~/.xsession file (i.e. /home/you/.xession)
$ cd
$ vi .xession
Append following line
xset b off
Save and close the file.
If you are using bash
Open you ~/.inputrc file (i.e. /home/you/.inputrc file
$ cd
$ vi .inputrc
Append following line:
set bell-style none
Save and close the file.
If you just want to turn off beep for VIM text editor:
Open vim config file ~/.vimrc (i.e. /home/you/.vimrc)
$ cd
$ Vi .vimrc
Append following line
set vb
Save and close the file.
If you are using Ubuntu Linux
a) Click on Applications > Accessories > Terminal
b) Now click on Edit Menu > Current Profile
c) Click on General Tab > General > Remove check box (Terminal bell)
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/18852/showart_240153.html |
|