Thursday, January 1, 2015

System beep for Ubuntu 12.04 LTS

In recent Ubuntu versions, I noticed that system beep sound in the  terminal is disabled due to some reason. I searched how to re-enable it but it seems not that  easy. Finally I found some workaround for this problem from this link. So, in this post, I'm just writing down the steps I followed to enable system beep. Open a terminal and enter following commands.

pactl upload-sample /usr/share/sounds/ubuntu/stereo/bell.ogg bell.ogg

pactl load-module module-x11-bell display=:0.0 sample=bell.ogg

xset b 100

Now, system beep should work. I can try it by entering following line in the terminal  and enter.

echo -e '\a'

Following content can be saved as a shell script and used to continuously play system beep.


1
2
3
4
5
6
7
8
#---------------------------------------------------------------------
while [ 1 ]
do
        echo "Welcome $count times"
        echo -e '\a'
        sleep 0.5s
done
#---------------------------------------------------------------------

No comments:

Post a Comment