ScreeN

WebHome | UnixGeekTools | Geekfarm | About This Site

Gnu Screen is Sweeeeet!

From: http://www.gnu.org/software/screen/screen.html

Screen is a full-screen window manager that multiplexes a physical terminal between several processes, typically interactive shells. Each virtual terminal provides the functions of the DEC VT100 terminal and, in addition, several control functions from the ANSI X3.64 (ISO 6429) and ISO 2022 standards (e.g., insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows the user to move text regions between windows. When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill the current window, view a list of the active windows, turn output logging on and off, copy text between windows, view the scrollback history, switch between windows, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the users terminal.

Pointers

Why I run screen inside of screen...

I run a master screen session on my laptop. Then I run one slave screen session per machine. I do all my work in slave screen sessions.

The only reason for the master screen session is so I can have only one terminal open and be connected to slave screen sessions on several different machines at the same time.

I use ctrl+a for my master screen escape key, and ctrl+space for my slave screen escape key.

I use the following zsh/bash functions to connect to existing screen sessions, or to start a new one if an existing session doesn't exist.

function sm
{
    screen -x master || screen -a -L -S master -c $RC/dot.screenrc.master
}

function ss
{
    screen -x slave || screen -a -S slave
}

ctrl+space for screen escape key

it took me a lot of playing to get ctrl+space working as the screen escape key. i'm not exactly sure why this works, but it does. (:


    # screen 3.x
    escape '^`\040'

    # screen 4.x
    escape ^@\040

OS X problems Sun Feb 1, 2004 2:17 AM

I was having only one problem running screen on OsX. Information on my term was going into my screen scrollback buffer, but not into the OsxTerminal buffer. I eventually found the solution for this online. Since I use xterm-color for my $TERM, I put this line in my .screenrc files and I was good to go:

    termcapinfo xterm-color ti@:te@

Yipee!

X11 equivalents




Updated Sun Jul 23, 2006 12:13 PM