28

I newly installed xfce on Arch Linux. xfce makes a beep noise every time I press the delete button or backspace, which is really annoying. How can I disable this?

I tried un-commenting set bell-style none, but that didn't work.

2
  • 1
    Did you reload ~/.inputrc after uncommenting set bell-style none (reload command: bind -f ~/.inputrc)? If yes, then try one of the mentioned methods. E.g. by unloading pcspkr module: rmmod pcspkr or by xset b off. Jul 8, 2015 at 15:28
  • 1
    Might I recommend this?
    – HalosGhost
    Jul 9, 2015 at 3:54

5 Answers 5

37

To disable the bell for all X applications:

xset b off 
4
  • 1
    May be helpful: xfce.10915.n7.nabble.com/Beep-td8866.html Aug 28, 2015 at 0:42
  • This works fine. Although after rebooting I have to redo it. Is there a way to permanently disable it?
    – math
    Apr 9, 2018 at 8:36
  • 1
    @math You can add it to your .xinitrc file
    – prosoitos
    Jan 26, 2019 at 21:00
  • If you are using a preinstalled XFCE instance you can add it in Session and Startup as well. Nov 5, 2021 at 14:42
13

Go to SETTINGS → SESSION → STARTUP, button ADD, type: name "beep" and in last field type "xset b off".

1
  • In Settings -> Session and Startup there is no "Startup" section. There is a Settings -> Session and Startup -> Application Autostart -> Add button... is that what you are referring to?
    – Alcamtar
    May 30, 2020 at 14:50
3

This Arch Wiki page lists all the options to disable PC speaker (beep) very nicely: https://wiki.archlinux.org/index.php/PC_speaker

For instance, as mentioned by @SauceMcBoss, you can set:

xset -b

(or xset b off) to disable it in Xorg (which will solve your problem). To make the change permanent, add this line to either your .xinitrc or xprofile file.

Or, to disable the PC speaker globally within one session, the pcspkr kernel module can be unloaded with:

rmmod pcspkr

To prevent its loading by udev at boot, you can blacklist it in a .conf file in /etc/modprobe.d/. For instance:

echo "blacklist pcspkr" > /etc/modprobe.d/blacklist.conf
1

I've tried every single thing in this article, and more, and none of them worked. Sure some disabled the system beep for the terminal application, but all of the OS-related beeps were still on. What finally worked? Finding and renaming the dang sound file (and logging out and back in of my X session). /usr/share/sounds/ubuntu/stereo/bell.ogg I renamed the above to "bell2.ogg".

Now I can use my computer without wanting to flip my desk over.

Who the hell thought a super loud beep every time you pressed a key was a good idea? It's like some sort of weird psychological torture.

Note, this will probably revert itself if the ubuntu-sounds package requires an upgrade, and you'll need to re-move the file off.

0

In XFCE, similar to this answer, you can disable the bell on XFCE login like this:

cat <<EOF > ~/.config/autostart/beep.desktop
[Desktop Entry]
Encoding=UTF-8
Version=0.9.4
Type=Application
Name=beep
Comment=
Exec=DISPLAY=:10 xset b off
OnlyShowIn=XFCE;
RunHook=0
StartupNotify=false
Terminal=false
Hidden=false
EOF

Tested on Debian 11 Bullseye with XFCE4. Also works over RDP connections using FreeRDP (the DISPLAY=:10 env variable is set because of that, if you use the default X display, then you don't need it).

P.S. I really hope XFCE and other window manager maintainers come to their senses and introduce a sensible default, namely to disable this terrible system bell because it's such a nuissance and annoynace you wouldn't believe. It's extremely annoying and can literally scare small babies and even grownups. Please get rid of this bell.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.