Howto: Disable bash visual bell in console and X

Console

Add this line to ~/.bash_profile (or /etc/profile for systemwide configuration):

setterm -blength 0

X11

The following command does the same for the Xserver:

$ xset b off

To reenable use:

$ xset b on


Because xset only works when an Xserver is running, i put the command into the autostartscript of my windowmanager.
Windowmaker executes the shellscript ~/GNUstep/Library/Windowmaker/autostart once after its start.

less

If less is always beeping, or it is the only app you won't have beeping, add this to ~/.bash_profile:

export LESS="-q"