It happens to me on a quite frequent basis. I work in a Windows based editor for some time, and press ctrl+s every now and then to save my changes to disk. It turned kinda into a habbit. No big deal, unless... you start working in VI. Everytime, well, until now, when you press ctrl+s, it would hang up your session. Nothing you could do about it. It's the most frustrating thing ever. You are finished with your modifications, want to save them, and instead of :wq, you accidentally, out of a habbit, hit ctrl+s. *Poof*! Gone are all your changes, you have to restart the session, and make your changes again. Well, Not anymore!
While I was reading a Gentoo tutorial on Screen to learn how I can scroll back in Screen, I learned about the lock-screen function too. It turns out, that when you press ctrl+s, you lock your Screen session. Unlocking is easy, just press ctrl+q. That's all. I then remembered my VI issue, and immediately fired up a shell to test it. And what happens? After pressing ctrl+s your session seems to hang. Pressing ctrl+q....woooooooooot! unlocks it! I think I just found my answer to the biggest linux annoyance ever! I feel a lot more comfortable working in an SSH session now! Oh, and just for the record: no, I don't use Gentoo as a distro, I'm a RPM-based person. But there just happened to be a nice tutorial on Screen running on Gentoo, and well, you know the beauty of Linux, if it works that way on Gentoo, it works practicly always the same way in another distro.
~RW
actually, Ctrl-S and Ctrl-Q
actually, Ctrl-S and Ctrl-Q are not a feature of screen, but a feature of nearly any unix terminal emulation. I have no idea what these things were good for back when, but right now it's nothing but annoying.
Then again knowing about Ctrl-Q and not telling my coworker makes me his hero here and then when I unlock his terminal. Just don't tell him what I'm doing :-)
Philip
For years i have had this
For years i have had this problem and for years ( like almost 10 ) i have thaught maybe i should see how to unlock it but never got around to it... Thank you.
P.s.: Nice drupal...
If you want to stop ctrl-s
If you want to stop ctrl-s and ctrl-q working at all, put this in your .profile (or.bash_profile or whatever you use):
stty -ixon -ixoff
You can also run "stty -a" to see a list of control characters that your terminal supports.
[webmaster edit: s/ion/in/]
Post new comment