« Printing Canada Post CN22 Labels | Main | Removing EXIF data with find and jhead »

August 20, 2008

Unfreezing Screen

I’m sure many people have done this: typed a command, then realized they’ll need root, so they hit ctrl-a for the beginning of the line, then started typing sudo. And this works wonderfully, unless your in a screen session, in which case it locks up completely.

From the screen manpage we see that ctrl-a puts screen into command mode, and the s of sudo sends an ‘xoff’ to the terminal.

What does xoff do? It’s a control signal in xon/xoff handshaking that says ‘stop sending data to me’, so the machine stops sending your terminal data.

To get your screen session back, send ctrl-a then q. This sends the matching xon. Xon ofcourse says ‘go ahead, send data, I’m ready’.

To avoid the issue in the first place, use ctrl-a followed by a to jump to the beginning of the line.

Posted by spiffed at August 20, 2008 10:57 AM

Comments

Post a comment