SCREEN - window manager Latest Change: Wed Oct 08 00:50:31
.-.-.------.  screen 4.0.2
| | | GNU  |  [2003-12-05]
| | |Screen|
| | |      |  the terminal
`-`-`------'  multiplexer
HOME| Bindings| Bugs| Chat| Config| Docs| Download| Help| History| Intro| Installation| Links| MailList| Misc| NEWS| Pics| Press| Questions| TODO| Usenet| Users| Wishes|
Enter your email address:

SCREEN - Help

Please read about the key description in the intro first! Please note that the list below describes the *default* key binding!


Screen - Command Overview

A list of the most important commands with a short description.

c | C-c
mnemonic: "create"
Bound to command: ":screen"
This creates a new window for your session with your shell as process.

k | C-k
mnemonic: "kill"
Bound to command: ":kill"
Kill the current window. Actually kills the *first* process started within that window. Child processes will usually die with it.

d | C-d
mnemonic: "detach"
Bound to command: ":detach"
Detach the screen session. One of the two screen processes will die and the other one will survive to keep the subprocesses running. You can later

^a | ^h | ^? | p | ^p
mnemonic: "previous"
Bound to command: ":prev"
Switch to previous window.
The fastest way to use this is with the command ^A^A as you do no have to leave the fingers from the ^A key.

0 - 9
mnemonic: "jump to window #"
Bound to command: ":select 0" .. ":select 9"
Switch to window 0 .. 9

n | ^n | sp | ^@
mnemonic: "next"
Bound to command: ":next"
Switch to next window
Jump to next window, ie window with next higher number. If there is no window with a higher number then jump to window with lowest number.

p | ^p | -
mnemonic: "previous"
Bound to command: ":prev"
Switch to previous window
Jump to previous window, ie window with next lower number. If there is no window with a lower number then jump to window with highest number.

l | ^l
mnemonic: (none)
Bound to command: ":redisplay"
Redisplay window
Redisplays the current window as screen thinks it looks like. Useful when other processes have come in the way and written onto the terminal or after a resize of the window size.

z | ^z
mnemonic: zzzZZZ
Bound to command: ":suspend"
Suspend screen
The usual "suspend". For beginners: This puts the process "into the backgrund" and returns you to the shell you started Screen from. To return to the Screen session enter the command "fg" ("foreground"). The command name could be some other for some shells.

h | ^h
mnemonic: "hardcopy"
Bound to command: ":hardcopy"
Make hardcopy
This creates a hardcopy of the current window, ie a file containing the contents of the current window. The name of the file is "hardcopy.N" where N is the numbe of the window. Useful for "screen snapshots". But not very useful for logging output of programs automatically.

. ("dot")
mnemonic: (none)
Bound to command: ":dumptermcap"
Write .termcap file.
[todo]

w | ^w
mnemonic: "
Bound to command: ":
Display list of windows in message line
[todo]

t | ^t
mnemonic: "
Bound to command: ":
Display useful information in message line
[todo]

r | ^r
mnemonic: "
Bound to command: ":
Repeat last message line
[todo]

/
mnemonic: "
Bound to command: ":
Display copying and distribution terms
[todo]

?
mnemonic: "
Bound to command: ":
Display a command summary.
[todo]

a
Send C-a to process
mnemonic: "
Bound to command: ":
[todo]

s | C-s
mnemonic: "
Bound to command: ":
Send C-s to process.
[todo]

q | ^q
mnemonic: "
Bound to command: ":
Send C-q to process
[todo]

C-\
mnemonic: (none)
Bound to command: ":quit"
Kill all windows; terminate the session.
This really kills Screen. No questions asked. But to use this is not very clever when you are using programs that leave temporary files behind, such as backup file of an editor. You should always end programs with their internal commands!


Screen - Using copy&paste

Here is an example on how to use Screen's "copy mode commands":
        ^A      notify screen
        ^[      escape into copy mode
        H       jump to "home position"
        <sp>    set start mark
        M       jump to "middle position"
        <sp>    set end mark
                screen will say "copied N characters into buffer"

        ^A      notify screen
        >       copy buffer *to* /tmp/screen-exchange

Now edit screen's "exchange file" with Vim.
This might help:

        map ## :e /tmp/screen-exchange

After editing you can "take up" the edited text into screen's buffer again:

        ^A      notify screen
        <       copy *from* /tmp/screen-exchange into buffer

Now switch to another window and "paste/put" it there:

        ^A      notify screen
        P       paste buffer into current window

Note:  The paste command on key 'P' is "bound" with this in the screenrc:

        bind P paste .

Screen - updating screen after a reattach

Window Resize
Situation: You have reattached to a screen session, now using a terminal with a different size than before (usually a longer or shorter screen).
Problem: The size of the window has changed but the size of screen's windows did not.
Workaround:

Screen will no hopefully notice the change and update all windows. Related problem: When Screen was started the variable DISPLAY had value "foo".
Changing the DISPLAY
Situation: You sit at host A with variable DISPLAY pointing to A. You then detach the session and log in from host/DISPLAY B.
problem: Now every shell you start will inherit the session's value for DISPLAY, ie "A". But you want to start programs to show up on display "B".
Solution: You must change the value for DISPLAY for Screen. Use the command ":setenv DISPLAY B".


Screen - Mapping a function key to ESC

Mapping a function key to ESC
Situation: You are using a keyboard where the ESC key is away from the letters, eg in the numeric block.
Problem: Typing the ESC is a pain.
Workaround: Map ESC to another key, eg the function key F1:
        :bindkey -k k1 stuff \033
The notation k1 stands for the F1 and it will "stuff" an ESC (octal \033) into the input, ie as if you typed it.


Sven Guckes <screen-pages@guckes.net>
Main Site: www.guckes.net/screen
Mirrors: Austria| France| SouthAfrica| USA
add a mirror? contact me!