Tuesday, August 15, 2006

Screen Screen

Continuing my enthusism for screen, the terminal multiplexer (on most linux dists), I found the


following post in response to another post about the wonders of screen.

Basically, some tips for using screen within screen - which comes in handy when you want to kick something off but still have a terminal session attached to it - and you already have a screen session in play.

The deal is that the "outermost" screen hears the Ctrl-a sequence and responds to it.. so detaching from inside the second screen sessions detaches the first (you'll understand when you start using it)...

For anyone that dislikes C-a as the command key (e.g. emacss or bash users) one of the two following keys may be convenient. Put one of these lines in a file called ~/.screenrc:

#to use C-] as the command key
escape ^]\
or

#to use C-\ as the command key
escape ^\\
it’s useful to use different escape sequences on different machines so that ssh’ing from one to the other and running screen within screen doesn’t cause an aneurism.

another useful customization is to show the current screens at the bottom of the page:

hardstatus alwayslastline ” ] H]{= Bw} %w %=”

notice that that has a ] as the first character; this helps me remember which escape key I’m using at the moment. On a machine with C-\ as the escape key, it should be:

hardstatus alwayslastline ” \ H]{= Bw} %w %=”

No comments: