How do I turn on/off the beep in the terminal in Linux?

0

0

In linux echo -e '\a' is one way you can alert the user with a beep.

  • But if it isn't working how to enable or diagnose it?
  • And if it is working how's the best way to quiet it.

(This was asked here but that question was closed.)

Elliptical view

Posted 2018-06-13T08:21:53.870

Reputation: 864

Answers

1

It's much easier to disable. Getting the beep to work can be harder.

Here are some things to look at.

  • If using GNOME Terminal, Menu> Edit> Profile preferences> Terminal bell check box.
  • If using GNOME ALSA Mixer under the tab for your sound driver> Beep column> check or uncheck the Mute box and set volume. (You might first have to show the Beep column with Menu> Edit> Sound Card Properties.)

For me (a notebook running Debian Stretch) these don't seem to matter:


  • set prefer-visible-bell on
  • set prefer-visible-bell off

  • sudo modprobe -r pcspkr
  • sudo modprobe pcspkr

Elliptical view

Posted 2018-06-13T08:21:53.870

Reputation: 864

1

I had some issues turning off the bell in xterm, to fully eliminate the sound on my system, Fedora 30, I replaced the in use alarm sound in /usr/share/sounds/gnome/default/alerts by an .ogg file with no sound.

Mathieu Borderé

Posted 2018-06-13T08:21:53.870

Reputation: 111