silence bell in sh

How do you silence the bell in sh in FreeBSD 15?

I.e. I don't wan't to hear anything on the speaker on pressing backspace in an empty command line.

printf "\007" should still work, so no sysctl

set bell-style none does not work.
 
If you're using xterm, you can specify -vb on the command line, which will make xterm use a 'visual bell' (a brief flash) rather than sounding the system bell. Just say
$ xterm -vb
 
[…] I don't wan't to hear anything on the speaker on pressing backspace in an empty command line.

printf "\007" should still work, so no sysctl […]
Unfortunately this is not possible. sh(1) uses editline(3). It has one terminal_beep procedure. Neither terminal_beep nor every location calling terminal_beep consult some configuration switch. Error condition → unconditionally ring bell.​
sysctl kern.vt.enable_bell=0
This is already the default and for non‑root users it’s kbdcontrol(1)  ‑b off anyway.​
 
Unfortunately this is not possible. sh(1) uses editline(3). It has one terminal_beep procedure. Neither terminal_beep nor every location calling terminal_beep consult some configuration switch. Error condition → unconditionally ring bell.
This is already the default and for non‑root users it’s kbdcontrol(1)  ‑b off anyway.​
Never noticed. It's an old syscons annoyance. Disabling the speaker entirely would be better but I've never seen a command for that. Maybe a problem because it's a stone-age device.
 
Never noticed. It's an old syscons annoyance. Disabling the speaker entirely would be better but I've never seen a command for that. Maybe a problem because it's a stone-age device.

Ever since I no longer need to do PCM voice generation on the PC speaker I've found it a useless piece of hardware. I'd disconnect the speaker, or if it is on the mobo then chew a piece of gum and stick it on the component. LOL
 
Ever since I no longer need to do PCM voice generation on the PC speaker I've found it a useless piece of hardware. I'd disconnect the speaker, or if it is on the mobo then chew a piece of gum and stick it on the component. LOL
It's still somehow relevant. I have a PC that I boot without a monitor. If it beeps with the speaker it's gone through POST succesfully and tries to find the boot device. If it can't boot because of broken memory or whatever, it doesn't beep either or allot because of a RAM error. There's still a piece of feedback in it that's not in the hifi PCI amp.
 
Back
Top