Sunday, October 12, 2008

TOOL-A-WEEK #2 'screen'

'remedy for terminal sessions'

Have you ever been annoyed
o while navigating multiple terminal windows?
o that when your X server goes down,
all your open X terminals and the stuff running inside is aborted?
o or a logout?
o etc...

From the man page:

"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 a DEC VT100 terminal and, in addition, several
control functions from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and sup-
port for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-
paste mechanism that allows moving 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 existing windows, view a list of windows, turn
output logging on and off, copy-and-paste text between windows, view the scrollback history, switch between windows
in whatever manner you wish, etc. All windows run their programs completely independent of each other. Programs con-
tinue to run when their window is currently not visible and even when the whole screen session is detached from the
user's terminal. When a program terminates, screen (per default) kills the window that contained it. If this win-
dow was in the foreground, the display switches to the previous window; if none are left, screen exits."

I couldn't describe it better,
type 'man screen' to learn the rest.