[SOLVED] How to disable system bell in Debian 9 Stretch Xfce?
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How to disable system bell in Debian 9 Stretch Xfce?
Hi.
How can I disable the system bell in Debian 9 Stretch Xfce?
It beeps if for example I'm in a text editor at the top of the page and push left arrow key. Or if I'm in Thunar and click the arrow but cannot move to another directory, etc.
Since you're using XFCE4, I would suggest creating a small shell script and adding it to the XFCE4 Sessions and Startup autostart. I'd make it look something like this:
Code:
#!/bin/sh
sleep 5
xset b off
If you don't know how to make a shell script, first use a text editor to create the file (call it mystartup.sh) and set it to executable with:
Code:
chmod 755 mystartup.sh
Then go into XFCE4's Session and Startup settings and add it to the Application Autostart tab.
Note that in this example it waits 5 seconds before running "xset b off". I find that adding a time delay helps ensure that XFCE4 has fully loaded up before we start messing with X settings. Otherwise, there's a decent chance of the script and XFCE4 stepping on each other's toes.
Since you're using XFCE4, I would suggest creating a small shell script and adding it to the XFCE4 Sessions and Startup autostart. I'd make it look something like this:
Code:
#!/bin/sh
sleep 5
xset b off
If you don't know how to make a shell script, first use a text editor to create the file (call it mystartup.sh) and set it to executable with:
Code:
chmod 755 mystartup.sh
Then go into XFCE4's Session and Startup settings and add it to the Application Autostart tab.
Note that in this example it waits 5 seconds before running "xset b off". I find that adding a time delay helps ensure that XFCE4 has fully loaded up before we start messing with X settings. Otherwise, there's a decent chance of the script and XFCE4 stepping on each other's toes.
Hi Isaac.
The beep remains.
Would it make a difference if '#!/bin/bash' was used instead in the script? Edit: it doesn't.
This is very odd because if I manually put 'xset b off' into the terminal, the bell sound goes away. But in the script it never takes effect.
Last edited by linustalman; 06-29-2017 at 10:38 AM.
How to disable system bell in Debian 9 Stretch Xfce?
Blacklist the "pcspkr" kernel module, rebuild the initramfs, then reboot. I haven't ran Debian in quite a while, but this used to be something I did on all my new installations.
What happens if you run the script in a terminal window? Use:
Code:
./mystartup.sh
Does it complain with any error?
My mistake. When I copied the code from your post, sleep 5 and xset b off ended up on the same line. The script works perfectly. Thank you very much. :-)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.