The sound you're hearing is likely the system bell, which is triggered by various applications, including web browsers, when certain actions are performed (like trying to delete non-existent text or navigating to a non-existent page). Here’s how you can disable or mute the system bell in an X11 environment on Linux:
1. Disable the System Bell via xset
The xset command can be used to control the system bell volume or disable it entirely.
-
To turn off the bell completely:
xset -b
This command disables the system bell globally.
-
To restore the bell (if needed):
xset b 100
This re-enables the bell at the default volume (100%).
2. Disable the Bell in Your Terminal Emulator
If the bell is triggered from a terminal, you can disable it in your terminal emulator's settings. For example:
-
In GNOME Terminal:
- Go to Edit > Preferences.
- Under the General tab, uncheck Audible bell.
-
In Konsole (KDE):
- Go to Settings > Edit Current Profile.
- Under the Appearance tab, uncheck Audible bell.
-
In XTerm or similar terminals:
Add the following to your .Xresources or .Xdefaults file:
XTerm*bell: false
Then reload the settings:
xrdb -merge ~/.Xresources
3. Disable the Bell in Your Browser
Some browsers may have their own settings for the system bell. For example:
4. Disable the System Bell in Your Window Manager
Some window managers allow you to disable the bell in their settings. For example, in Openbox, you can edit the menu.xml or rc.xml file to disable the bell.
5. Mute the System Volume
If you just want to mute the sound without disabling the bell, you can adjust the system volume:
amixer set Master mute
To unmute:
amixer set Master unmute
6. Disable the Bell in Specific Applications
Some applications have their own settings to disable the bell. Check the preferences or settings menu of the application triggering the bell.
7. Persistent Changes
To make changes persistent across reboots, add the xset -b command to your startup script or session initialization file (e.g., ~/.xinitrc, ~/.xsession, or your desktop environment's autostart).
Example for ~/.xinitrc:
xset -b
By using one or a combination of these methods, you should be able to effectively disable or mute the system bell in your Linux X11 environment.