Posts: 1
Joined: Fri Aug 09, 2013 3:26 pm

Enabling audible terminal bell/beep on wheezy

Fri Aug 09, 2013 3:29 pm

<http://raspberrypi.stackexchange.com/qu ... -on-wheezy>

I am trying to enable an audible terminal bell/beep through the 1/8" mini-rca audio out (headphone jack) on debian wheezy with the rapsberry pi model b. Normal audio works as expected, when playing a shockwave file in Midori with gnash for example.

I turned the Audible bell setting in LXTerminal preferences ON, and tried the following:

$ xkbbell (no sound)

$ xkbbell -dev 0 (X Error of failed request: 146)

$ beep and $ beep -f 500 -l 700 after installing it with apt (no sound)

That said, this is all in an attempt to hear the bell sound triggered by PuTTY, when Action to happen when a bell occurs is set to Make default system alert sound. There is no option, like in the Windows version of PuTTY, to play a custom sound file when a bell occurs.

I've read that running # modprobe snd_hda_intel on other linux machines can redirect sound output intended for the PC speaker (which the raspberry lacks) to ALSA. Running that command tells me that this module is not found. I don't know how to acquire it with apt.

I really hoping someone has some insight...I'm dizzy from Googling!

Posts: 19
Joined: Wed Jul 10, 2013 10:02 pm
Location: S.California

Re: Enabling audible terminal bell/beep on wheezy

Wed Sep 18, 2013 11:43 pm

Hi, its been over a month since this inquiry. I've also been fiddling with the audible terminal bell or terminal beep for weeks. Having worked many flavors of Unix/Linux using "vi" (vim on raspian), I really miss the the reaffirming little beep when I hit the escape key to end new input. In fact as I'm typing this, I keep using vi syntax to try to create this post and making typos :)

I've come to the conclusion that the lack of an audible terminal bell in a console session (Alt-F1-6) or a LXterminal session is somehow a mistake in the current Raspian OS (debian wheezy) version. Maybe its a driver issue where the terminal type ($TERM=linux for console and $TERM=xterm in LXterminal) do not convey the audible bell to the default sound device. At a shell prompt type Ctrl-A followed by Ctrl-G to sound a bell if it works.

The interesting thing is that if I ssh into the pi box from my Win7 PC (putty) and use vi, I DO GET the audible bell on my PC.

Today I have settled for using a "visible bell" since I haven't found an audible solution for consoles or xterms on the rpi. I made a tweak in /etc/inputrc. I activated "set bell-style visible".

This seems to work for both consoles and xterms. I also created the file .vimrc in my home directory with a single entry "set vb", which means set visual bell. This tells vi to flash the screen.

When I use the esc key in vi or type Ctrl-A Ctrl-G the screen flashes. Good enough for now until I see an actual fix for audible bells.

BTW my default sound device is the earphone/speaker port on the Rpi going to an amp/speaker or to the speakers in my monitor. Sound works fine as tested with "speaker-test -t sine 880" and playing sound files.

The code Ctrl-G has historically been used to sound a terminal bell. I think it comes from the old teletype days. Ctrl-G should work with terminals and printers. Similarly, Ctrl-H has been used for backspace. However, if an output device (terminal, screen, printer) does not have this in its firmware programming, then stuff doesn't work, and you may have to do some termcap/printcap trickery, maybe with some driver help.


User avatar
Posts: 72
Joined: Tue Mar 12, 2013 8:43 am
Location: 3rd planet

Re: Enabling audible terminal bell/beep on wheezy

Thu Sep 19, 2013 6:18 pm

Thanks for the link. This works for me sufficiently.

Return to “Advanced users”