Screen Multiplexor

"screen" is a program for Unix-ish systems acts as a "window manager" for non-graphic (text) terminals. SCREEN allows you to switch between programs and yet use just one "terminal".

Don't delete unreplaced broken links; they provide useful information for future WikiGnome work:

(Quoted from http://www.math.fu-berlin.de/~guckes/screen/ BrokenLink as of 2004-02-17)

See http://www.math.fu-berlin.de/~guckes/screen/intro.html (BrokenLink as of 2004-02-17) for a decent intro.

As of 2004 Apr 3, it looks like the new URL is www.guckes.net/screen, but it may not be accessible 24 hours a day. Leave this in place for a little while.

Benefits (roughly in order of significance):

Here are the most common commands (all of which are preceded with an escape key, Ctrl-a by default): It is also possible to define further commands. For example, I used the command bind '^p' screen -t python python to make (escape key:Ctrl-a) Ctrl-p open up the Python interpreter in another window (bind '^p' screen python), with the title Python (-t python).


I like screen. I think that Ctrl+a is not the best choice for the default meta-key. It is also the default emacs binding for beginning-of-line (and readline is used by a lot of terminal-based programs). -- TerrelShumway

Good point. Others do this: "echo set editing-mode vi > ~/.inputrc" and get vi-keys everywhere, making it moot. But, yes, Ctrl+a + Emacs keys is a bad combo. What do you recommend instead?

Personally, I find Ctrl-a to be a very usable escape key, because I have Caps Lock remapped to be left-Ctrl. Also, I prefer VimTextEditor to Emacs, so the key clobbering isn't an issue. -SckotVokes

You can change the escape key. I have no idea why they set it up with Ctrl+a as default, I suspect it scares away many potential users. On new accounts, I always write ~/.screenrc file with the following line in it:

  escape ``
(They're 'ticks', the unshifted symbol you get from the ~ key. [AmericanCulturalAssumption - not everyone has the same keymap.]). I use vim but emacs on the command line as well. This allows you to rapidly switch between sessions using your left hand. If you want to type a tick, just press the key twice. The only time I tend to get caught is when I'm typing something like `date -I` in a bash command. Of course, that could also be written without backticks as $(date -I). And `d is just the 'freeze session and exit' key so you can get back to where you were with
  screen -r
This disconnect/reconnect feature is one of the best things about screen. You can run pine in a screen session, have your session disconnect, and then come back in and just continue from where you left off where normally you would have lost the email you were typing. -- Craig Turner

Although I am a user of VimTextEditor, I use emacs editing-mode in shell, so I type Ctrl+a pretty often to go to beginning-of-line. So, I use Ctrl+o as a command key(starting with screen "-e^Oo" in zshell). One thing that's inconvenient is, in vim, you use Ctrl+o to go to the old position. But I personally don't use it often(and if you *really* want to go to old position, type Ctrl+o and another o) , and I stick to that command key. The other reason why I use Ctrl+o is that I want to use both hands when switching between windows. I usually open 4~5 windows and if I use Ctrl+a, I should type Ctrl+a+1~4 with only left hand. Of course, It would be different in DvorakKeyboard. -- JiwonSeo

Often typing "^Aa" instead of "^A" is not too bad... depends on how much editing you're doing.

Instead of using -e on the command line you can put something like "escape ^Bb" into your .screenrc

These days (2014) there is also tmux (TerminalMultiplexer), which does similar stuff to screen, but seems a little more intuitive to use (and is said to have a nicer codebase) -- Noah Birnel

Much thanks! I've never heard of tmux before. Turns out it's available on the servers I administer and it seems slicker than screen.

If you want something that's not very BatteriesIncluded?, you might want to look into dtach with dvtm. Sometimes the constraints dvtm imposes makes me focus a little more.


The actual name for this program is GnuScreen


CategoryLinux


EditText of this page (last edited September 4, 2014) or FindPage with title or text search