"Screen"
How not to name a software application...
I've tried hard to get into Screen. The ability to detach sessions from one terminal and hop back in from another terminal would have come in handy many times in the past.
Basic usage is pretty simple and the man pages are done very well but what I need right now is a "How to start using screen in 5 minutes" type of deal. It is usually hard not to find a ton of information about these treasures due to the amount of console fanatics out there that tend to document every aspect of their configurations. Unfortunately, searching for "screen" is like searching for "computer". I wonder if this has deterred others from picking it up in the past?
I found a solution after toying with different searches for awhile--both "GNU/Screen" and "/usr/bin/screen" return decent results. Here's a good introductory article. The Screen FAQ is hardcore but I was able pull a few good tips anyway. And last but not least I found my fanatic: Making the Anti-Switch - an excellent get up and running quick guide with a sample ~/.screenrc file.
4 comments
Making the Anti-Switch appears to be a bad link. Do you know offhand if the article is available somewhere else?
/will
— will on Saturday, October 14, 2006 at 01:30 PM #
Archive.org rules. http://ashitaka-san.home.comcast.net/yayrant/antiswitch.html
— Jeremy Dunck on Saturday, October 14, 2006 at 10:22 PM #
I have been using this .screenrc which I found on K5 several years ago along with the following .bashrc snippets to resume any open session automatically on reconnection to one of my servers.
function _resumescreen() { test ${TERM/.*/} = "screen" && return 1 #do nothing if inside screen. test ${TERM/.*/} = "dumb" && return 1 #do nothing if inside screen. test ${TERM/.*/} = "su" && return 1 #do nothing if inside screen. screen -q -ls #check if we have any screen sessions running test $? -ge 10 && screen -xR #and auto login if we do. }
_resumescreen
— thadk on Sunday, October 15, 2006 at 09:51 PM #
Here is the snippet again, formatting preserved:
function _resumescreen() { test ${TERM/\.*/} = "screen" && return 1 #do nothing if inside screen. test ${TERM/\.*/} = "dumb" && return 1 #do nothing if inside screen. test ${TERM/\.*/} = "su" && return 1 #do nothing if inside screen. screen -q -ls #check if we have any screen sessions running test $? -ge 10 && screen -xR #and auto login if we do. } _resumescreen— thadk on Sunday, October 15, 2006 at 09:52 PM #
Leave a comment