I do a lot of ssh-ing, and periodically I hit Ctrl+S, which naturally sends an XOFF, and causes all kinds of problems (not to mention it takes a while for me to figure out what happened, then another while to remember that I need to press Ctrl+Q to recover.
I would much rather instruct Putty to never ever let me type XOFF.
Any ideas?
56 Answers
Don't know about Putty, but you can use:
stty -ixonon remote host, to disable START/STOP signals.
5The PuTTY solution:
- before creating the session go navigate to Connection->SSH->TTY in the list.
- in the "Mode" dropdown box, select IXON (nb: as of version 0.60, this list is not alphabetically ordered)
- put "0" (zero) as the value of IXON.
Works as a charm, even if you open up a "GNU screen" on top of it, SSH to another host, or "su" to another user
If you're using GNU Bash, ctrl-S should allow you now to do a forward-search-history (aka: i-search)
You can see the difference in the output of "stty -a | grep -o ".ixon": With putty configured it prints "-ixon", without " ixon"
6.bashrc example: # # Stop Putty from doing XOFF/XON with Ctrl-S/Ctrl-Q # SOURCE: (Morgy, 7/14/08) # # stty ixany # stty ixoff -ixon ### If needing to listen to Ctrl-S for some apps, use these two instead: stty stop undef stty start undef
I've got the opposite problem. Every once in a while, the host sends an XOFF to PuTTY but never sends the corresponding XON to PuTTY. In this case, nothing you do to PuTTY (short of restarting it) will unwedge it. In this case, all keyboard input to the host is blocked, but the host can still send data to PuTTY.
Disabling flow control in PuTTY doesn't work.
The way to fix this problem is to use
stty -ixoffin your .profile. This prohibits the host from sending XON/XOFF. Note that the names of the options are totally confusing. ixon/-ixon means enable/disable flow control on the client side (meaning that the client can't issue flow control), ixoff/-ixoff means enable/disable flow control on the host side (meaning the host can't issue flow control).
Btw, the ASCII code for Ctrl-S and XOFF are the same ASCII character (code 19, 0x13). There's no difference. The settings change the interpretation of that ASCII character.
3Open your .bash_profile and put:
stty -ixonThe value -xion doen't work for me. You can see the man entry: man stty.
Run this command in terminal to disable it for current session/add it to .bashrc for disabling it permanently
stty -ixon