I was able to solve the problem by adding the following line to my
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
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.