Thursday, May 15, 2008

Goodbye Console Beep

I guess the console beeps for a reason, but I find it annoying for the most part, and I can generally tell when something isn't working. Here's the procedure to disable console beep in X and on the console.

# Console
setterm -blength 0

# X Windows
xset b off


Steve Laniel said...

I've found that for whatever reason, the xset method doesn't permanently stop the beep -- even if we define "permanently" to mean "until the next reboot." Looks like the more-permanent way to do it is to remove the pcspkr module altogether, via

sudo modprobe -r pcspkr

(preferred, for reasons I can't totally explain, other than that modprobe is the new hotness)


sudo rmmod pcspkr

(perhaps more portable?)

Then put

blacklist pcspkr

in /etc/modprobe.d/blacklist . Whether that file exists, or exists at that path, will unfortunately depend on which Linux variant you're using. That one works for Ubuntu, and may work for Debian derivatives generally. (Is the Linux Standard Base just dead?)

Steve Laniel said...

Of course the most portable and permanent way to disable the PC speaker is to unplug the damn thing.

HaC|away said...

Don't know why i even HAVE such a thing (: