I use Nautilus to explore my files. I use a Debian-based OS with KDE Plasma 5.

I use the keyboard a lot. When I press the key up when navigating files, if I'm already at the extremity of the list of files, Nautilus sends a big system beep which I will hear at 100% volume through my headphones. My reaction is comparable to getting electrified.

I have placed the following lines in ~/.bashrc for the sudo (root) user and for my regular desktop user:

# Turn off system beep in console:
xset b off
xset b 0 0 0

However, despite the beep going away from some places in the OS (such as erasing an empty line in the gnome-terminal), it's still in Nautilus. I believe it's because Nautilus doesn't source any of the .bashrc or because it ignores the xset commands.

How do I fix this?

What I need might be at a deeper level than the .bashrc, some file that is executed by everything, but which can still control the sound. Otherwise, disabling the sound another way or replacing it could be interesting.

  • 3
    Is it a system beep (so loud tone), or sound (bark/drip/dong etc for gnome)? If its the former its probably system level (in which case, try disabling the pcspkr module, or using a different sound card - if its the latter you will have to turn off the sound in system settings (including Gnome's as in Stephen's answer) – Wilf Jul 2 '18 at 12:01
  • 10
    Just to make it explicit for those who didn't realize it: ~/.bashrc is the user configuration file of the bash shell, the default Debian terminal shell. If you realize that, it's pretty obvious why bash settings do not affect other applications like Nautilus. – MSalters Jul 2 '18 at 12:04
  • 3
    Some sound cards have the system beep as a separate channel which can be muted. – Simon Richter Jul 2 '18 at 12:25
  • 3
    Try using ~/.profile instead of ~/.bashrc. As noted by @MSalters, ~/.bashrc is run when you open a new terminal, and not when you log in. ~/.profile is run when you log in. (Laughed good on your reaction, I've experienced it myself!) – Teodor Jul 2 '18 at 15:56
  • 16
    Wire cutters; just cut it out ^^ – esoterik Jul 2 '18 at 17:16

Short of muting the sound entirely or disconnecting your headphones, there is no system-wide setting for events which will be followed by all applications. In your case especially, since you’re using Nautilus on a KDE system, you’ll run into issues since Nautilus won’t follow your desktop’s configured behaviour.

Nautilus uses GNOME’s settings. If you have the GNOME control centre, you can disable sound effects there — go to the sound settings, and disable sound effects. Alternatively, run dconf-editor, go to “org/gnome/desktop/sound”, and disable “event-sounds” and “input-feedback-sounds”. You can do this from the command line too, see How to turn off alert sounds/sound effects on Gnome from terminal? for details.

  • I don't think this is true. If it is using the PC speaker, you can disable that globally. – forest Jul 3 '18 at 7:52
  • 8
    @forest the question states “Nautilus will send a big system beep which I will hear at 100% volume through my headphones”. That can’t be disabled by disabling the PC speaker. – Stephen Kitt Jul 3 '18 at 7:57
  • Nitpicking, but there is a kernel configuration setting that sends requests to trigger the PC speaker through the ALSA driver instead, but I don't know if any distros actually do that by default. But that's probably not the case, so good point. – forest Jul 3 '18 at 7:59
  • 7
    @forest there’s really a terminology issue in the question — Nautilus doesn’t use the system beep. – Stephen Kitt Jul 3 '18 at 8:00
  • Thanks, it worked. dconf-editor path “org/gnome/desktop/sound” had beep sound(event sounds) on. I turned it off. – mss May 29 '20 at 4:55

I do not know what sound KDE does, but if you mean system beep, just disable loading of the pcspkr module. As root do:

rmmod pcspkr ; echo "blacklist pcspkr" >>/etc/modprobe.d/blacklist.conf

  • 3
    This only disables the PC speaker, which Nautilus doesn't use. You're solving the wrong problem. – Gilles 'SO- stop being evil' Jul 3 '18 at 11:10
  • 2
    I was amused yet annoyed to learn my new Lenovo laptop has a speaker. Every time I hit backspace one too many times, have a failed Ctrl+F search in Firefox, have a failed tab completion... always this loud, obnoxious beep. Instead of configuring each piece of software, removing the pcspkr mod worked! (I needed to use /sbin/rmmod by the way, PATH was not set correctly for root.) – Luc Sep 14 '18 at 19:45
  • I have a Lenovo Y700 and I also was surprise that it has the old and good PC Speaker inside. So this solution worked to me! Thank you. No more annoying bells and beeps. – Felipe Jun 9 '20 at 22:52

To mute Gnome alerts:

$ dconf write /org/gnome/desktop/sound/event-sounds "false" 


$ gsettings set org.gnome.desktop.sound event-sounds false
  • 1
    Oops, this duplicates Stephen Kitt's answer. Consider this the tl;dr version. – Camille Goudeseune Jul 3 '18 at 19:20

The xset command you're using operates on the X server/X session, not the terminal, so .bashrc or similar is not the right place to put it. If Nautilus is really beeping via the X server's bell function, I would expect the xset to stop it, if you've already opened a terminal (and thereby run the command) beforehand.

If that works, what you need to do is get the command run as part of starting/logging in under X. The traditional way to do this is via a .xsession or .xinitrc file; however, these files (scripts) were traditionally expected to run your window manager/desktop environment session program, as the final line via exec, and if you just go dropping in a script containing nothing but xset, you might find yourself unable to login under X (rather, immediately getting logged out when you do). Figuring out the right thing to do here is going to be somewhat specific to the OS/distro's X and desktop environment setup, so I feel like I'm leaving this answer somewhat incomplete, but as a source of direction for where to look.

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.