# Disabling terminal bell from xinitrc ?



## hippo (Nov 20, 2010)

Hello.
I have a minor (but annoying) issue under X on FreeBS 8.1 (only!).  Wherever I put "*xset -b*" in /etc/X11/xinit/xinitrc (the one I start X from), it is ignored. I don't use xset anywhere else after that point (like in profile or login files). The following has no effect on terminal bell - snipp of (a very long) /etc/x11/xinit/xinitrc:


```
case $WM in
.....
esac
[color="DarkRed"]xset -b[/color]
exec $WM
```

I have to execute it manually after X start. I wonder why/who/where resets the bell default or why this command is ignored in xinitrc. I didn't remember having that problem before (I might have forgottent though). I use this method (among others) to start X under several different OS, other BSDs and different Linux, disabling the bell in xinitrc when necessary (OpenBSD does that in /etc/wsconsctl.conf) and it seems that I'm having that issue under FreeBSD 8.1 only. 

I can live with that but would like to understand ... and so fix it. 
Any idea?


----------



## Beastie (Nov 20, 2010)

Put *hw.syscons.bell=0* in /etc/sysctl.conf and disable it on the running system with
`# sysctl hw.syscons.bell=0`


----------



## hippo (Nov 21, 2010)

Thanks a lot! That's exactly what I was looking for. I actually did [cmd=]sysctl -a | grep beep[/cmd] should have grepped 'bell' instead. 
As for disabling it on the running system, I think [cmd=]/usr/sbin/kbdcontrol -b off[/cmd] does the job too. I found it back on a "shutup" script I made for that purpose.


----------

