使用SecureCRT時,螢幕假死的問題
使用SecureCRT時,偶爾發生螢幕假死,不能輸入等情況。
後來發現,只要資料ctrl+s,就會假死;輸入ctrl+q就可以恢複過來。
ctrl+s是一個古老的shell修飾鍵,再輸入ctrl+q就可以恢複了。
When you use terminal/putty/secureCRT, you can mistakenly type ctrl-s. It makes terminal freeze. It is because ctrl-s is an flow control signal to terminals. To resume the terminal, you should push ctrl-q.
This is not very convenient solution. We use ctrl-s a lot, especially for EMACS users. To prevent this, you can add this line in your login script (e.g. .bashrc)
stty stop undef
You can confirm this setting using this command.
stty -a
The stop section should be undef.
SecureCRT作為著名的SSH用戶端,經常用於登陸遠程伺服器。在上面編輯文本,特別是用vi開啟兩個文本,並且需要切換時,很容易出現卡死的現象,不能接受任何的鍵盤輸入。很是鬱悶。以前每次遇到這個問題,我只有關掉那個session重新開啟一個。這次又遇上,是在不能忍,試著解決一下。
仔細觀察會發現,在vi下切換文本“ctrl+w+w”時,很容易輸入成”ctrl+s”。隨便拿一個session試試就發現,果然是ctrl+s在作怪。只要輸入這個,就會卡死。搜尋了一下,發現果然是有原因的:
CTRL-S and CTRL-Q are called flow-control characters. They represent an antiquated way of stopping and restarting the flow of output from one device to another (e.g., from the computer to your terminal) that was useful when the speed of such output was low. They are rather obsolete in these days of high-speed networks. In fact, under the latter conditions, CTRL-S and CTRL-Q are basically a nuisance. The only thing you really need to know about them is that if your screen output becomes “stuck,” then you may have hit CTRL-S by accident. Type CTRL-Q to restart the output; any keys you may have hit in between will then take effect.
ctrl+s是一個古老的shell修飾鍵,在輸入ctrl+q就可以恢複了