Ubuntu: How do I make the 'beep' command work?



Question:

I am trying to use the beep command, but it doesn't beep any sound.

I installed it with sudo apt-get install beep, then I ran beep and nothing happen (no error displayed or sound played). I've also ran sudo modprobe pcspkr, and sudo alsamixer, unmuted "beep" and put the db gain to 100. And sudo alsactl store after that.

Is there a way to fix it or an alternative to beep?

I am using Ubuntu 10.04.


Solution:1

Does it have to be the system beep or can it be any sound?

You have a command on your system to play command line sounds. For instance open a terminal with Alt-F2 and

cd /usr/share/sounds/alsa/  aplay Front_Center.wav  

will play this Front_Center.wav.

So all you need is to find a beep.wav on the web and use aplay with it.


Solution:2

although over 2 years old i found using beep still to be an issue on my ubuntu 12.04 based system.

after making sure the beep mixer level is > 0 through alsamixer the solution to a similar question at this askubuntu answer worked fine for me; it boils down to un-blacklisting the pcspkr module in /etc/modprobe.d/blacklist.conf.

as described in the accepted answer a more pleasant audible notification could be achieved through playing some notification sounds present by default on most systems such as (for gnome based systems) e.g. paplay /usr/share/sounds/gnome/default/alerts/glass.ogg

note that paplay (using pulse audio) might nowadays be the way to go instead of the alsa-based (but still working) aplay.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »