LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-29-2017, 08:31 AM   #1
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,696

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Question 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.

This works but the sound returned on reboot:
Code:
xset b off
I tried this but no joy: https://blog.sleeplessbeastie.eu/201...e-system-bell/

I also tried this, no joy again: https://en.opensuse.org/SDBisabling_the_system_bell

Thanks.

Last edited by linustalman; 06-29-2017 at 08:50 AM.
 
Old 06-29-2017, 08:54 AM   #2
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
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.
 
1 members found this post helpful.
Old 06-29-2017, 09:31 AM   #3
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,696

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Post

Quote:
Originally Posted by IsaacKuo View Post
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 09:38 AM.
 
Old 06-29-2017, 10:10 AM   #4
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
What happens if you run the script in a terminal window? Use:
Code:
./mystartup.sh
Does it complain with any error?
 
Old 06-29-2017, 11:54 AM   #5
mralk3
Slackware Contributor
 
Registered: May 2015
Distribution: Slackware
Posts: 1,900

Rep: Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050Reputation: 1050
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.
 
Old 06-29-2017, 01:01 PM   #6
linustalman
LQ Guru
 
Registered: Mar 2010
Location: Ireland
Distribution: Debian 12 Bookworm
Posts: 5,696

Original Poster
Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
Thumbs up

Quote:
Originally Posted by IsaacKuo View Post
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. :-)
 
  


Reply

Tags
debian 9, system bell, xfce


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Debian GNU/Linux 9 "Stretch" Operating System Slated for Release on June 17, 2017 LXer Syndicated Linux News 0 05-26-2017 09:33 PM
[SOLVED] No System sound setting on debian with xfce desktop Higgsboson Linux - Newbie 6 01-24-2015 03:36 PM
LXer: Disable annoying bell in Gnome Terminal, vim, xterm, etc... LXer Syndicated Linux News 0 02-21-2012 12:50 PM
LXer: Use alsamixer to turn off the annoying, loud beep (aka system bell) in Debian Squeeze when you LXer Syndicated Linux News 0 01-18-2012 07:40 PM
Is it possible to run the XFCE window system in Debian? MurX Debian 1 02-26-2006 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration