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 window 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).
373 `Screen' refuses to attach from within itself.
374 But when cascading multiple screens, loops are not detected; take care.
377 Send the specified command to a running screen session. You can use
378 the `-d' or `-r' option to tell screen to look only for attached
379 or detached screen sessions. Note that this command doesn't work
380 if the session is password protected.
384 File: screen.info, Node: Customization, Next: Commands, Prev: Invoking Screen, Up: Top
389 You can modify the default settings for `screen' to fit your tastes
390 either through a personal `.screenrc' file which contains commands to
391 be executed at startup, or on the fly using the `colon' command.
395 * Startup Files:: The `.screenrc' file.
396 * Source:: Read commands from a file.
397 * Colon:: Entering customization commands interactively.
400 File: screen.info, Node: Startup Files, Next: Source, Up: Customization
405 When `screen' is invoked, it executes initialization commands from
406 the files `.screenrc' in the user's home directory and
407 `/usr/local/etc/screenrc'. These defaults can be overridden in the
408 following ways: For the global screenrc file `screen' searches for the
409 environment variable `$SYSSCREENRC' (this override feature may be
410 disabled at compile-time). The user specific screenrc file is searched
411 for in `$SCREENRC', then ``$HOME'/.screenrc'. The command line option
412 `-c' specifies which file to use (*note Invoking Screen::. Commands in
413 these files are used to set options, bind commands to keys, and to
414 automatically establish one or more windows at the beginning of your
415 `screen' session. Commands are listed one per line, with empty lines
416 being ignored. A command's arguments are separated by tabs or spaces,
417 and may be surrounded by single or double quotes. A `#' turns the rest
418 of the line into a comment, except in quotes. Unintelligible lines are
419 warned about and ignored. Commands may contain references to
420 environment variables. The syntax is the shell-like `$VAR' or
421 `${VAR}'. Note that this causes incompatibility with previous `screen'
422 versions, as now the '$'-character has to be protected with '\' if no
423 variable substitution is intended. A string in single-quotes is also
424 protected from variable substitution.
426 Two configuration files are shipped as examples with your screen
427 distribution: `etc/screenrc' and `etc/etcscreenrc'. They contain a
428 number of useful examples for various commands.
431 File: screen.info, Node: Source, Next: Colon, Prev: Startup Files, Up: Customization
436 - Command: source file
438 Read and execute commands from file FILE. Source commands may be
439 nested to a maximum recursion level of ten. If FILE is not an
440 absolute path and screen is already processing a source
441 command, the parent directory of the running source command file
442 is used to search for the new command file before screen's
445 Note that termcap/terminfo/termcapinfo commands only work at
446 startup and reattach time, so they must be reached via the
447 default screenrc files to have an effect.
450 File: screen.info, Node: Colon, Prev: Source, Up: Customization
455 Customization can also be done online, with this command:
459 Allows you to enter `.screenrc' command lines. Useful for
460 on-the-fly modification of key bindings, specific window creation
461 and changing settings. Note that the `set' keyword no longer
462 exists, as of version 3.3. Change default settings with commands
463 starting with `def'. You might think of this as the `ex' command
464 mode of `screen', with `copy' as its `vi' command mode (*note Copy
468 File: screen.info, Node: Commands, Next: New Window, Prev: Customization, Up: Top
473 A command in `screen' can either be bound to a key, invoked from a
474 screenrc file, or called from the `colon' prompt (*note
475 Customization::). As of version 3.3, all commands can be bound to
476 keys, although some may be less useful than others. For a number of
477 real life working examples of the most important commands see the files
478 `etc/screenrc' and `etc/etcscreenrc' of your screen distribution.
480 In this manual, a command definition looks like this:
482 - Command: command [-n] ARG1 [ARG2] ...
484 This command does something, but I can't remember what.
486 An argument in square brackets (`[]') is optional. Many commands
487 take an argument of `on' or `off', which is indicated as STATE in the
492 * Default Key Bindings:: `screen' keyboard commands.
493 * Command Summary:: List of all commands.
496 File: screen.info, Node: Default Key Bindings, Next: Command Summary, Up: Commands
501 As mentioned previously, each keyboard command consists of a `C-a'
502 followed by one other character. For your convenience, all commands
503 that are bound to lower-case letters are also bound to their control
504 character counterparts (with the exception of `C-a a'; see below).
505 Thus, both `C-a c' and `C-a C-c' can be used to create a window.
507 The following table shows the default key bindings:
511 Prompt for a window identifier and switch. *Note Selecting::.
515 Present a list of all windows for selection. *Note Selecting::.
518 (select 0...select 9, select -)
519 Switch to window number 0...9, or the blank window. *Note
524 Switch the input focus to the next region. *Note Regions::.
528 Toggle to the window displayed previously. If this window does no
529 longer exist, `other' has the same effect as `next'. *Note
534 Send the command character (C-a) to window. See `escape' command.
535 *Note Command Character::.
539 Allow the user to enter a title for the current window. *Note
545 Send a break to the tty. *Note Break::.
549 Close and reopen the tty-line. *Note Break::.
554 Create a new window with a shell and switch to that window. *Note
559 Clear the screen. *Note Clear::.
564 Detach `screen' from this terminal. *Note Detach::.
568 Detach and logout. *Note Power Detach::.
573 Cycle flow among `on', `off' or `auto'. *Note Flow::.
577 Resize the window to the current region size. *Note Window Size::.
581 Toggle visual bell mode. *Note Bell::.
585 Write a hardcopy of the current window to the file "hardcopy.N".
590 Toggle logging of the current window to the file "screenlog.N".
596 Show info about the current window. *Note Info::.
601 Destroy the current window. *Note Kill::.
606 Fully refresh the current window. *Note Redisplay::.
610 Toggle the current window's login state. *Note Login::.
615 Repeat the last message displayed in the message line. *Note Last
619 (monitor) Toggle monitoring of the current window. *Note
626 Switch to the next window. *Note Selecting::.
630 Show the number (and title) of the current window. *Note Number::.
637 Switch to the previous window (opposite of `C-a n'). *Note
643 Send a ^Q (ASCII XON) to the current window. *Note XON/XOFF::.
647 Delete all regions but the current one. *Note Regions::.
652 Toggle the current window's line-wrap setting (turn the current
653 window's automatic margins on or off). *Note Wrap::.
658 Send a ^S (ASCII XOFF) to the current window. *Note XON/XOFF::.
662 Split the current region into two new ones. *Note Regions::.
667 Show the load average and xref. *Note Time::.
671 Display the version and compilation date. *Note Version::.
675 Enter digraph. *Note Digraph::.
680 Show a list of active windows. *Note Windows::.
684 Toggle between 80 and 132 columns. *Note Window Size::.
689 Lock your terminal. *Note Lock::.
693 Kill the current region. *Note Regions::.
698 Suspend `screen'. *Note Suspend::.
702 Reset the virtual terminal to its "power-on" values. *Note
707 Write out a `.termcap' file. *Note Dump Termcap::.
711 Show key bindings. *Note Help::.
715 Kill all windows and terminate `screen'. *Note Quit::.
719 Enter a command line. *Note Colon::.
725 Enter copy/scrollback mode. *Note Copy::.
730 Write the contents of the paste buffer to the stdin queue of the
731 current window. *Note Paste::.
736 Copy and paste a previous (command) line. *Note History::.
740 Write the paste buffer out to the screen-exchange file. *Note
745 Read the screen-exchange file into the paste buffer. *Note Screen
750 Delete the screen-exchange file. *Note Screen Exchange::.
754 Start/stop monitoring the current window for inactivity. *Note
759 Show the copyright page.
763 Show the listing of attached displays.
766 File: screen.info, Node: Command Summary, Prev: Default Key Bindings, Up: Commands
772 Allow other users in this session. *Note Multiuser Session::.
774 `aclchg USERNAMES PERMBITS LIST'
775 Change a user's permissions. *Note Multiuser Session::.
778 Disallow other user in this session. *Note Multiuser Session::.
780 `aclgrp USRNAME [GROUPNAME]'
781 Inherit permissions granted to a group leader. *Note Multiuser
784 `aclumask [USERS]+/-BITS ...'
785 Predefine access to new windows. *Note Umask::.
788 Set the activity notification message. *Note Monitor::.
791 Synonym to `acladd'. *Note Multiuser Session::.
794 Set all windows to partial refresh. *Note Redisplay::.
797 Enables support for the "alternate screen" terminal capability.
800 `at [IDENT][#|*|%] COMMAND [ARGS]'
801 Execute a command at other displays or windows. *Note At::.
803 `attrcolor ATTRIB [ATTRIBUTE/COLOR-MODIFIER]'
804 Map attributes to colors. *Note Attrcolor::.
807 Automatically detach the session on SIGHUP. *Note Detach::.
810 Enable a clear screen to discard unwritten output. *Note
813 `backtick ID LIFESPAN AUTOREFRESH COMMAND [ARGS]'
814 Define a command for the backtick string escape. *Note Backtick::.
817 Change background color erase. *Note Character Processing::.
820 Set the bell notification message. *Note Bell::.
822 `bind [-c CLASS] KEY [COMMAND [ARGS]]'
823 Bind a command to a key. *Note Bind::.
825 `bindkey [OPTS] [STRING [CMD ARGS]]'
826 Bind a string to a series of keystrokes. *Note Bindkey::.
829 Blank the screen. *Note Screen Saver::.
832 Define a blanker program. *Note Screen Saver::.
835 Send a break signal to the current window. *Note Break::.
837 `breaktype [TCSENDBREAK | TCSBRK | TIOCSBRK]'
838 Specify how to generate breaks. *Note Break::.
840 `bufferfile [EXCHANGE-FILE]'
841 Select a file for screen-exchange. *Note Screen Exchange::.
844 Change c1 code processing. *Note Character Processing::.
846 `caption MODE [STRING]'
847 Change caption mode and string. *Note Regions::.
849 `chacl USERNAMES PERMBITS LIST'
850 Synonym to `aclchg'. *Note Multiuser Session::.
853 Change character set slot designation. *Note Character
857 Change the current directory for future windows. *Note Chdir::.
860 Clear the window screen. *Note Clear::.
863 Enter a `screen' command. *Note Colon::.
866 Simulate the screen escape key. *Note Command Character::.
868 `compacthist [STATE]'
869 Selects compaction of trailing empty lines. *Note Scrollback::.
872 Grab or ungrab console output. *Note Console::.
875 Enter copy mode. *Note Copy::.
878 Removed. Use `paste' instead. *Note Registers::.
881 Select line break behavior for copying. *Note Line Termination::.
884 Suppress/allow debugging output. *Note Debug::.
887 Select default autonuke behavior. *Note Autonuke::.
890 Select background color erase. *Note Character Processing::.
892 `defbreaktype [TCSENDBREAK | TCSBRK | TIOCSBRK]'
893 Specify the default for generating breaks. *Note Break::.
896 Select default c1 processing behavior. *Note Character
900 Change defaul character set slot designation. *Note Character
904 Select default window encoding. *Note Character Processing::.
907 Set the default command and `meta' characters. *Note Command
911 Select default flow control behavior. *Note Flow::.
914 Select default GR processing behavior. *Note Character
917 `defhstatus [STATUS]'
918 Select default window hardstatus line. *Note Hardstatus::.
921 Select default window logging behavior. *Note Log::.
924 Select default utmp logging behavior. *Note Login::.
927 Select default file mode for ptys. *Note Mode::.
930 Select default activity monitoring behavior. *Note Monitor::.
932 `defnonblock STATE|NUMSECS'
933 Select default nonblock mode. *Note Nonblock::.
936 Select default output buffer limit. *Note Obuflimit::.
939 Set default lines of scrollback. *Note Scrollback::.
942 Set the default program for new windows. *Note Shell::.
945 Select default idle monitoring behavior. *Note Silence::.
948 Select the default inter-character timeout when pasting. *Note
952 Select default character encoding. *Note Character Processing::.
955 Set default line-wrapping behavior. *Note Wrap::.
957 `defwritelock ON|OFF|AUTO'
958 Set default writelock behavior. *Note Multiuser Session::.
961 Keep dead windows. *Note Zombie::.
964 Disconnect `screen' from the terminal. *Note Detach::.
967 Enter digraph sequence. *Note Digraph::.
970 Display terminal information. *Note Info::.
973 List currently active user interfaces. *Note Displays::.
976 Write the window's termcap entry to a file. *Note Dump Termcap::.
979 Display a message on startup. *Note Startup::.
981 `encoding ENC [DENC]'
982 Set the encoding of a window. *Note Character Processing::.
985 Set the command and `meta' characters. *Note Command Character::.
987 `eval COMMAND1 [COMMAND2 ...]'
988 Parse and execute each argument. *Note Eval::.
990 `exec [[FDPAT] COMMAND [ARGS ...]]'
991 Run a subprocess (filter). *Note Exec::.
994 Change window size to current display size. *Note Window Size::.
997 Set flow control behavior. *Note Flow::.
1000 Move focus to next region. *Note Regions::.
1003 Change GR charset processing. *Note Character Processing::.
1005 `hardcopy [-h] [FILE]'
1006 Write out the contents of the current window. *Note Hardcopy::.
1008 `hardcopy_append STATE'
1009 Append to hardcopy files. *Note Hardcopy::.
1011 `hardcopydir DIRECTORY'
1012 Place, where to dump hardcopy files. *Note Hardcopy::.
1014 `hardstatus [STATE]'
1015 Use the hardware status line. *Note Hardware Status Line::.
1017 `height [LINES [COLS]]'
1018 Set display height. *Note Window Size::.
1021 Display current key bindings. *Note Help::.
1024 Find previous command beginning .... *Note History::.
1027 Change the window's hardstatus line. *Note Hardstatus::.
1029 `idle [TIMEOUT [CMD ARGS]]'
1030 Define a screen saver command. *Note Screen Saver::.
1032 `ignorecase [STATE]'
1033 Ignore character case in searches. *Note Searching::.
1036 Display window settings. *Note Info::.
1039 Removed, use `paste' instead. *Note Registers::.
1042 Destroy the current window. *Note Kill::.
1045 Redisplay the last message. *Note Last Message::.
1048 Display licensing information. *Note Startup::.
1051 Lock the controlling terminal. *Note Lock::.
1054 Log all output in the current window. *Note Log::.
1057 Place where to collect logfiles. *Note Log::.
1060 Log the window in `/etc/utmp'. *Note Login::.
1063 Configure logfile time-stamps. *Note Log::.
1066 Use only the default mapping table for the next keystroke. *Note
1070 Don't try to do keymapping on the next keystroke. *Note Bindkey
1074 Set the inter-character timeout used for keymapping. *Note Bindkey
1078 Rebind keys in copy mode. *Note Copy Mode Keys::.
1081 Set the maximum window number. *Note Maxwin::.
1084 Insert the command character. *Note Command Character::.
1087 Monitor activity in window. *Note Monitor::.
1090 Set minimum message wait. *Note Message Wait::.
1093 Set default message wait. *Note Message Wait::.
1096 Go into single or multi user mode. *Note Multiuser Session::.
1099 Use `nethack'-like error messages. *Note Nethack::.
1102 Switch to the next window. *Note Selecting::.
1104 `nonblock [STATE|NUMSECS]'
1105 Disable flow control to the current display. *Note
1106 Nonblock::.|NUMSECS]
1109 Change/display the current window's number. *Note Number::.
1112 Select output buffer limit. *Note Obuflimit::.
1115 Kill all other regions. *Note Regions::.
1118 Switch to the window you were in last. *Note Selecting::.
1121 Set window to partial refresh. *Note Redisplay::.
1123 `password [CRYPTED_PW]'
1124 Set reattach password. *Note Detach::.
1126 `paste [SRC_REGS [DEST_REG]]'
1127 Paste contents of paste buffer or registers somewhere. *Note
1131 Include font information in the paste buffer. *Note Paste::.
1134 Close and Reopen the window's terminal. *Note Break::.
1137 Detach and hang up. *Note Power Detach::.
1139 `pow_detach_msg [MESSAGE]'
1140 Set message displayed on `pow_detach'. *Note Power Detach::.
1143 Switch to the previous window. *Note Selecting::.
1146 Set a command for VT100 printer port emulation. *Note Printcmd::.
1149 Treat a register as input to `screen'. *Note Registers::.
1152 Kill all windows and exit. *Note Quit::.
1154 `readbuf [-e ENCODING] [FILENAME]'
1155 Read the paste buffer from the screen-exchange file. *Note Screen
1158 `readreg [-e ENCODING] [REG [FILE]]'
1159 Load a register from paste buffer or file. *Note Registers::.
1162 Redisplay the current window. *Note Redisplay::.
1164 `register [-e ENCODING] KEY STRING'
1165 Store a string to a register. *Note Registers::.
1168 Kill current region. *Note Regions::.
1171 Delete the screen-exchange file. *Note Screen Exchange::.
1174 Reset the terminal settings for the window. *Note Reset::.
1176 `resize [(+/-)lines]'
1177 Grow or shrink a region
1179 `screen [OPTS] [N] [CMD [ARGS]]'
1180 Create a new window. *Note Screen Command::.
1183 Set size of scrollback buffer. *Note Scrollback::.
1186 Switch to a specified window. *Note Selecting::.
1188 `sessionname [NAME]'
1189 Name this session. *Note Session Name::.
1191 `setenv [VAR [STRING]]'
1192 Set an environment variable for new windows. *Note Setenv::.
1195 Controll process group creation for windows. *Note Setsid::.
1198 Set the default program for new windows. *Note Shell::.
1201 Set the default name for new windows. *Note Shell::.
1203 `silence [STATE|SECONDS]'
1204 Monitor a window for inactivity. *Note Silence::.
1206 `silencewait SECONDS'
1207 Default timeout to trigger an inactivity notify. *Note Silence::.
1210 Pause during startup. *Note Startup::.
1213 Slow down pasting in windows. *Note Paste::.
1216 Run commands from a file. *Note Source::.
1218 `sorendition [ATTR [COLOR]]'
1219 Change text highlighting. *Note Sorendition::.
1222 Split region into two parts. *Note Regions::.
1224 `startup_message STATE'
1225 Display copyright notice on startup. *Note Startup::.
1228 Stuff a string in the input buffer of a window. *Note Paste::.
1230 `su [USERNAME [PASSWORD [PASSWORD2]]]'
1231 Identify a user. *Note Multiuser Session::.
1234 Put session in background. *Note Suspend::.
1237 Set `$TERM' for new windows. *Note Term::.
1239 `termcap TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]'
1240 Tweak termcap entries for best performance. *Note Termcap
1243 `terminfo TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]'
1244 Ditto, for terminfo systems. *Note Termcap Syntax::.
1246 `termcapinfo TERM TERMINAL-TWEAKS [WINDOW-TWEAKS]'
1247 Ditto, for both systems. *Note Termcap Syntax::.
1250 Display time and load average. *Note Time::.
1252 `title [WINDOWTITLE]'
1253 Set the name of the current window. *Note Title Command::.
1255 `umask [USERS]+/-BITS ...'
1256 Synonym to `aclumask'. *Note Umask::.
1259 Unset environment variable for new windows. *Note Setenv::.
1261 `utf8 [STATE [DSTATE]]'
1262 Select character encoding of the current window. *Note Character
1266 Use visual bell. *Note Bell::.
1268 `vbell_msg [MESSAGE]'
1269 Set vbell message. *Note Bell::.
1272 Set delay for vbell message. *Note Bell::.
1275 Display `screen' version. *Note Version::.
1278 Write a message to all displays. *Note Multiuser Session::.
1280 `width [COLS [LINES]]'
1281 Set the width of the window. *Note Window Size::.
1283 `windowlist [-b] | string [STRING] | title [TITLE]'
1284 Present a list of all windows for selection. *Note Windowlist::.
1287 List active windows. *Note Windows::.
1290 Control line-wrap behavior. *Note Wrap::.
1292 `writebuf [-e ENCODING] [FILENAME]'
1293 Write paste buffer to screen-exchange file. *Note Screen
1296 `writelock ON|OFF|AUTO'
1297 Grant exclusive write permission. *Note Multiuser Session::.
1300 Send an XOFF character. *Note XON/XOFF::.
1303 Send an XON character. *Note XON/XOFF::.
1305 `zmodem [off|auto|catch|pass]'
1306 Define how screen treats zmodem requests. *Note Zmodem::.
1308 `zombie [KEYS [onerror]]'
1309 Keep dead windows. *Note Zombie::.
1312 File: screen.info, Node: New Window, Next: Selecting, Prev: Commands, Up: Top
1317 This section describes the commands for creating a new window for
1318 running programs. When a new window is created, the first available
1319 number from the range 0...9 is assigned to it. The number of windows
1320 is limited at compile-time by the MAXWIN configuration parameter.
1324 * Chdir:: Change the working directory for new windows.
1325 * Screen Command:: Create a new window.
1326 * Setenv:: Set environment variables for new windows.
1327 * Shell:: Parameters for shell windows.
1328 * Term:: Set the terminal type for new windows.
1329 * Window Types:: Creating different types of windows.
1332 File: screen.info, Node: Chdir, Next: Screen Command, Up: New Window
1337 - Command: chdir [directory]
1339 Change the current directory of `screen' to the specified directory
1340 or, if called without an argument, to your home directory (the
1341 value of the environment variable `$HOME'). All windows that are
1342 created by means of the `screen' command from within `.screenrc'
1343 or by means of `C-a : screen ...' or `C-a c' use this as their
1344 default directory. Without a `chdir' command, this would be the
1345 directory from which `screen' was invoked. Hardcopy and log files
1346 are always written to the _window's_ default directory, _not_ the
1347 current directory of the process running in the window. You can
1348 use this command multiple times in your `.screenrc' to start
1349 various windows in different default directories, but the last
1350 `chdir' value will affect all the windows you create interactively.
1353 File: screen.info, Node: Screen Command, Next: Setenv, Prev: Chdir, Up: New Window
1358 - Command: screen [opts] [n] [cmd [args]]
1359 (`C-a c', `C-a C-c')
1360 Establish a new window. The flow-control options (`-f', `-fn' and
1361 `-fa'), title option (`-t'), login options (`-l' and `-ln') ,
1362 terminal type option (`-T TERM'), the all-capability-flag (`-a')
1363 and scrollback option (`-h NUM') may be specified with each
1364 command. The option (`-M') turns monitoring on for this window.
1365 The option (`-L') turns output logging on for this window. If an
1366 optional number N in the range 0...9 is given, the window number N
1367 is assigned to the newly created window (or, if this number is
1368 already in-use, the next available number). If a command is
1369 specified after `screen', this command (with the given arguments)
1370 is started in the window; otherwise, a shell is created.
1372 Screen has built in some functionality of `cu' and `telnet'.
1373 *Note Window Types::.
1375 Thus, if your `.screenrc' contains the lines
1377 # example for .screenrc:
1379 screen -fn -t foobar 2 -L telnet foobar
1381 `screen' creates a shell window (in window #1) and a window with a
1382 TELNET connection to the machine foobar (with no flow-control using the
1383 title `foobar' in window #2) and will write a logfile `screenlog.2' of
1384 the telnet session. If you do not include any `screen' commands in
1385 your `.screenrc' file, then `screen' defaults to creating a single
1386 shell window, number zero. When the initialization is completed,
1387 `screen' switches to the last window specified in your .screenrc file
1388 or, if none, it opens default window #0.
1391 File: screen.info, Node: Setenv, Next: Shell, Prev: Screen Command, Up: New Window
1396 - Command: setenv var string
1398 Set the environment variable VAR to value STRING. If only VAR is
1399 specified, the user will be prompted to enter a value. If no
1400 parameters are specified, the user will be prompted for both
1401 variable and value. The environment is inherited by all
1402 subsequently forked shells.
1404 - Command: unsetenv var
1406 Unset an environment variable.
1409 File: screen.info, Node: Shell, Next: Term, Prev: Setenv, Up: New Window
1414 - Command: shell command
1415 - Command: defshell command
1417 Set the command to be used to create a new shell. This overrides
1418 the value of the environment variable `$SHELL'. This is useful if
1419 you'd like to run a tty-enhancer which is expecting to execute the
1420 program specified in `$SHELL'. If the command begins with a `-'
1421 character, the shell will be started as a login-shell.
1423 `defshell' is currently a synonym to the `shell' command.
1425 - Command: shelltitle title
1427 Set the title for all shells created during startup or by the C-a
1428 C-c command. *Note Naming Windows::, for details about what
1432 File: screen.info, Node: Term, Next: Window Types, Prev: Shell, Up: New Window
1437 - Command: term term
1439 In each window `screen' opens, it sets the `$TERM' variable to
1440 `screen' by default, unless no description for `screen' is
1441 installed in the local termcap or terminfo data base. In that
1442 case it pretends that the terminal emulator is `vt100'. This
1443 won't do much harm, as `screen' is VT100/ANSI compatible. The use
1444 of the `term' command is discouraged for non-default purpose.
1445 That is, one may want to specify special `$TERM' settings (e.g.
1446 vt100) for the next `screen rlogin othermachine' command. Use the
1447 command `screen -T vt100 rlogin othermachine' rather than setting
1448 and resetting the default.