Monday, June 11, 2012

Terminal bell in Ubuntu 12.04

I got a new HP PC at work to replace my approximately 5 year old Dell that is running Red Hat Enterprise 5.x.  Since I no longer support any servers running Red Hat and the stuff I work on is deployed on Solaris boxes, I decided to switch to Ubuntu.

One of the problems I discovered is that the terminal bell doesn't work.  It appears that when they decided to disable the PC speaker beep (which I actually sort of prefer in some cases), they also disabled the terminal bell without providing an easy way to re-enable it.  I was able to get it to work again by running the following:

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 

After doing this, I could hear the bell when doing "echo -e '\a'", when doing tab completion, or hitting Control-g in a non-windowed Emacs session.  Unfortunately, there is no bell sound in windowed Emacs sessions, though.


No comments:

Post a Comment