Thursday, December 21, 2006

Using 'screen' on Linux

A friend of mine at work, Greg Fast, introduced me to 'screen' while we were locked away in a conference room for 3 weeks. We took over the conference room to do a "Lan Party" of sorts. The idea being, you get a few dedicated developers in a room and we all work together, without interference, to accomplish the mission. But I digress...

Screen is very cool, especially if you're ssh'd into some remote server for a few hours and can't pop up new terminals all willy-nilly. The simplest use of Screen is to have a few terminals going inside one shell.

To get the most use out of screen, it's best to have this config setup (I stole it from Greg):

vbell on
#escape ^ww
deflogin off
startup_message off

#screen -t "random" 0

hardstatus alwayslastline
hardstatus string '%{= KW}%-w%{= gW}%50> %n %t %{= KW}%+w%< %{= kG}%-=%{-}'

Save this little snippet as ~/.screenrc.

What does this config do you ask?
Well it puts a bar at the bottom of the screen that shows you how many 'screens' you have going. You can rename them and switch between them using ^A0 ^A1, or just ^A^A to cycle through (the ^ meaning CTRL).

That string full of goofy characters and symbols? Well that's a typically Linux pile of undocumented gibberish that only the most uber of geeks will ever know to use. Passed down from generation to generation...

No comments: