Chovy’s Blog

Linux Command Line Utility: “Screen”

Wed, March 9, 2005 — Category: Personal

Use ’screen’ to avoid dropping your build sessions when your connection dies, or you want to go home for the day.

I was having problems today when trying to build a package on my home Linux box, and the Putty ssh client was timing out on me, despite a KEEP_ALIVE setting of 60 seconds.

Thanks to Splatypus in #gentoo on irc.freenode.net, who told me to use “screen”. of course I had no idea what they meant, so they gave me the link to the project page on Freshmeat.net. From there I found the official gnu screen page, and then a quick search turned up a nice screen tutorial and developers project page.

The screen tutorial was a little intimidating at first, but after playing with it, I finally got it. The notation behind “screen” is that you can login via ssh to your server (start ’screen’), then create “windows” inside the shell, and then detach them from the current ssh session. Logout, and then reconnect anytime from anywhere later, and run ’screen -r’ to reattach all the windows to the current shell.

This is great, because I kicked off a build from a regular old ssh shell in Putty, and the darn thing timed out 2.5 hours into it. Now I can just detach the window, and reconnect at anytime later, preserving the output, state, etc.

You can also name your windows, and list them so you can see what all you got going on.

An excellent tool, and a must have for remote admins.

  • Post Linux Command Line Utility: “Screen” to del.icio.us
  • Post Linux Command Line Utility: “Screen” to digg
  • Post Linux Command Line Utility: “Screen” to Furl
  • Add Linux Command Line Utility: “Screen” to YahooMyWeb
  • Simpify!
  • Post Linux Command Line Utility: “Screen” to shadows
  • Post Linux Command Line Utility: “Screen” to Spurl
  • Post Linux Command Line Utility: “Screen” to BuddyMarks
  • Submit Linux Command Line Utility: “Screen” to Slashdot

11 Comments »

272

Comment by Dutch Rapley

March 10, 2005 @ 12:56 pm

Hey, I found you blog of a comment you made on Russell Beattie’s site. I noticed you found screen. I found it a couple of days ago too It’a nice little app.

273

Comment by eutopion

March 13, 2005 @ 4:08 pm

“screen” is awesome. It’s ideal for staying connected to IRC from multiple computers or places. I have irssi running on my Linux box all the time in a screen session and never have to miss a private message or conversation.

274

Comment by chovy

March 13, 2005 @ 9:28 pm

IRSSI seems to disconnect after awhile when I use screen. Anybody else have this problem?

275

Comment by eutopion

March 14, 2005 @ 4:25 pm

That sounds pretty weird, and hasn’t happened to me. Are you sure that it’s because of screen? I would try to use it normally for a while and see what happens.

276

Comment by chovy

March 14, 2005 @ 4:34 pm

I’m not sure if it’s irssi related or not, I do get some weird things happening when I don’t use a screen window after a long time. Like 1 day.

I’ll try to describe it better next time it happens. It’s like the shell was voided or something. It seems transparent, except in the case of irssi the program is ended.

277

Comment by Anonymous

March 25, 2005 @ 6:28 am

I’d just like to point out that as great a sreen is, it’s not exactly new. screen/mscreen and various other like named commands have existing from very early on with UNIX. Remeber dumb terminals, well you wouldn’t want to be limited to one session on a dumb terminal - hence screen utility.

UNIX priciple - if you cna think of it, its almost sure to have been done and there’s a utility to do it with.

May UNIX rule forever

278

Comment by chovy

March 26, 2005 @ 12:48 am

Yup, i’m sure it’s been around for awhile. I love *nix, because everytime I run into a problem, there’s always a solution I’m unaware of.

279

Comment by Anonymous

April 9, 2005 @ 11:24 am

hi,
i have been confused with installation of screen on cobalt raq4r. could someone be that kind and give me a more detailed instructions on pre- and postinstall configure.
your help is highly appreciated.
thank you.

Trackback by girls pissing movies

November 20, 2007 @ 2:49 am

girls pissing movies…

More or less nothing seems important. I can’t be bothered with anything recently. I’ve just been letting everything pass me by. What can I say? Oh well. …

Trackback by Anonymous

December 22, 2007 @ 9:44 pm

tit videos

Trackback by Anonymous

December 22, 2007 @ 9:45 pm

naked softball

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

 
Keyword Advertisers:
SEO Directory SEO Links Free Link Directory Shopping Submission Directory Gardening Tips Political Forum Search Engine Optimization Search Engine Marketing Audio Video Directory SEO Forum Web Development Blog Organic SEO Wiki Web Development Consulting

Learn more about purchasing keyword text link ads on this site.