0

I use cmd.exe of Windows 10 to remotely connect to a linux server via ssh. But it keeps beeping when I press certain keys, for example, pressing backspace when it is empty after the prompt, or pressing tab for autocompletion. It only happens when I am using ssh but not when I use the same cmd program to operate locally. How can I disable this?

1
  • Whatever you're using on the remote side, apparently it generates bell characters and your local window reacts. Maybe you can reconfigure cmd.exe and make it silent; I don't know, I'm a Linux guy. Alternatively maybe you can reconfigure the remote program not to send bell characters in the first place. What program is this? A shell? Bash maybe? If the program uses the Readline library (Bash does) then you need to change the bell-style variable of Readline. Please edit and tell us the program, hopefully it uses Readline and I (or somebody else) will guide you further. Jan 23 at 2:25
1

If you're in bash shell, try putting "set prefer-visible-bell" in ~/.inputrc.

For more options and explanations, see:
https://www.xspdf.com/resolution/50997660.html

2
  • Your answer is half way there. Have you tested it? set bell-style visible is a command for Readline. Put it in ~/.inputrc for a permanent solution which affects all programs using Readline. The same command in Bash sets positional parameters (like set foo bar). This is what the answer does, irrelevant to the problem. To make Bash pass the command to Readline, it should be bind 'set bell-style visible'. Put it in ~/.bashrc for a permanent solution which affects Bash only. Feel free to improve the answer (keep it technical, don't mention me). In its current form the answer is wrong. Jan 23 at 11:24
  • Thanks, Kamil. Answer corrected. I could have swore it used to be different, but so goes my memory! I did test it this time by adding a single entry to the ~/.inputrc on win 10 cmd ssh client.
    – mikem
    Jan 23 at 22:31

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.