Guidelines

This site is for tech Q&A. Please keep your posts focused on the subject at hand.

Ask one question at a time. Don't conflate multiple problems into a single question.

Make sure to include all relevant information in your posts. Try to avoid linking to external sites.

Links to documentation are fine, but in addition you should also quote the relevant parts in your posts.

0 votes
226 views
226 views

On my system I have blacklisted the kernel module pcspkr for years to get rid of the annoying bell in terminals. However, after a recent update to my system I started getting bell sounds again, even though the module is still blacklisted. Plus, I'm also getting bells from SSH sessions now.

The local bell I can disable by adding the following line to my .inputrc:

set bell-style none

But I'm still getting bells from SSH sessions unless I change the inputrc on the remote systems (which would be a pain in the rear to do for all remote systems, and not even possible/allowed in some situations, e.g. on some customer systems).

Isn't there a local setting to get rid of the bell entirely?

in Sysadmin
by (115)
2 19 33
edit history

Please log in or register to answer this question.

1 Answer

0 votes
 

I was able to solve the problem by adding the following line to my .xinitrc:

xset -b

which disables the bell in the X server (xset b off instead of xset -b would work too). The command would also work when put in .bashrc, but in that case it should be restricted to X11 sessions:

if [ "$XDG_SESSION_TYPE" = 'x11' ]; then
  xset -b
fi

Otherwise it would throw an error like this in a console session:

xset: unable to open display ""

As you may have guessed the suggested fix does not affect console sessions, where the problem persists unless I change the remote config. For the time being that's something I can live with, though, as I rarely use console sessions for anything non-local these days.

by (115)
2 19 33
edit history
...