I see the kernel module pcspkr
is blacklisted in Ubuntu 16.04 and indeed when I do a lsmod
it doesn't show up. But I still get that annoying loud beep in terminal or GUI editor when pressing ← or ↑ at top of file. Same crazy beep when pressing → and ↓ when at bottom of file.
I've tried downloading the beep
command and overriding pcskr
, which presumably is blacklisted anyway, without any effect.
I read about pulseaudio X-11 bell feature and tried to set that up with a nice soft chime
sound but no luck there either.
I searched on this topic and the only thing I found was a user who wanted the reverse to turn off wood knock sound and turn on classic beep.
Hopefully others are annoyed by this 1980's style beep and can point me in the right direction. Thanks in advance.
Edit 1
I read through various bug reports this morning but again it seems people want the bell not trying to get rid of it like me.
Found a promising looking directory: ls /usr/share/sounds/ubuntu/stereo/
bell.ogg desktop-logout.ogg message-new-instant.ogg service-login.ogg
button-pressed.ogg dialog-error.ogg message.ogg service-logout.ogg
button-toggle-off.ogg dialog-information.ogg phone-incoming-call.ogg system-ready.ogg
button-toggle-on.ogg dialog-question.ogg phone-outgoing-busy.ogg window-slide.ogg
desktop-login.ogg dialog-warning.ogg phone-outgoing-calling.ogg
Found a nifty program ogg123
that plays music files through the terminal. I think it's installed by default in Ubuntu 16.04.
When you enter: ogg123 /usr/share/sounds/ubuntu/stereo/message.ogg
Audio Device: PulseAudio Output
Playing: /usr/share/sounds/ubuntu/stereo/message.ogg
Ogg Vorbis stream: 2 channel, 44100 Hz
…you get a pleasant bubble popping sound. Press ↑ and change message.ogg
to bell.ogg
and you get a low bass drum beat (not as pleasant as message.ogg but better than beep). Additionally ogg123 plays the sounds to the default sound device (in my case hdmi TV) instead of the pc speaker. I think it would better if sound played through the device containing the active window that generated the alert though.
From Launcher choosing: System Settings
, Sound
, Sound Effects
looks like this:
Now the challenge is getting the system sounds already available into the sound effects alert window. Afterwards, according to bug reports there might be a new challenge selecting them and making them behave appropriately.
Edit 2 – Exploring Sounds using GUI method
Using Nautilus
it's easier to explore sound directories. Simply click on a sound file and Rhythm Box
(the default) will play them. By exploring via GUI, the sub-directory notifications
contains more appropriate alerts than the sub-directory stereo
. Sample screen below:
Best Answer
After much searching I found typing this in the Terminal works:
It will give a soft bubble popping sound instead of annoying beep. All the other
.ogg
files can be used from/usr/share/sounds/ubuntu/stereo
and/usr/share/sounds/ubuntu/notifications
.The next step is to make it persistent but at least after long hours of searching progress has been made!
Edit 1 - Making it persistent
Internet searches suggest putting:
into the file
~/.profile
but that didn't work. Perhaps pulseaudio wasn't running at that time?So I ended up putting it in
Startup Applications
in this screen:Now it the annoying beeping is gone and a soft bubble popping sound works like a charm in the
terminal
andgedit
.Edit 2 - Create bash playall, default and menu scripts
Rather than switching directories to select the bell de jour I created a new directory and copied sound candidates from
/usr/share/sounds/.../...
there:Next I created a script to sample all sounds in a directory. If a given sound file plays to long you can skip to the end with Ctrl+C.
A special sound file called
default.ogg
is used to set the bell sound during boot. To set the default a new script was created.Coinciding with the new script above the
Startup Applications
described above was changed to look like this:The final step was to create a bash menu to play all sounds, listen to a single sound and update last listened to single sound to the default. The menu design was taken from this askubuntu quesiton: Create bash menu based on file list (map files to numbers). If you like my menu you should go to that question and up-vote that author's answer.
The drawback of this design is when you select
play all
the menu scrolls off the screen and you need to scroll back the window to see the options again.Phew that's it.