1
This is screen.info, produced by makeinfo version 4.5 from
4
INFO-DIR-SECTION General Commands
6
* Screen: (screen). Full-screen window manager.
9
This file documents the `Screen' virtual terminal manager.
11
Copyright (c) 1993-2003 Free Software Foundation, Inc.
13
Permission is granted to make and distribute verbatim copies of this
14
manual provided the copyright notice and this permission notice are
15
preserved on all copies.
17
Permission is granted to copy and distribute modified versions of
18
this manual under the conditions for verbatim copying, provided that
19
the entire resulting derived work is distributed under the terms of a
20
permission notice identical to this one.
22
Permission is granted to copy and distribute translations of this
23
manual into another language, under the above conditions for modified
24
versions, except that this permission notice may be stated in a
25
translation approved by the Foundation.
28
File: screen.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir)
33
This file documents the `Screen' virtual terminal manager, version
38
* Overview:: Preliminary information.
39
* Getting Started:: An introduction to `screen'.
40
* Invoking Screen:: Command line options for `screen'.
41
* Customization:: The `.screenrc' file.
42
* Commands:: List all of the commands.
43
* New Window:: Running a program in a new window.
44
* Selecting:: Selecting a window to display.
45
* Session Management:: Suspend/detach, grant access, connect sessions.
46
* Regions:: Split-screen commands.
47
* Window Settings:: Titles, logging, etc.
48
* Virtual Terminal:: Controlling the `screen' VT100 emulation.
49
* Copy and Paste:: Exchanging text between windows and sessions.
50
* Subprocess Execution:: I/O filtering with `exec'.
51
* Key Binding:: Binding commands to keys.
52
* Flow Control:: Trap or pass flow control characters.
53
* Termcap:: Tweaking your terminal's termcap entry.
54
* Message Line:: The `screen' message line.
55
* Logging:: Keeping a record of your session.
56
* Startup:: Functions only useful at `screen' startup.
57
* Miscellaneous:: Various other commands.
58
* String Escapes:: Inserting current information into strings
59
* Environment:: Environment variables used by `screen'.
60
* Files:: Files used by `screen'.
61
* Credits:: Who's who of `screen'.
62
* Bugs:: What to do if you find a bug.
63
* Installation:: Getting `screen' running on your system.
64
* Concept Index:: Index of concepts.
65
* Command Index:: Index of all `screen' commands.
66
* Keystroke Index:: Index of default key bindings.
69
File: screen.info, Node: Overview, Next: Getting Started, Prev: Top, Up: Top
74
Screen is a full-screen window manager that multiplexes a physical
75
terminal between several processes, typically interactive shells. Each
76
virtual terminal provides the functions of the DEC VT100 terminal and,
77
in addition, several control functions from the ISO 6429 (ECMA 48, ANSI
78
X3.64) and ISO 2022 standards (e.g. insert/delete line and support for
79
multiple character sets). There is a scrollback history buffer for
80
each virtual terminal and a copy-and-paste mechanism that allows the
81
user to move text regions between windows.
83
When `screen' is called, it creates a single window with a shell in
84
it (or the specified command) and then gets out of your way so that you
85
can use the program as you normally would. Then, at any time, you can
86
create new (full-screen) windows with other programs in them (including
87
more shells), kill the current window, view a list of the active
88
windows, turn output logging on and off, copy text between windows, view
89
the scrollback history, switch between windows, etc. All windows run
90
their programs completely independent of each other. Programs continue
91
to run when their window is currently not visible and even when the
92
whole screen session is detached from the user's terminal.
94
When a program terminates, `screen' (per default) kills the window
95
that contained it. If this window was in the foreground, the display
96
switches to the previously displayed window; if none are left, `screen'
99
Everything you type is sent to the program running in the current
100
window. The only exception to this is the one keystroke that is used to
101
initiate a command to the window manager. By default, each command
102
begins with a control-a (abbreviated `C-a' from now on), and is
103
followed by one other keystroke. The command character (*note Command
104
Character::) and all the key bindings (*note Key Binding::) can be fully
105
customized to be anything you like, though they are always two
106
characters in length.
108
`Screen' does not understand the prefix `C-' to mean control.
109
Please use the caret notation (`^A' instead of `C-a') as arguments to
110
e.g. the `escape' command or the `-e' option. `Screen' will also print
111
out control characters in caret notation.
113
The standard way to create a new window is to type `C-a c'. This
114
creates a new window running a shell and switches to that window
115
immediately, regardless of the state of the process running in the
116
current window. Similarly, you can create a new window with a custom
117
command in it by first binding the command to a keystroke (in your
118
`.screenrc' file or at the `C-a :' command line) and then using it just
119
like the `C-a c' command. In addition, new windows can be created by
120
running a command like:
124
from a shell prompt within a previously created window. This will not
125
run another copy of `screen', but will instead supply the command name
126
and its arguments to the window manager (specified in the $STY
127
environment variable) who will use it to create the new window. The
128
above example would start the `emacs' editor (editing `prog.c') and
129
switch to its window.
131
If `/etc/utmp' is writable by `screen', an appropriate record will
132
be written to this file for each window, and removed when the window is
133
closed. This is useful for working with `talk', `script', `shutdown',
134
`rsend', `sccs' and other similar programs that use the utmp file to
135
determine who you are. As long as `screen' is active on your terminal,
136
the terminal's own record is removed from the utmp file. *Note Login::.
139
File: screen.info, Node: Getting Started, Next: Invoking Screen, Prev: Overview, Up: Top
144
Before you begin to use `screen' you'll need to make sure you have
145
correctly selected your terminal type, just as you would for any other
146
termcap/terminfo program. (You can do this by using `tset', `qterm',
147
or just `set term=mytermtype', for example.)
149
If you're impatient and want to get started without doing a lot more
150
reading, you should remember this one command: `C-a ?' (*note Key
151
Binding::). Typing these two characters will display a list of the
152
available `screen' commands and their bindings. Each keystroke is
153
discussed in the section on keystrokes (*note Default Key Bindings::).
154
Another section (*note Customization::) deals with the contents of your
157
If your terminal is a "true" auto-margin terminal (it doesn't allow
158
the last position on the screen to be updated without scrolling the
159
screen) consider using a version of your terminal's termcap that has
160
automatic margins turned _off_. This will ensure an accurate and
161
optimal update of the screen in all circumstances. Most terminals
162
nowadays have "magic" margins (automatic margins plus usable last
163
column). This is the VT100 style type and perfectly suited for
164
`screen'. If all you've got is a "true" auto-margin terminal `screen'
165
will be content to use it, but updating a character put into the last
166
position on the screen may not be possible until the screen scrolls or
167
the character is moved into a safe position in some other way. This
168
delay can be shortened by using a terminal with insert-character
171
*Note Special Capabilities::, for more information about telling
172
`screen' what kind of terminal you have.
175
File: screen.info, Node: Invoking Screen, Next: Customization, Prev: Getting Started, Up: Top
180
Screen has the following command-line options:
183
Include _all_ capabilities (with some minor exceptions) in each
184
window's termcap, even if `screen' must redraw parts of the display
185
in order to implement a function.
188
Adapt the sizes of all windows to the size of the display. By
189
default, `screen' may try to restore its old window sizes when
190
attaching to resizable terminals (those with `WS' in their
191
descriptions, e.g. `suncmd' or some varieties of `xterm').
194
Use FILE as the user's configuration file instead of the default
195
of `$HOME/.screenrc'.
197
`-d [PID.SESSIONNAME]'
198
`-D [PID.SESSIONNAME]'
199
Do not start `screen', but instead detach a `screen' session
200
running elsewhere (*note Detach::). `-d' has the same effect as
201
typing `C-a d' from the controlling terminal for the session.
202
`-D' is the equivalent to the power detach key. If no session can
203
be detached, this option is ignored. In combination with the
204
`-r'/`-R' option more powerful effects can be achieved:
207
Reattach a session and if necessary detach it first.
210
Reattach a session and if necessary detach or even create
214
Reattach a session and if necessary detach or create it. Use
215
the first session if more than one session is available.
218
Reattach a session. If necessary detach and logout remotely
222
Attach here and now. In detail this means: If a session is
223
running, then reattach. If necessary detach and logout
224
remotely first. If it was not running create it and notify
225
the user. This is the author's favorite.
228
Attach here and now. Whatever that means, just do it.
230
_Note_: It is a good idea to check the status of your sessions
231
with `screen -list' before using this option.
234
Set the command character to X, and the character generating a
235
literal command character (when typed after the command character)
236
to Y. The defaults are `C-a' and `a', which can be specified as
237
`-e^Aa'. When creating a `screen' session, this option sets the
238
default command character. In a multiuser session all users added
239
will start off with this command character. But when attaching to
240
an already running session, this option only changes the command
241
character of the attaching user. This option is equivalent to the
242
commands `defescape' or `escape' respectively. (*note Command
248
Set flow-control to on, off, or automatic switching mode,
249
respectively. This option is equivalent to the `defflow' command
250
(*note Flow Control::).
253
Set the history scrollback buffer to be NUM lines high.
254
Equivalent to the `defscrollback' command (*note Copy::).
257
Cause the interrupt key (usually `C-c') to interrupt the display
258
immediately when flow control is on. This option is equivalent to
259
the `interrupt' argument to the `defflow' command (*note Flow
260
Control::). Its use is discouraged.
264
Turn login mode on or off (for `/etc/utmp' updating). This option
265
is equivalent to the `deflogin' command (*note Login::).
269
Do not start `screen', but instead print a list of session
270
identification strings (usually of the form PID.TTY.HOST; *note
271
Session Name::). Sessions marked `detached' can be resumed with
272
`screen -r'. Those marked `attached' are running and have a
273
controlling terminal. If the session runs in multiuser mode, it
274
is marked `multi'. Sessions marked as `unreachable' either live
275
on a different host or are dead. An unreachable session is
276
considered dead, when its name matches either the name of the
277
local host, or the specified parameter, if any. See the `-r' flag
278
for a description how to construct matches. Sessions marked as
279
`dead' should be thoroughly checked and removed. Ask your system
280
administrator if you are not sure. Remove sessions with the
284
Tell `screen' to turn on automatic output logging for the windows.
287
Tell `screen' to ignore the `$STY' environment variable. When
288
this option is used, a new session will always be created,
289
regardless of whether `screen' is being called from within another
290
`screen' session or not. This flag has a special meaning in
291
connection with the `-d' option:
293
Start `screen' in _detached_ mode. This creates a new session
294
but doesn't attach to it. This is useful for system startup
298
This also starts `screen' in _detached_ mode, but doesn't fork
299
a new process. The command exits if the session terminates.
302
Preselect a window. This is usefull when you want to reattach to a
303
specific windor or you want to send a command via the `-X' option
304
to a specific window. As with screen's select commant, `-' selects
305
the blank window. As a special case for reattach, `=' brings up
306
the windowlist on the blank window.
309
Suppress printing of error messages. In combination with `-ls' the
310
exit value is set as follows: 9 indicates a directory without
311
sessions. 10 indicates a directory with running but not attachable
312
sessions. 11 (or more) indicates 1 (or more) usable sessions. In
313
combination with `-r' the exit value is as follows: 10 indicates
314
that there is no session to resume. 12 (or more) indicates that
315
there are 2 (or more) sessions to resume and you should specify
316
which one to choose. In all other cases `-q' has no effect.
318
`-r [PID.SESSIONNAME]'
319
`-r SESSIONOWNER/[PID.SESSIONNAME]'
320
Resume a detached `screen' session. No other options (except
321
combinations with `-d' or `-D') may be specified, though the
322
session name (*note Session Name::) may be needed to distinguish
323
between multiple detached `screen' sessions. The second form is
324
used to connect to another user's screen session which runs in
325
multiuser mode. This indicates that screen should look for
326
sessions in another user's directory. This requires setuid-root.
329
Resume the first appropriate detached `screen' session. If
330
successful, all other command-line options are ignored. If no
331
detached session exists, start a new session using the specified
332
options, just as if `-R' had not been specified. This option is
333
set by default if screen is run as a login-shell (actually screen
334
uses `-xRR' in that case). For combinations with the `-D'/`-d'
338
Set the default shell to be PROGRAM. By default, `screen' uses
339
the value of the environment variable `$SHELL', or `/bin/sh' if it
340
is not defined. This option is equivalent to the `shell' command
344
Set the name of the new session to SESSIONNAME. This option can
345
be used to specify a meaningful name for the session in place of
346
the default TTY.HOST suffix. This name identifies the session for
347
the `screen -list' and `screen -r' commands. This option is
348
equivalent to the `sessionname' command (*note Session Name::).
351
Set the title (name) for the default shell or specified program.
352
This option is equivalent to the `shelltitle' command (*note
356
Run screen in UTF-8 mode. This option tells screen that your
357
terminal sends and understands UTF-8 encoded characters. It also
358
sets the default encoding for new windows to `utf8'.
361
Print the version number.
364
List available screens like `screen -ls', but remove destroyed
365
sessions instead of marking them as `dead'. An unreachable
366
session is considered dead, when its name matches either the name
367
of the local host, or the explicitly given parameter, if any. See
368
the `-r' flag for a description how to construct matches.
371
Attach to a session which is already attached elsewhere
372
(multi-display mode).
375
Send the specified command to a running screen session. You can use
376
the `-d' or `-r' option to tell screen to look only for attached
377
or detached screen sessions. Note that this command doesn't work
378
if the session is password protected.
382
File: screen.info, Node: Customization, Next: Commands, Prev: Invoking Screen, Up: Top
387
You can modify the default settings for `screen' to fit your tastes
388
either through a personal `.screenrc' file which contains commands to
389
be executed at startup, or on the fly using the `colon' command.
393
* Startup Files:: The `.screenrc' file.
394
* Source:: Read commands from a file.
395
* Colon:: Entering customization commands interactively.
398
File: screen.info, Node: Startup Files, Next: Source, Up: Customization
403
When `screen' is invoked, it executes initialization commands from
404
the files `.screenrc' in the user's home directory and
405
`/usr/local/etc/screenrc'. These defaults can be overridden in the
406
following ways: For the global screenrc file `screen' searches for the
407
environment variable `$SYSSCREENRC' (this override feature may be
408
disabled at compile-time). The user specific screenrc file is searched
409
for in `$SCREENRC', then ``$HOME'/.screenrc'. The command line option
410
`-c' specifies which file to use (*note Invoking Screen::. Commands in
411
these files are used to set options, bind commands to keys, and to
412
automatically establish one or more windows at the beginning of your
413
`screen' session. Commands are listed one per line, with empty lines
414
being ignored. A command's arguments are separated by tabs or spaces,
415
and may be surrounded by single or double quotes. A `#' turns the rest
416
of the line into a comment, except in quotes. Unintelligible lines are
417
warned about and ignored. Commands may contain references to
418
environment variables. The syntax is the shell-like `$VAR' or
419
`${VAR}'. Note that this causes incompatibility with previous `screen'
420
versions, as now the '$'-character has to be protected with '\' if no
421
variable substitution is intended. A string in single-quotes is also
422
protected from variable substitution.
424
Two configuration files are shipped as examples with your screen
425
distribution: `etc/screenrc' and `etc/etcscreenrc'. They contain a
426
number of useful examples for various commands.
429
File: screen.info, Node: Source, Next: Colon, Prev: Startup Files, Up: Customization
434
- Command: source file
436
Read and execute commands from file FILE. Source commands may be
437
nested to a maximum recursion level of ten. If FILE is not an
438
absolute path and screen is already processing a source
439
command, the parent directory of the running source command file
440
is used to search for the new command file before screen's
443
Note that termcap/terminfo/termcapinfo commands only work at
444
startup and reattach time, so they must be reached via the
445
default screenrc files to have an effect.
448
File: screen.info, Node: Colon, Prev: Source, Up: Customization
453
Customization can also be done online, with this command:
457
Allows you to enter `.screenrc' command lines. Useful for
458
on-the-fly modification of key bindings, specific window creation
459
and changing settings. Note that the `set' keyword no longer
460
exists, as of version 3.3. Change default settings with commands
461
starting with `def'. You might think of this as the `ex' command
462
mode of `screen', with `copy' as its `vi' command mode (*note Copy
466
File: screen.info, Node: Commands, Next: New Window, Prev: Customization, Up: Top
471
A command in `screen' can either be bound to a key, invoked from a
472
screenrc file, or called from the `colon' prompt (*note
473
Customization::). As of version 3.3, all commands can be bound to
474
keys, although some may be less useful than others. For a number of
475
real life working examples of the most important commands see the files
476
`etc/screenrc' and `etc/etcscreenrc' of your screen distribution.
478
In this manual, a command definition looks like this:
480
- Command: command [-n] ARG1 [ARG2] ...
482
This command does something, but I can't remember what.
484
An argument in square brackets (`[]') is optional. Many commands
485
take an argument of `on' or `off', which is indicated as STATE in the
490
* Default Key Bindings:: `screen' keyboard commands.
491
* Command Summary:: List of all commands.
494
File: screen.info, Node: Default Key Bindings, Next: Command Summary, Up: Commands
499
As mentioned previously, each keyboard command consists of a `C-a'
500
followed by one other character. For your convenience, all commands
501
that are bound to lower-case letters are also bound to their control
502
character counterparts (with the exception of `C-a a'; see below).
503
Thus, both `C-a c' and `C-a C-c' can be used to create a window.
505
The following table shows the default key bindings:
509
Prompt for a window identifier and switch. *Note Selecting::.
513
Present a list of all windows for selection. *Note Selecting::.
516
(select 0...select 9, select -)
517
Switch to window number 0...9, or the blank window. *Note
522
Switch the input focus to the next region. *Note Regions::.
526
Toggle to the window displayed previously. If this window does no
527
longer exist, `other' has the same effect as `next'. *Note
532
Send the command character (C-a) to window. See `escape' command.
533
*Note Command Character::.
537
Allow the user to enter a title for the current window. *Note
543
Send a break to the tty. *Note Break::.
547
Close and reopen the tty-line. *Note Break::.
552
Create a new window with a shell and switch to that window. *Note
557
Clear the screen. *Note Clear::.
562
Detach `screen' from this terminal. *Note Detach::.
566
Detach and logout. *Note Power Detach::.
571
Cycle flow among `on', `off' or `auto'. *Note Flow::.
575
Resize the window to the current region size. *Note Window Size::.
579
Toggle visual bell mode. *Note Bell::.
583
Write a hardcopy of the current window to the file "hardcopy.N".
588
Toggle logging of the current window to the file "screenlog.N".
594
Show info about the current window. *Note Info::.
599
Destroy the current window. *Note Kill::.
604
Fully refresh the current window. *Note Redisplay::.
608
Toggle the current window's login state. *Note Login::.
613
Repeat the last message displayed in the message line. *Note Last
617
(monitor) Toggle monitoring of the current window. *Note
624
Switch to the next window. *Note Selecting::.
628
Show the number (and title) of the current window. *Note Number::.
635
Switch to the previous window (opposite of `C-a n'). *Note
641
Send a ^Q (ASCII XON) to the current window. *Note XON/XOFF::.
645
Delete all regions but the current one. *Note Regions::.
650
Toggle the current window's line-wrap setting (turn the current
651
window's automatic margins on or off). *Note Wrap::.
656
Send a ^S (ASCII XOFF) to the current window. *Note XON/XOFF::.
660
Split the current region into two new ones. *Note Regions::.
665
Show the load average and xref. *Note Time::.
669
Display the version and compilation date. *Note Version::.
673
Enter digraph. *Note Digraph::.
678
Show a list of active windows. *Note Windows::.
682
Toggle between 80 and 132 columns. *Note Window Size::.
687
Lock your terminal. *Note Lock::.
691
Kill the current region. *Note Regions::.
696
Suspend `screen'. *Note Suspend::.
700
Reset the virtual terminal to its "power-on" values. *Note
705
Write out a `.termcap' file. *Note Dump Termcap::.
709
Show key bindings. *Note Help::.
713
Kill all windows and terminate `screen'. *Note Quit::.
717
Enter a command line. *Note Colon::.
723
Enter copy/scrollback mode. *Note Copy::.
728
Write the contents of the paste buffer to the stdin queue of the
729
current window. *Note Paste::.
734
Copy and paste a previous (command) line. *Note History::.
738
Write the paste buffer out to the screen-exchange file. *Note
743
Read the screen-exchange file into the paste buffer. *Note Screen
748
Delete the screen-exchange file. *Note Screen Exchange::.
752
Start/stop monitoring the current window for inactivity. *Note
757
Show the copyright page.
761
Show the listing of attached displays.
764
File: screen.info, Node: Command Summary, Prev: Default Key Bindings, Up: Commands
770
Allow other users in this session. *Note Multiuser Session::.
772
`aclchg USERNAMES PERMBITS LIST'
773
Change a user's permissions. *Note Multiuser Session::.
776
Disallow other user in this session. *Note Multiuser Session::.
778
`aclgrp USRNAME [GROUPNAME]'
779
Inherit permissions granted to a group leader. *Note Multiuser
782
`aclumask [USERS]+/-BITS ...'
783
Predefine access to new windows. *Note Umask::.
786
Set the activity notification message. *Note Monitor::.
789
Synonym to `acladd'. *Note Multiuser Session::.
792
Set all windows to partial refresh. *Note Redisplay::.
795
Enables support for the "alternate screen" terminal capability.
798
`at [IDENT][#|*|%] COMMAND [ARGS]'
799
Execute a command at other displays or windows. *Note At::.
801
`attrcolor ATTRIB [ATTRIBUTE/COLOR-MODIFIER]'
802
Map attributes to colors. *Note Attrcolor::.
805
Automatically detach the session on SIGHUP. *Note Detach::.
808
Enable a clear screen to discard unwritten output. *Note
811
`backtick ID LIFESPAN AUTOREFRESH COMMAND [ARGS]'
812
Define a command for the backtick string escape. *Note Backtick::.
815
Change background color erase. *Note Character Processing::.
818
Set the bell notification message. *Note Bell::.
820
`bind [-c CLASS] KEY [COMMAND [ARGS]]'
821
Bind a command to a key. *Note Bind::.
823
`bindkey [OPTS] [STRING [CMD ARGS]]'
824
Bind a string to a series of keystrokes. *Note Bindkey::.
827
Blank the screen. *Note Screen Saver::.
830
Define a blanker program. *Note Screen Saver::.
833
Send a break signal to the current window. *Note Break::.
835
`breaktype [TCSENDBREAK | TCSBRK | TIOCSBRK]'
836
Specify how to generate breaks. *Note Break::.
838
`bufferfile [EXCHANGE-FILE]'
839
Select a file for screen-exchange. *Note Screen Exchange::.
842
Change c1 code processing. *Note Character Processing::.
844
`caption MODE [STRING]'
845
Change caption mode and string. *Note Regions::.
847
`chacl USERNAMES PERMBITS LIST'
848
Synonym to `aclchg'. *Note Multiuser Session::.
851
Change character set slot designation. *Note Character
855
Change the current directory for future windows. *Note Chdir::.
858
Clear the window screen. *Note Clear::.
861
Enter a `screen' command. *Note Colon::.
864
Simulate the screen escape key. *Note Command Character::.
866
`compacthist [STATE]'
867
Selects compaction of trailing empty lines. *Note Scrollback::.
870
Grab or ungrab console output. *Note Console::.
873
Enter copy mode. *Note Copy::.
876
Removed. Use `paste' instead. *Note Registers::.
879
Select line break behavior for copying. *Note Line Termination::.
882
Suppress/allow debugging output. *Note Debug::.
885
Select default autonuke behavior. *Note Autonuke::.
888
Select background color erase. *Note Character Processing::.
890
`defbreaktype [TCSENDBREAK | TCSBRK | TIOCSBRK]'
891
Specify the default for generating breaks. *Note Break::.
894
Select default c1 processing behavior. *Note Character
898
Change defaul character set slot designation. *Note Character
902
Select default window encoding. *Note Character Processing::.
905
Set the default command and `meta' characters. *Note Command
909
Select default flow control behavior. *Note Flow::.
912
Select default GR processing behavior. *Note Character
915
`defhstatus [STATUS]'
916
Select default window hardstatus line. *Note Hardstatus::.
919
Select default window logging behavior. *Note Log::.
922
Select default utmp logging behavior. *Note Login::.
925
Select default file mode for ptys. *Note Mode::.
928
Select default activity monitoring behavior. *Note Monitor::.
930
`defnonblock STATE|NUMSECS'
931
Select default nonblock mode. *Note Nonblock::.
934
Select default output buffer limit. *Note Obuflimit::.
937
Set default lines of scrollback. *Note Scrollback::.
940
Set the default program for new windows. *Note Shell::.
943
Select default idle monitoring behavior. *Note Silence::.
946
Select the default inter-character timeout when pasting. *Note
950
Select default character encoding. *Note Character Processing::.
953
Set default line-wrapping behavior. *Note Wrap::.
955
`defwritelock ON|OFF|AUTO'
956
Set default writelock behavior. *Note Multiuser Session::.
959
Keep dead windows. *Note Zombie::.
962
Disconnect `screen' from the terminal. *Note Detach::.
965
Enter digraph sequence. *Note Digraph::.
968
Display terminal information. *Note Info::.
971
List currently active user interfaces. *Note Displays::.
974
Write the window's termcap entry to a file. *Note Dump Termcap::.
977
Display a message on startup. *Note Startup::.
979
`encoding ENC [DENC]'
980
Set the encoding of a window. *Note Character Processing::.
983
Set the command and `meta' characters. *Note Command Character::.
985
`eval COMMAND1 [COMMAND2 ...]'
986
Parse and execute each argument. *Note Eval::.
988
`exec [[FDPAT] COMMAND [ARGS ...]]'
989
Run a subprocess (filter). *Note Exec::.
992
Change window size to current display size. *Note Window Size::.
995
Set flow control behavior. *Note Flow::.
998
Move focus to next region. *Note Regions::.
1001
Change GR charset processing. *Note Character Processing::.
1003
`hardcopy [-h] [FILE]'
1004
Write out the contents of the current window. *Note Hardcopy::.
1006
`hardcopy_append STATE'
1007
Append to hardcopy files. *Note Hardcopy::.
1009
`hardcopydir DIRECTORY'
1010
Place, where to dump hardcopy files. *Note Hardcopy::.
1012
`hardstatus [STATE]'
1013
Use the hardware status line. *Note Hardware Status Line::.
1015
`height [LINES [COLS]]'
1016
Set display height. *Note Window Size::.
1019
Display current key bindings. *Note Help::.
1022
Find previous command beginning .... *Note History::.
1025
Change the window's hardstatus line. *Note Hardstatus::.
1027
`idle [TIMEOUT [CMD ARGS]]'
1028
Define a screen saver command. *Note Screen Saver::.
1030
`ignorecase [STATE]'
1031
Ignore character case in searches. *Note Searching::.
1034
Display window settings. *Note Info::.
1037
Removed, use `paste' instead. *Note Registers::.
1040
Destroy the current window. *Note Kill::.
1043
Redisplay the last message. *Note Last Message::.
1046
Display licensing information. *Note Startup::.
1049
Lock the controlling terminal. *Note Lock::.
1052
Log all output in the current window. *Note Log::.
1055
Place where to collect logfiles. *Note Log::.
1058
Log the window in `/etc/utmp'. *Note Login::.
1061
Configure logfile time-stamps. *Note Log::.
1064
Use only the default mapping table for the next keystroke. *Note
1068
Don't try to do keymapping on the next keystroke. *Note Bindkey
1072
Set the inter-character timeout used for keymapping. *Note Bindkey
1076
Rebind keys in copy mode. *Note Copy Mode Keys::.
1079
Set the maximum window number. *Note Maxwin::.
1082
Insert the command character. *Note Command Character::.
1085
Monitor activity in window. *Note Monitor::.
1088
Set minimum message wait. *Note Message Wait::.
1091
Set default message wait. *Note Message Wait::.
1094
Go into single or multi user mode. *Note Multiuser Session::.
1097
Use `nethack'-like error messages. *Note Nethack::.
1100
Switch to the next window. *Note Selecting::.
1102
`nonblock [STATE|NUMSECS]'
1103
Disable flow control to the current display. *Note
1104
Nonblock::.|NUMSECS]
1107
Change/display the current window's number. *Note Number::.
1110
Select output buffer limit. *Note Obuflimit::.
1113
Kill all other regions. *Note Regions::.
1116
Switch to the window you were in last. *Note Selecting::.
1119
Set window to partial refresh. *Note Redisplay::.
1121
`password [CRYPTED_PW]'
1122
Set reattach password. *Note Detach::.
1124
`paste [SRC_REGS [DEST_REG]]'
1125
Paste contents of paste buffer or registers somewhere. *Note
1129
Include font information in the paste buffer. *Note Paste::.
1132
Close and Reopen the window's terminal. *Note Break::.
1135
Detach and hang up. *Note Power Detach::.
1137
`pow_detach_msg [MESSAGE]'
1138
Set message displayed on `pow_detach'. *Note Power Detach::.
1141
Switch to the previous window. *Note Selecting::.
1144
Set a command for VT100 printer port emulation. *Note Printcmd::.
1147
Treat a register as input to `screen'. *Note Registers::.
1150
Kill all windows and exit. *Note Quit::.
1152
`readbuf [-e ENCODING] [FILENAME]'
1153
Read the paste buffer from the screen-exchange file. *Note Screen
1156
`readreg [-e ENCODING] [REG [FILE]]'
1157
Load a register from paste buffer or file. *Note Registers::.
1160
Redisplay the current window. *Note Redisplay::.
1162
`register [-e ENCODING] KEY STRING'
1163
Store a string to a register. *Note Registers::.
1166
Kill current region. *Note Regions::.
1169
Delete the screen-exchange file. *Note Screen Exchange::.
1172
Reset the terminal settings for the window. *Note Reset::.
1174
`resize [(+/-)lines]'
1175
Grow or shrink a region
1177
`screen [OPTS] [N] [CMD [ARGS]]'
1178
Create a new window. *Note Screen Command::.
1181
Set size of scrollback buffer. *Note Scrollback::.
1184
Switch to a specified window. *Note Selecting::.
1186
`sessionname [NAME]'
1187
Name this session. *Note Session Name::.
1189
`setenv [VAR [STRING]]'
1190
Set an environment variable for new windows. *Note Setenv::.
1193
Controll process group creation for windows. *Note Setsid::.
1196
Set the default program for new windows. *Note Shell::.
1199
Set the default name for new windows. *Note Shell::.
1201
`silence [STATE|SECONDS]'
1202
Monitor a window for inactivity. *Note Silence::.
1204
`silencewait SECONDS'
1205
Default timeout to trigger an inactivity notify. *Note Silence::.
1208
Pause during startup. *Note Startup::.
1211
Slow down pasting in windows. *Note Paste::.
1214
Run commands from a file. *Note Source::.
1216
`sorendition [ATTR [COLOR]]'
1217
Change text highlighting. *Note Sorendition::.
1220
Split region into two parts. *Note Regions::.
1222
`startup_message STATE'
1223
Display copyright notice on startup. *Note Startup::.
1226
Stuff a string in the input buffer of a window. *Note Paste::.
1228
`su [USERNAME [PASSWORD [PASSWORD2]]]'
1229
Identify a user. *Note Multiuser Session::.
1232
Put session in background. *Note Suspend::.
1235
Set `$TERM' for new windows. *Note Term::.
1237
`termcap TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]'
1238
Tweak termcap entries for best performance. *Note Termcap
1241
`terminfo TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]'
1242
Ditto, for terminfo systems. *Note Termcap Syntax::.
1244
`termcapinfo TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]'
1245
Ditto, for both systems. *Note Termcap Syntax::.
1248
Display time and load average. *Note Time::.
1250
`title [WINDOWTITLE]'
1251
Set the name of the current window. *Note Title Command::.
1253
`umask [USERS]+/-BITS ...'
1254
Synonym to `aclumask'. *Note Umask::.
1257
Unset environment variable for new windows. *Note Setenv::.
1259
`utf8 [STATE [DSTATE]]'
1260
Select character encoding of the current window. *Note Character
1264
Use visual bell. *Note Bell::.
1266
`vbell_msg [MESSAGE]'
1267
Set vbell message. *Note Bell::.
1270
Set delay for vbell message. *Note Bell::.
1273
Display `screen' version. *Note Version::.
1276
Write a message to all displays. *Note Multiuser Session::.
1278
`width [COLS [LINES]]'
1279
Set the width of the window. *Note Window Size::.
1281
`windowlist [-b] | string [STRING] | title [TITLE]'
1282
Present a list of all windows for selection. *Note Windowlist::.
1285
List active windows. *Note Windows::.
1288
Control line-wrap behavior. *Note Wrap::.
1290
`writebuf [-e ENCODING] [FILENAME]'
1291
Write paste buffer to screen-exchange file. *Note Screen
1294
`writelock ON|OFF|AUTO'
1295
Grant exclusive write permission. *Note Multiuser Session::.
1298
Send an XOFF character. *Note XON/XOFF::.
1301
Send an XON character. *Note XON/XOFF::.
1303
`zmodem [off|auto|catch|pass]'
1304
Define how screen treats zmodem requests. *Note Zmodem::.
1307
Keep dead windows. *Note Zombie::.
1310
File: screen.info, Node: New Window, Next: Selecting, Prev: Commands, Up: Top
1315
This section describes the commands for creating a new window for
1316
running programs. When a new window is created, the first available
1317
number from the range 0...9 is assigned to it. The number of windows
1318
is limited at compile-time by the MAXWIN configuration parameter.
1322
* Chdir:: Change the working directory for new windows.
1323
* Screen Command:: Create a new window.
1324
* Setenv:: Set environment variables for new windows.
1325
* Shell:: Parameters for shell windows.
1326
* Term:: Set the terminal type for new windows.
1327
* Window Types:: Creating different types of windows.
1330
File: screen.info, Node: Chdir, Next: Screen Command, Up: New Window
1335
- Command: chdir [directory]
1337
Change the current directory of `screen' to the specified directory
1338
or, if called without an argument, to your home directory (the
1339
value of the environment variable `$HOME'). All windows that are
1340
created by means of the `screen' command from within `.screenrc'
1341
or by means of `C-a : screen ...' or `C-a c' use this as their
1342
default directory. Without a `chdir' command, this would be the
1343
directory from which `screen' was invoked. Hardcopy and log files
1344
are always written to the _window's_ default directory, _not_ the
1345
current directory of the process running in the window. You can
1346
use this command multiple times in your `.screenrc' to start
1347
various windows in different default directories, but the last
1348
`chdir' value will affect all the windows you create interactively.
1351
File: screen.info, Node: Screen Command, Next: Setenv, Prev: Chdir, Up: New Window
1356
- Command: screen [opts] [n] [cmd [args]]
1357
(`C-a c', `C-a C-c')
1358
Establish a new window. The flow-control options (`-f', `-fn' and
1359
`-fa'), title option (`-t'), login options (`-l' and `-ln') ,
1360
terminal type option (`-T TERM'), the all-capability-flag (`-a')
1361
and scrollback option (`-h NUM') may be specified with each
1362
command. The option (`-M') turns monitoring on for this window.
1363
The option (`-L') turns output logging on for this window. If an
1364
optional number N in the range 0...9 is given, the window number N
1365
is assigned to the newly created window (or, if this number is
1366
already in-use, the next available number). If a command is
1367
specified after `screen', this command (with the given arguments)
1368
is started in the window; otherwise, a shell is created.
1370
Screen has built in some functionality of `cu' and `telnet'.
1371
*Note Window Types::.
1373
Thus, if your `.screenrc' contains the lines
1375
# example for .screenrc:
1377
screen -fn -t foobar 2 -L telnet foobar
1379
`screen' creates a shell window (in window #1) and a window with a
1380
TELNET connection to the machine foobar (with no flow-control using the
1381
title `foobar' in window #2) and will write a logfile `screenlog.2' of
1382
the telnet session. If you do not include any `screen' commands in
1383
your `.screenrc' file, then `screen' defaults to creating a single
1384
shell window, number zero. When the initialization is completed,
1385
`screen' switches to the last window specified in your .screenrc file
1386
or, if none, it opens default window #0.
1389
File: screen.info, Node: Setenv, Next: Shell, Prev: Screen Command, Up: New Window
1394
- Command: setenv var string
1396
Set the environment variable VAR to value STRING. If only VAR is
1397
specified, the user will be prompted to enter a value. If no
1398
parameters are specified, the user will be prompted for both
1399
variable and value. The environment is inherited by all
1400
subsequently forked shells.
1402
- Command: unsetenv var
1404
Unset an environment variable.
1407
File: screen.info, Node: Shell, Next: Term, Prev: Setenv, Up: New Window
1412
- Command: shell command
1413
- Command: defshell command
1415
Set the command to be used to create a new shell. This overrides
1416
the value of the environment variable `$SHELL'. This is useful if
1417
you'd like to run a tty-enhancer which is expecting to execute the
1418
program specified in `$SHELL'. If the command begins with a `-'
1419
character, the shell will be started as a login-shell.
1421
`defshell' is currently a synonym to the `shell' command.
1423
- Command: shelltitle title
1425
Set the title for all shells created during startup or by the C-a
1426
C-c command. *Note Naming Windows::, for details about what
1430
File: screen.info, Node: Term, Next: Window Types, Prev: Shell, Up: New Window
1435
- Command: term term
1437
In each window `screen' opens, it sets the `$TERM' variable to
1438
`screen' by default, unless no description for `screen' is
1439
installed in the local termcap or terminfo data base. In that
1440
case it pretends that the terminal emulator is `vt100'. This
1441
won't do much harm, as `screen' is VT100/ANSI compatible. The use
1442
of the `term' command is discouraged for non-default purpose.
1443
That is, one may want to specify special `$TERM' settings (e.g.
1444
vt100) for the next `screen rlogin othermachine' command. Use the
1445
command `screen -T vt100 rlogin othermachine' rather than setting
1446
and resetting the default.