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.
Filed Under: Tutorial
Released: on Mar 14, 2008 under a Creative Commons Attribution-NoDerivs (CC-BY-ND) license