summaryrefslogtreecommitdiff
path: root/doc/screen.texinfo
diff options
context:
space:
mode:
Diffstat (limited to 'doc/screen.texinfo')
-rw-r--r--doc/screen.texinfo811
1 files changed, 614 insertions, 197 deletions
diff --git a/doc/screen.texinfo b/doc/screen.texinfo
index 3d9a40e..56576b1 100644
--- a/doc/screen.texinfo
+++ b/doc/screen.texinfo
@@ -3,10 +3,15 @@
@c vi:set wm=5
@setfilename screen.info
@settitle Screen User's Manual
+@dircategory General Commands
@finalout
@setchapternewpage odd
@c %**end of header
-@set version 3.9.0
+@set version 3.9.11
+
+@direntry
+* Screen: (screen). Full-screen window manager.
+@end direntry
@c For examples, use a literal escape in info.
@ifinfo
@@ -19,7 +24,7 @@
@ifinfo
This file documents the @code{Screen} virtual terminal manager.
-Copyright (c) 1993-1995 Free Software Foundation, Inc.
+Copyright (c) 1993-2002 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -47,11 +52,11 @@ by the Foundation.
@title Screen
@subtitle The virtual terminal manager
@subtitle for Version @value{version}
-@subtitle Jul 1999
+@subtitle Jan 2002
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1993-1995 Free Software Foundation, Inc.
+Copyright @copyright{} 1993-2002 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -171,7 +176,7 @@ name and its arguments to the window manager (specified in the $STY environment
variable) who will use it to create the new window. The above example would
start the @code{emacs} editor (editing @file{prog.c}) and switch to its window.
-If @file{/etc/utmp} is writable by @code{screen}, an appropriate record
+If @file{/var/run/utmp} is writable by @code{screen}, an appropriate record
will be written to this file for each window, and removed when the
window is closed. This is useful for working with @code{talk},
@code{script}, @code{shutdown}, @code{rsend}, @code{sccs} and other
@@ -300,7 +305,7 @@ Control}). Its use is discouraged.
@item -l
@itemx -ln
-Turn login mode on or off (for @file{/etc/utmp} updating). This option
+Turn login mode on or off (for @file{/var/run/utmp} updating). This option
is equivalent to the @code{deflogin} command (@pxref{Login}).
@item -ls [@var{match}]
@@ -332,11 +337,11 @@ whether @code{screen} is being called from within another @code{screen}
session or not. This flag has a special meaning in connection
with the @samp{-d} option:
@table @code
-@item -m -d
+@item -d -m
Start @code{screen} in @emph{detached} mode. This creates a new
session but doesn't attach to it. This is useful for system startup
scripts.
-@item -m -D
+@item -D -m
This also starts @code{screen} in @emph{detached} mode, but doesn't fork
a new process. The command exits if the session terminates.
@end table
@@ -352,7 +357,7 @@ more) sessions to resume and you should specify which one to choose.
In all other cases @samp{-q} has no effect.
@item -r [@var{pid.sessionname}]
-@itemx -r @var{sessionowner/[pid.sessionname]}
+@itemx -r @var{sessionowner}/[@var{pid.sessionname}]
Resume a detached @code{screen} session. No other options (except
combinations with @samp{-d} or @samp{-D}) may be specified, though
the session name
@@ -367,7 +372,9 @@ Resume the first appropriate detached @code{screen} session. If
successful, all other command-line options are ignored. If no detached
session exists, start a new session using the specified options, just as
if @samp{-R} had not been specified. This option is set by default if
-screen is run as a login-shell. For combinations with the
+screen is run as a login-shell (actually screen uses @samp{-xRR} in
+that case).
+For combinations with the
@samp{-D}/@samp{-d} option see there.
@item -s @var{program}
@@ -388,6 +395,11 @@ Set the title (name) for the default shell or specified program.
This option is equivalent to the @code{shelltitle} command
(@pxref{Shell}).
+@item -U
+Run screen in UTF-8 mode. This option tells screen that your terminal
+sends and understands UTF-8 encoded characters. It also sets the default
+encoding for new windows to @samp{utf8}.
+
@item -v
Print the version number.
@@ -401,6 +413,13 @@ See the @code{-r} flag for a description how to construct matches.
@item -x
Attach to a session which is already attached elsewhere (multi-display
mode).
+
+@item -X
+Send the specified command to a running screen session. You can use
+the @code{-d} or @code{-r} option to tell screen to look only for
+attached or detached screen sessions. Note that this command doesn't
+work if the session is password protected.
+
@end table
@node Customization, Commands, Invoking Screen, Top
@@ -413,10 +432,11 @@ to be executed at startup, or on the fly using the @code{colon} command.
@menu
* Startup Files:: The @file{.screenrc} file.
+* Source:: Read commands from a file.
* Colon:: Entering customization commands interactively.
@end menu
-@node Startup Files, Colon, , Customization
+@node Startup Files, Source, , Customization
@section The @file{.screenrc} file
@cindex .screenrc
@cindex screenrc
@@ -447,7 +467,23 @@ Two configuration files are shipped as examples with your screen
distribution: @file{etc/screenrc} and @file{etc/etcscreenrc}. They
contain a number of useful examples for various commands.
-@node Colon, , Startup Files, Customization
+@node Source, Colon, Startup Files, Customization
+@section Source
+@deffn Command source file
+(none)@*
+Read and execute commands from file @var{file}. Source commands
+may be nested to a maximum recursion level of ten. If @var{file}
+is not an absolute path and screen already processes a
+source command, the parent directory of the running source
+command file is used to search for the new command file before
+screen's current directory.
+
+Note that termcap/terminfo/termcapinfo commands only work
+at startup and reattach time, so they must be reached via
+the default screenrc files to have an effect.
+@end deffn
+
+@node Colon, , Source, Customization
@section Colon
Customization can also be done online, with this command:
@@ -505,11 +541,15 @@ The following table shows the default key bindings:
@table @asis
@item @kbd{C-a '}
-@itemx @kbd{C-a "}
(select)@*
Prompt for a window identifier and switch.
@xref{Selecting}.
+@item @kbd{C-a "}
+(windowlist -b)@*
+Present a list of all windows for selection.
+@xref{Selecting}.
+
@item @kbd{C-a 0@dots{}9, -}
(select 0@dots{}select 9, select -)@*
Switch to window number 0@dots{}9, or the blank window.
@@ -736,16 +776,16 @@ Copy and paste a previous (command) line. @xref{History}.
@item @kbd{C-a >}
(writebuf)@*
Write the paste buffer out to the screen-exchange file.
-@xref{Screen-Exchange}.
+@xref{Screen Exchange}.
@item @kbd{C-a <}
(readbuf)@*
Read the screen-exchange file into the paste buffer.
-@xref{Screen-Exchange}.
+@xref{Screen Exchange}.
@item @kbd{C-a =}
(removebuf)@*
-Delete the screen-exchange file. @xref{Screen-Exchange}.
+Delete the screen-exchange file. @xref{Screen Exchange}.
@item @kbd{C-a _}
(silence)@*
@@ -771,9 +811,9 @@ Allow other users in this session. @xref{Multiuser Session}.
Change a user's permissions. @xref{Multiuser Session}.
@item acldel @var{username}
Disallow other user in this session. @xref{Multiuser Session}.
-@item aclgrp @var{usrname [groupname]}
+@item aclgrp @var{usrname} [@var{groupname}]
Inherit permissions granted to a group leader. @xref{Multiuser Session}.
-@item aclumask @var{[users]+\-bits ...}
+@item aclumask [@var{users}]+/-@var{bits} ...
Predefine access to new windows. @xref{Umask}.
@item activity @var{message}
Set the activity notification message. @xref{Monitor}.
@@ -781,47 +821,51 @@ Set the activity notification message. @xref{Monitor}.
Synonym to @code{acladd}. @xref{Multiuser Session}.
@item allpartial @var{state}
Set all windows to partial refresh. @xref{Redisplay}.
-@item at @var{[ident][@kbd{#}@var{|}@kbd{*}@var{|}@kbd{%}] command [args]}
+@item at [@var{ident}][@kbd{#}@var{|}@kbd{*}@var{|}@kbd{%}] @var{command} [@var{args}]
Execute a command at other displays or windows. @xref{At}.
+@item attrcolor @var{attrib} [@var{attribute/color-modifier}]
+Map attributes to colors. @xref{Attrcolor}.
@item autodetach @var{state}
Automatically detach the session on SIGHUP. @xref{Detach}.
@item autonuke @var{state}
Enable a clear screen to discard unwritten output. @xref{Autonuke}.
-@item bell_msg @var{[message]}
+@item bce [@var{state}]
+Change background color erase. @xref{Character Processing}.
+@item bell_msg [@var{message}]
Set the bell notification message. @xref{Bell}.
-@item bind @var{key [command [args]]}
+@item bind [-c @var{class}] @var{key} [@var{command} [@var{args}]]
Bind a command to a key. @xref{Bind}.
-@item bindkey @var{[opts] [string [cmd args]]}
+@item bindkey [@var{opts}] [@var{string} [@var{cmd args}]]
Bind a string to a series of keystrokes. @xref{Bindkey}.
-@item break @var{[duration]}
+@item break [@var{duration}]
Send a break signal to the current window. @xref{Break}.
-@item breaktype @var{[tcsendbreak | TCSBRK | TIOCSBRK]}
+@item breaktype [@var{tcsendbreak} | @var{TCSBRK} | @var{TIOCSBRK}]
Specify how to generate breaks. @xref{Break}.
-@item bufferfile @var{[exchange-file]}
-Select a file for screen-exchange. @xref{Screen-Exchange}.
-@item c1 @var{[state]}
+@item bufferfile [@var{exchange-file}]
+Select a file for screen-exchange. @xref{Screen Exchange}.
+@item c1 [@var{state}]
Change c1 code processing. @xref{Character Processing}.
-@item caption @var{mode} @var{[string]}
+@item caption @var{mode} [@var{string}]
Change caption mode and string. @xref{Regions}.
@item chacl @var{usernames permbits list}
Synonym to @code{aclchg}. @xref{Multiuser Session}.
@item charset @var{set}
Change character set slot designation. @xref{Character Processing}.
-@item chdir @var{[directory]}
+@item chdir [@var{directory}]
Change the current directory for future windows. @xref{Chdir}.
@item clear
Clear the window screen. @xref{Clear}.
@item colon
Enter a @code{screen} command. @xref{Colon}.
-@item command
+@item command [-c @var{class}]
Simulate the screen escape key. @xref{Command Character}.
-@item compacthist @var{[state]}
+@item compacthist [@var{state}]
Selects compaction of trailing empty lines. @xref{Scrollback}.
-@item console @var{[state]}
+@item console [@var{state}]
Grab or ungrab console output. @xref{Console}.
@item copy
Enter copy mode. @xref{Copy}.
-@item copy_reg @var{[key]}
+@item copy_reg [@var{key}]
Removed. Use @code{paste} instead. @xref{Registers}.
@item crlf @var{state}
Select line break behavior for copying. @xref{Line Termination}.
@@ -829,22 +873,26 @@ Select line break behavior for copying. @xref{Line Termination}.
Suppress/allow debugging output. @xref{Debug}.
@item defautonuke @var{state}
Select default autonuke behavior. @xref{Autonuke}.
-@item defbreaktype @var{[tcsendbreak | TCSBRK | TIOCSBRK]}
+@item defbce @var{state}
+Select background color erase. @xref{Character Processing}.
+@item defbreaktype [@var{tcsendbreak} | @var{TCSBRK} | @var{TIOCSBRK}]
Specify the default for generating breaks. @xref{Break}.
@item defc1 @var{state}
Select default c1 processing behavior. @xref{Character Processing}.
-@item defcharset @var{[set]}
+@item defcharset [@var{set}]
Change defaul character set slot designation. @xref{Character Processing}.
+@item defencoding @var{enc}
+Select default window encoding. @xref{Character Processing}.
@item defescape @var{xy}
Set the default command and @code{meta} characters. @xref{Command Character}.
@item defflow @var{fstate}
Select default flow control behavior. @xref{Flow}.
@item defgr @var{state}
Select default GR processing behavior. @xref{Character Processing}.
-@item defhstatus @var{[status]}
+@item defhstatus [@var{status}]
Select default window hardstatus line. @xref{Hardstatus}.
-@item defkanji @var{wtype}
-Select default GR processing behavior. @xref{Character Processing}.
+@item deflog @var{state}
+Select default window logging behavior. @xref{Log}.
@item deflogin @var{state}
Select default utmp logging behavior. @xref{Login}.
@item defmode @var{mode}
@@ -861,56 +909,64 @@ Set the default program for new windows. @xref{Shell}.
Select default idle monitoring behavior. @xref{Silence}.
@item defslowpaste @var{msec}
Select the default inter-character timeout when pasting. @xref{Paste}.
+@item defutf8 @var{state}
+Select default character encoding. @xref{Character Processing}.
@item defwrap @var{state}
Set default line-wrapping behavior. @xref{Wrap}.
@item defwritelock @var{on|off|auto}
Set default writelock behavior. @xref{Multiuser Session}.
-@item defzombie @var{[keys]}
+@item defzombie [@var{keys}]
Keep dead windows. @xref{Zombie}.
-@item detach
+@item detach [-h]
Disconnect @code{screen} from the terminal. @xref{Detach}.
@item digraph
Enter digraph sequence. @xref{Digraph}.
+@item dinfo
+Display terminal information. @xref{Info}.
@item displays
List currently active user interfaces. @xref{Displays}.
@item dumptermcap
Write the window's termcap entry to a file. @xref{Dump Termcap}.
@item echo [-n] @var{message}
Display a message on startup. @xref{Startup}.
+@item encoding @var{enc} [@var{denc}]
+Set the encoding of a window. @xref{Character Processing}.
@item escape @var{xy}
Set the command and @code{meta} characters. @xref{Command Character}.
-@item exec @var{[[fdpat] command [args ...]]}
+@item eval @var{command1} [@var{command2} ...]
+Parse and execute each argument. @xref{Eval}.
+@item exec [[@var{fdpat}] @var{command} [@var{args} ...]]
Run a subprocess (filter). @xref{Exec}.
@item fit
Change window size to current display size. @xref{Window Size}.
-@item flow @var{[fstate]}
+@item flow [@var{fstate}]
Set flow control behavior. @xref{Flow}.
@item focus
Move focus to next region. @xref{Regions}.
-@item gr @var{[state]}
+@item gr [@var{state}]
Change GR charset processing. @xref{Character Processing}.
-@item hardcopy
+@item hardcopy [-h] [@var{file}]
Write out the contents of the current window. @xref{Hardcopy}.
@item hardcopy_append @var{state}
Append to hardcopy files. @xref{Hardcopy}.
@item hardcopydir @var{directory}
Place, where to dump hardcopy files. @xref{Hardcopy}.
-@item hardstatus @var{[state]}
+@item hardstatus [@var{state}]
Use the hardware status line. @xref{Hardware Status Line}.
-@item height @var{[lines]}
+@item height [@var{lines} [@var{cols}]]
Set display height. @xref{Window Size}.
-@item help
+@item help [-c @var{class}]
Display current key bindings. @xref{Help}.
@item history
Find previous command beginning @dots{}. @xref{History}.
@item hstatus @var{status}
Change the window's hardstatus line. @xref{Hardstatus}.
+@item ignorecase [@var{state}]
+Ignore character case in searches. @xref{Searching}.
@item info
-Display terminal settings. @xref{Info}.
-@item ins_reg @var{[key]}
+Display window settings. @xref{Info}.
+@item ins_reg [@var{key}]
Removed, use @code{paste} instead. @xref{Registers}.
-@item kanji @var{wtype [dtype]}
-Set the kanji type of a window. @xref{Character Processing}.
@item kill
Destroy the current window. @xref{Kill}.
@item lastmsg
@@ -919,13 +975,13 @@ Redisplay the last message. @xref{Last Message}.
Display licensing information. @xref{Startup}.
@item lockscreen
Lock the controlling terminal. @xref{Lock}.
-@item log @var{[state]}
+@item log [@var{state}]
Log all output in the current window. @xref{Log}.
@item logfile @var{filename}
Place where to collect logfiles. @xref{Log}.
-@item login @var{[state]}
-Log the window in @file{/etc/utmp}. @xref{Login}.
-@item logtstamp @var{[state]}
+@item login [@var{state}]
+Log the window in @file{/var/run/utmp}. @xref{Login}.
+@item logtstamp [@var{state}]
Configure logfile time-stamps. @xref{Log}.
@item mapdefault
Use only the default mapping table for the next keystroke. @xref{Bindkey Control}.
@@ -937,7 +993,7 @@ Set the inter-character timeout used for keymapping. @xref{Bindkey Control}.
Rebind keys in copy mode. @xref{Copy Mode Keys}.
@item meta
Insert the command character. @xref{Command Character}.
-@item monitor @var{[state]}
+@item monitor [@var{state}]
Monitor activity in window. @xref{Monitor}.
@item msgminwait @var{sec}
Set minimum message wait. @xref{Message Wait}.
@@ -951,9 +1007,9 @@ Use @code{nethack}-like error messages. @xref{Nethack}.
Switch to the next window. @xref{Selecting}.
@item nonblock @var{state}
Disable flow control to the current display. @xref{Nonblock}.
-@item number @var{[n]}
+@item number [@var{n}]
Change/display the current window's number. @xref{Number}.
-@item obuflimit @var{[limit]}
+@item obuflimit [@var{limit}]
Select output buffer limit. @xref{Obuflimit}.
@item only
Kill all other regions. @xref{Regions}.
@@ -961,55 +1017,59 @@ Kill all other regions. @xref{Regions}.
Switch to the window you were in last. @xref{Selecting}.
@item partial @var{state}
Set window to partial refresh. @xref{Redisplay}.
-@item password @var{[crypted_pw]}
+@item password [@var{crypted_pw}]
Set reattach password. @xref{Detach}.
-@item paste @var{[src_regs [dest_reg]]}
+@item paste [@var{src_regs} [@var{dest_reg}]]
Paste contents of paste buffer or registers somewhere. @xref{Paste}.
-@item pastefont @var{[state]}
+@item pastefont [@var{state}]
Include font information in the paste buffer. @xref{Paste}.
@item pow_break
Close and Reopen the window's terminal. @xref{Break}.
@item pow_detach
Detach and hang up. @xref{Power Detach}.
-@item pow_detach_msg @var{[message]}
+@item pow_detach_msg [@var{message}]
Set message displayed on @code{pow_detach}. @xref{Power Detach}.
@item prev
Switch to the previous window. @xref{Selecting}.
-@item printcmd @var{[cmd]}
+@item printcmd [@var{cmd}]
Set a command for VT100 printer port emulation. @xref{Printcmd}.
-@item process @var{[key]}
+@item process [@var{key}]
Treat a register as input to @code{screen}. @xref{Registers}.
@item quit
Kill all windows and exit. @xref{Quit}.
-@item readbuf
-Read the paste buffer from the screen-exchange file. @xref{Screen-Exchange}.
-@item readreg @var{[reg [file]]}
+@item readbuf [-e @var{encoding}] [@var{filename}]
+Read the paste buffer from the screen-exchange file. @xref{Screen Exchange}.
+@item readreg [-e @var{encoding}] [@var{reg} [@var{file}]]
Load a register from paste buffer or file. @xref{Registers}.
@item redisplay
Redisplay the current window. @xref{Redisplay}.
-@item register @var{key string}
+@item register [-e @var{encoding}] @var{key} @var{string}
Store a string to a register. @xref{Registers}.
@item remove
Kill current region. @xref{Regions}.
@item removebuf
-Delete the screen-exchange file. @xref{Screen-Exchange}.
+Delete the screen-exchange file. @xref{Screen Exchange}.
@item reset
Reset the terminal settings for the window. @xref{Reset}.
-@item screen @var{[opts] [n] [cmd [args]]}
+@item resize [(+/-)lines]
+Grow or shrink a region
+@item screen [@var{opts}] [@var{n}] [@var{cmd} [@var{args}]]
Create a new window. @xref{Screen Command}.
@item scrollback @var{num}
Set size of scrollback buffer. @xref{Scrollback}.
-@item select @var{[n]}
+@item select [@var{n}]
Switch to a specified window. @xref{Selecting}.
-@item sessionname @var{[name]}
+@item sessionname [@var{name}]
Name this session. @xref{Session Name}.
-@item setenv @var{[var [string]]}
+@item setenv [@var{var} [@var{string}]]
Set an environment variable for new windows. @xref{Setenv}.
+@item setsid @var{state}
+Controll process group creation for windows. @xref{Setsid}.
@item shell @var{command}
Set the default program for new windows. @xref{Shell}.
@item shelltitle @var{title}
Set the default name for new windows. @xref{Shell}.
-@item silence @var{[state|seconds]}
+@item silence [@var{state}|@var{seconds}]
Monitor a window for inactivity. @xref{Silence}.
@item silencewait @var{seconds}
Default timeout to trigger an inactivity notify. @xref{Silence}.
@@ -1017,7 +1077,9 @@ Default timeout to trigger an inactivity notify. @xref{Silence}.
Pause during startup. @xref{Startup}.
@item slowpaste @var{msec}
Slow down pasting in windows. @xref{Paste}.
-@item sorendition @var{[attr [color]]}
+@item source @var{file}
+Run commands from a file. @xref{Source}.
+@item sorendition [@var{attr} [@var{color}]]
Change text highlighting. @xref{Sorendition}.
@item split
Split region into two parts. @xref{Regions}.
@@ -1025,29 +1087,31 @@ Split region into two parts. @xref{Regions}.
Display copyright notice on startup. @xref{Startup}.
@item stuff @var{string}
Stuff a string in the input buffer of a window. @xref{Paste}.
-@item su @var{[username [password [password2]]]}
+@item su [@var{username} [@var{password} [@var{password2}]]]
Identify a user. @xref{Multiuser Session}.
@item suspend
Put session in background. @xref{Suspend}.
@item term @var{term}
Set @code{$TERM} for new windows. @xref{Term}.
-@item termcap @var{term terminal-tweaks [window-tweaks]}
+@item termcap @var{term} @var{terminal-tweaks} [@var{window-tweaks}]
Tweak termcap entries for best performance. @xref{Termcap Syntax}.
-@item terminfo @var{term terminal-tweaks [window-tweaks]}
+@item terminfo @var{term} @var{terminal-tweaks} [@var{window-tweaks}]
Ditto, for terminfo systems. @xref{Termcap Syntax}.
-@item termcapinfo @var{term terminal-tweaks [window-tweaks]}
+@item termcapinfo @var{term} @var{terminal-tweaks} [@var{window-tweaks}]
Ditto, for both systems. @xref{Termcap Syntax}.
-@item time
+@item time [@var{string}]
Display time and load average. @xref{Time}.
-@item title @var{[windowtitle]}
+@item title [@var{windowtitle}]
Set the name of the current window. @xref{Title Command}.
-@item umask @var{[users]+\-bits ...}
+@item umask [@var{users}]+/-@var{bits} ...
Synonym to @code{aclumask}. @xref{Umask}.
@item unsetenv @var{var}
Unset environment variable for new windows. @xref{Setenv}.
-@item vbell @var{[state]}
+@item utf8 [@var{state} [@var{dstate}]]
+Select character encoding of the current window. @xref{Character Processing}.
+@item vbell [@var{state}]
Use visual bell. @xref{Bell}.
-@item vbell_msg @var{[message]}
+@item vbell_msg [@var{message}]
Set vbell message. @xref{Bell}.
@item vbellwait @var{sec}
Set delay for vbell message. @xref{Bell}.
@@ -1055,21 +1119,23 @@ Set delay for vbell message. @xref{Bell}.
Display @code{screen} version. @xref{Version}.
@item wall @var{message}
Write a message to all displays. @xref{Multiuser Session}.
-@item width @var{[num]}
+@item width [@var{cols} [@var{lines}]]
Set the width of the window. @xref{Window Size}.
+@item windowlist [-b] | string [@var{string}] | title [@var{title}]
+Present a list of all windows for selection. @xref{Windowlist}.
@item windows
List active windows. @xref{Windows}.
-@item wrap @var{[state]}
+@item wrap [@var{state}]
Control line-wrap behavior. @xref{Wrap}.
-@item writebuf
-Write paste buffer to screen-exchange file. @xref{Screen-Exchange}.
-@item writelock @var{on|off|auto}
+@item writebuf [-e @var{encoding}] [@var{filename}]
+Write paste buffer to screen-exchange file. @xref{Screen Exchange}.
+@item writelock @var{on}|@var{off}|@var{auto}
Grant exclusive write permission. @xref{Multiuser Session}.
@item xoff
Send an XOFF character. @xref{XON/XOFF}.
@item xon
Send an XON character. @xref{XON/XOFF}.
-@item zombie @var{[keys]}
+@item zombie [@var{keys}]
Keep dead windows. @xref{Zombie}.
@end table
@@ -1313,6 +1379,7 @@ in that order by default (@pxref{New Window}).
* Next and Previous:: Forward or back one window.
* Other Window:: Switch back and forth between two windows.
* Select:: Switch to a window (and to one after @code{kill}).
+* Windowlist:: Present a list of all windows for selection.
@end menu
@node Next and Previous, Other Window, , Selecting
@@ -1346,13 +1413,12 @@ For instance, if you use the option @samp{-e]x},
this command becomes @kbd{]]} (@pxref{Command Character}).
@end deffn
-@node Select, , Other Window, Selecting
+@node Select, Windowlist, Other Window, Selecting
@section Select
@kindex 0@dots{}9
@kindex '
-@kindex "
@deffn Command select [n]
-(@kbd{C-a @var{n}}, @kbd{C-a '}, @kbd{C-a "})@*
+(@kbd{C-a @var{n}}, @kbd{C-a '})@*
Switch to the window with the number @var{n}.
If no window number is specified, you get prompted for an
identifier. This can be a window name (title) or a number.
@@ -1364,6 +1430,27 @@ compiled with a higher MAXWIN setting).
The special command @code{select -} switches to a blank window.
@end deffn
+@node Windowlist, , Select, Selecting
+@section Windowlist
+@kindex "
+@deffn Command windowlist [-b] | string [@var{string}] | title [@var{title}]
+(@kbd{C-a "})@*
+Display all windows in a table for visual window selection.
+The desired window can be selected via the standard
+movement keys (@pxref{Movement}) and activated via
+the return key. If the @code{-b} option is given, screen will
+switch to the blank window before presenting the list, so
+that the current window is also selectable.
+
+The table format can be changed with the string and title
+option, the title is displayed as table heading, while the
+lines are made by using the string setting. The default
+setting is @samp{Num Name%=Flags} for the title and
+@samp{%3n %t%=%f} for the lines. See the string escapes chapter
+(@pxref{String Escapes}) for more codes (e.g. color settings).
+
+@end deffn
+
@node Session Management, Regions, Selecting, Top
@chapter Session Management Commands
@@ -1400,8 +1487,10 @@ on by default.
(@kbd{C-a d}, @kbd{C-a C-d})@*
Detach the @code{screen} session (disconnect it from the terminal and
put it into the background). A detached @code{screen} can be resumed by
-invoking @code{screen} with the @code{-r} option. (@pxref{Invoking
-Screen})
+invoking @code{screen} with the @code{-r} option (@pxref{Invoking
+Screen}).
+The @code{-h} option tells screen to immediately close the connection
+to the terminal (@samp{hangup}).
@end deffn
@deffn Command password [crypted_pw]
@@ -1540,7 +1629,7 @@ Multi-user mode only.
@node Aclgrp, Displays, Acldel, Multiuser Session
@subsection Aclgrp
-@deffn Command aclgrp @var{username [groupname]}
+@deffn Command aclgrp @var{username} [@var{groupname}]
(none)@*
Creates groups of users that share common access rights. The
name of the group is the username of the group leader. Each
@@ -1564,8 +1653,8 @@ sessions.
@node Umask, Wall, Displays, Multiuser Session
@subsection aclumask
-@deffn Command aclumask @var{[[users]+bits |[users]-bits .... ]}
-@deffnx Command umask @var{[[users]+bits |[users]-bits .... ]}
+@deffn Command aclumask [@var{users}]+/-@var{bits} ...
+@deffnx Command umask [@var{users}]+/-@var{bits} ...
(none)@*
This specifies the access other users have to windows that
will be created by the caller of the command. @var{Users} may be no,
@@ -1612,7 +1701,7 @@ will be created with no writelocks.
@node Su, , Writelock, Multiuser Session
@subsection Su
-@deffn Command su @var{[username [password [password2]]]}
+@deffn Command su [@var{username} [@var{password} [@var{password2}]]]
(none)@*
Substitute the user of a display. The command prompts for
all parameters that are omitted. If passwords are specified
@@ -1630,7 +1719,7 @@ access to the commands available for user @samp{nobody}. These are
@node Session Name, Suspend, Multiuser Session, Session Management
@section Session Name
-@deffn Command sessionname @var{[name]}
+@deffn Command sessionname [@var{name}]
(none)@*
Rename the current session. Note that for @code{screen -list} the name
shows up with the process-id prepended. If the argument @var{name} is
@@ -1675,7 +1764,9 @@ which can contain different windows.
* Focus:: Change to the next region
* Only:: Delete all other regions
* Remove:: Delete the current region
+* Resize:: Grow or shrink a region
* Caption:: Control the window's caption
+* Fit:: Resize a window to fit the region
@end menu
@node Split, Focus, , Regions
@@ -1694,7 +1785,16 @@ window is displayed on the new region.
@deffn Command focus
(@kbd{C-a @key{Tab}})@*
Move the input focus to the next region. This is done in a cyclic
-way so that the top region is selected after the bottom one.
+way so that the top region is selected after the bottom one. If
+no subcommand is given it defaults to `down'. `up' cycles in the
+opposite order, `top' and `bottom' go to the top and bottom
+region respectively. Useful bindings are (j and k as in vi)
+@example
+bind j focus down
+bind k focus up
+bind t focus top
+bind b focus bottom
+@end example
@end deffn
@node Only, Remove, Focus, Regions
@@ -1705,7 +1805,7 @@ way so that the top region is selected after the bottom one.
Kill all regions but the current one.
@end deffn
-@node Remove, Caption, Only, Regions
+@node Remove, Resize, Only, Regions
@section Remove
@kindex X
@deffn Command remove
@@ -1713,7 +1813,23 @@ Kill all regions but the current one.
Kill the current region. This is a no-op if there is only one region.
@end deffn
-@node Caption, , Remove, Regions
+@node Resize, Caption, Remove, Regions
+@section Resize
+@deffn Command resize [(+/-)@var{lines}]
+(none)@*
+Resize the current region. The space will be removed from or added to
+the region below or if there's not enough space from the region above.
+@example
+resize +N increase current region height by N
+resize -N decrease current region height by N
+resize N set current region height to N
+resize = make all windows equally high
+resize max maximize current region height
+resize min minimize current region height
+@end example
+@end deffn
+
+@node Caption, Fit, Resize, Regions
@section Caption
@deffn Command caption @code{always}|@code{splitonly} [string]
@deffnx Command caption @code{string} [string]
@@ -1726,13 +1842,23 @@ even if only one window is displayed. The default
is @samp{splitonly}.
The second form changes the text used for the caption. You can use
-all string escapes (@xref{String Escapes}). @code{Screen} uses
+all string escapes (@pxref{String Escapes}). @code{Screen} uses
a default of @samp{%3n %t}.
You can mix both forms by providing the string as an additional
argument.
@end deffn
+@node Fit, , Caption, Regions
+@section Fit
+@kindex F
+@deffn Command fit
+(@kbd{C-a F})@*
+Change the window size to the size of the current region. This
+command is needed because screen doesn't adapt the window size
+automatically if the window is displayed more than once.
+@end deffn
+
@node Window Settings, Virtual Terminal, Regions, Top
@chapter Window Settings
@@ -1744,7 +1870,7 @@ terminal emulation itself.
* Naming Windows:: Control the name of the window
* Console:: See the host's console messages
* Kill:: Destroy an unwanted window
-* Login:: Control @file{/etc/utmp} logging
+* Login:: Control @file{/var/run/utmp} logging
* Mode:: Control the file mode of the pty
* Monitor:: Watch for activity in a window
* Windows:: List the active windows
@@ -1908,7 +2034,7 @@ current window's title to @samp{(unknown)} (C-a u).
@node Console, Kill, Naming Windows, Window Settings
@section Console
-@deffn Command console @var{[state]}
+@deffn Command console [@var{state}]
(none)@*
Grabs or un-grabs the machines console output to a window. When the argument
is omitted the current state is displayed.
@@ -1953,7 +2079,7 @@ compile time (@pxref{Installation}). Both commands are only present when
@kindex L
@deffn Command login [state]
(@kbd{C-a L})@*
-Adds or removes the entry in @file{/etc/utmp} for the current window.
+Adds or removes the entry in @file{/var/run/utmp} for the current window.
This controls whether or not the window is @dfn{logged in}. In addition
to this toggle, it is convenient to have ``log in'' and ``log out''
keys. For instance, @code{bind I login on} and @code{bind O
@@ -1968,7 +2094,7 @@ login off} will map these keys to be @kbd{C-a I} and @kbd{C-a O}
The mode of each newly allocated pseudo-tty is set to @var{mode}.
@var{mode} is an octal number as used by chmod(1). Defaults to 0622 for
windows which are logged in, 0600 for others (e.g. when @code{-ln} was
-specified for creation. @pxref{Screen Command}).
+specified for creation, @pxref{Screen Command}).
@end deffn
@node Monitor, Windows, Mode, Window Settings
@@ -2120,8 +2246,14 @@ ESC P (A) Device Control String
Outputs a string directly to the host
terminal without interpretation.
ESC _ (A) Application Program Command (Hardstatus)
-ESC ] (A) Operating System Command (Hardstatus, xterm
+ESC ] 0 ; string ^G (A) Operating System Command (Hardstatus, xterm
title hack)
+ESC ] 83 ; cmd ^G (A) Execute screen command. This only works if
+ multi-user support is compiled into screen.
+ The pseudo-user ":window:" is used to check
+ the access control list. Use "addacl :window:
+ -rwx #?" to create a user with no rights and
+ allow only the needed commands.
Control-N (A) Lock Shift G1 (SO)
Control-O (A) Lock Shift G0 (SI)
ESC n (A) Lock Shift G2
@@ -2142,6 +2274,7 @@ ESC [ Pn K Erase in Line
Pn = None or 0 From Cursor to End of Line
1 From Beginning of Line to Cursor
2 Entire Line
+ESC [ Pn X Erase character
ESC [ Pn A Cursor Up
ESC [ Pn B Cursor Down
ESC [ Pn C Cursor Right
@@ -2174,8 +2307,8 @@ ESC [ Ps ;...; Ps m Select Graphic Rendition
37 (A) Foreground White
39 (A) Foreground Default
40 (A) Background Black
- ... ...
- 49 (A) Background Default
+ ... ...
+ 49 (A) Background Default
ESC [ Pn g Tab Clear
Pn = None or 0 Clear Tab at Current Position
3 Clear All Tabs
@@ -2199,7 +2332,9 @@ ESC [ Ps ;...; Ps l Reset Mode
?5 (V) Reverse Video
?6 (V) @samp{Origin} Mode
?7 (V) @samp{Wrap} Mode
+ ?9 X10 mouse tracking
?25 (V) Visible Cursor
+ ?1000 (V) VT200 mouse tracking
ESC [ 5 i (A) Start relay to printer (ANSI Media Copy)
ESC [ 4 i (A) Stop relay to printer (ANSI Media Copy)
ESC [ 8 ; Ph ; Pw t Resize the window to @samp{Ph} lines and
@@ -2227,7 +2362,7 @@ Because the sequences generated by a keypress can
change after a reattach from a different terminal type, it is
possible to bind commands to the termcap name of the keys.
@code{Screen} will insert the correct binding after each
-reattach. @xref{Bindkey} for further details on the syntax and examples.
+reattach. See @ref{Bindkey} for further details on the syntax and examples.
Here is the table of the default key bindings. (A) means that the
command is executed if the keyboard is switched into application
@@ -2255,9 +2390,8 @@ Function key 7 k7 stuff \033[18~
Function key 8 k8 stuff \033[19~
Function key 9 k9 stuff \033[20~
Function key 10 k; stuff \033[21~
-Function key 11 F1 stuff \033[22~
-Function key 12 F2 stuff \033[23~
-Backspace kb stuff \010
+Function key 11 F1 stuff \033[23~
+Function key 12 F2 stuff \033[24~
Home kh stuff \033[1~
End kH stuff \033[4~
Insert kI stuff \033[2~
@@ -2391,7 +2525,7 @@ window: the cursor position in the form @samp{(@var{column},@var{row})}
starting with @samp{(1,1)}, the terminal width and height plus the size
of the scrollback buffer in lines, like in @samp{(80,24)+50},
the current state of window XON/XOFF flow control is shown like this
-(see also @xref{Flow Control}):
+(@pxref{Flow Control}):
@example
+flow automatic flow control, currently on.
-flow automatic flow control, currently off.
@@ -2412,6 +2546,7 @@ The currently active
character set (@samp{G0}, @samp{G1}, @samp{G2}, or @samp{G3}), and in
square brackets the terminal character sets that are currently
designated as @samp{G0} through @samp{G3}.
+If the window is in UTF-8 mode, the string @samp{UTF-8} is shown instead.
Additional modes depending on the type of the window are displayed at
the end of the status line (@pxref{Window Types}).
@@ -2421,6 +2556,12 @@ the info line is started with a string identifying the current state.
For system information use @code{time}.
@end deffn
+@deffn Command dinfo
+(none)@*
+Show what screen thinks about your terminal. Useful if you want to know
+why features like color or the alternate charset don't work.
+@end deffn
+
@node Redisplay, Wrap, Info, Virtual Terminal
@section Redisplay
@@ -2485,28 +2626,24 @@ an application.
@node Window Size, Character Processing, Reset, Virtual Terminal
@section Window Size
@kindex W
-@deffn Command width [num]
+@deffn Command width [@code{-w}|@code{-d}] [cols [lines]]
(@kbd{C-a W})@*
Toggle the window width between 80 and 132 columns, or set it to
-@var{num} columns if an argument is specified. This requires a
+@var{cols} columns if an argument is specified. This requires a
capable terminal and the termcap entries @samp{Z0} and @samp{Z1}. See
the @code{termcap} command (@pxref{Termcap}), for more information.
+You can also specify a height if you want to
+change both values. The @code{-w} option tells screen to leave
+the display size unchanged and just set the window size,
+@code{-d} vice versa.
@end deffn
-@deffn Command height @var{[lines]}
+@deffn Command height [@code{-w}|@code{-d}] [lines [cols]]
(none)@*
Set the display height to a specified number of lines. When no
argument is given it toggles between 24 and 42 lines display.
@end deffn
-@kindex F
-@deffn Command fit
-(@kbd{C-a F})@*
-Change the window size to the size of the current region. This
-command is needed because screen doesn't adapt the window size
-automatically if the window is displayed more than once.
-@end deffn
-
@node Character Processing, ,Window Size, Virtual Terminal
@section Character Processing
@@ -2530,16 +2667,34 @@ default (see also @samp{defgr}) is not to process GR switching because
otherwise the ISO88591 charset would not work.
@end deffn
-@deffn Command kanji wtype [dtype]
+@deffn Command bce [state]
(none)@*
-Tell screen how to process kanji input/output. @var{wtype} and
-@var{dtype} must be one of the strings @samp{jis}, @samp{euc} or
-@samp{sjis}. The first argument sets the kanji type of the current
-window. Each window can emulate a different type. The optional second
-parameter tells screen how to write the kanji codes to the
-connected terminal. The preferred method of setting the display type
-is to use the @samp{KJ} termcap entry. @xref{Special Capabilities}.
-See also @samp{defkanji}, which changes the default setting of a new
+Change background-color-erase setting. If @samp{bce} is set to
+on, all characters cleared by an erase/insert/scroll/clear
+operation will be displayed in the current background color.
+Otherwise the default background color is used.
+@end deffn
+
+@deffn Command encoding enc [denc]
+(none)@*
+Tell screen how to interpret the input/output. The first argument
+sets the encoding of the current window.
+Each window can emulate a different encoding. The optional second
+parameter overwrites the encoding of the connected terminal.
+It should never be needed as screen uses the locale setting to detect
+the encoding.
+There is also a way to select a terminal encoding depending on
+the terminal type by using the @samp{KJ} termcap entry. @xref{Special Capabilities}.
+
+Supported encodings are
+@code{eucJP}, @code{SJIS}, @code{eucKR},
+@code{eucCN}, @code{Big5}, @code{KOI8-R}, @code{CP1251},
+@code{UTF-8}, @code{ISO8859-2}, @code{ISO8859-3},
+@code{ISO8859-4}, @code{ISO8859-5}, @code{ISO8859-6},
+@code{ISO8859-7}, @code{ISO8859-8}, @code{ISO8859-9},
+@code{ISO8859-10}, @code{ISO8859-15}, @code{jis}.
+
+See also @samp{defencoding}, which changes the default setting of a new
window.
@end deffn
@@ -2553,9 +2708,22 @@ charset mapping. On every position a @samp{.} may be used to indicate
that the corresponding charset/mapping should not be changed
(@var{set} is padded to six characters internally by appending
@samp{.} chars). New windows have @samp{BBBB02} as default
-charset, unless a @samp{kanji} command is active.
+charset, unless a @samp{encoding} command is active.
-The current setting can be viewed with the @xref{Info} command.
+The current setting can be viewed with the @ref{Info} command.
+@end deffn
+
+@deffn Command utf8 [state [dstate]]
+(none)@*
+Change the encoding used in the current window. If utf8 is enabled, the
+strings sent to the window will be UTF-8 encoded and vice versa.
+Omitting the
+parameter toggles the setting. If a second parameter is given, the
+display's
+encoding is also changed (this should rather be done with screen's
+@samp{-U} option).
+See also @samp{defutf8}, which changes the default setting of a new
+window.
@end deffn
@deffn Command defc1 state
@@ -2570,10 +2738,17 @@ Same as the @samp{gr} command except that the default setting for
new windows is changed. Initial setting is @samp{off}.
@end deffn
-@deffn Command defkanji wtype
+@deffn Command defbce state
+(none)@*
+Same as the @samp{bce} command except that the default setting for
+new windows is changed. Initial setting is @samp{off}.
+@end deffn
+
+@deffn Command defencoding enc
(none)@*
-Same as the @samp{kanji} command except that the default setting for
-new windows is changed. Initial setting is @samp{off}, i.e. @samp{jis}.
+Same as the @samp{encoding} command except that the default setting for
+new windows is changed. Initial setting is the encoding taken from the
+terminal.
@end deffn
@deffn Command defcharset [set]
@@ -2582,6 +2757,13 @@ new windows is changed. Shows current default if called without
argument.
@end deffn
+@deffn Command defutf8 state
+(none)@*
+Same as the @samp{utf8} command except that the default setting for new
+windows is changed. Initial setting is @code{on} if screen was started
+with @samp{-U}, otherwise @code{off}.
+@end deffn
+
@node Copy and Paste, Subprocess Execution, Virtual Terminal, Top
@chapter Copy and Paste
@cindex copy and paste
@@ -2594,7 +2776,7 @@ systems.
* Copy:: Copy from scrollback to buffer
* Paste:: Paste from buffer into window
* Registers:: Longer-term storage
-* Screen-Exchange:: Sharing data between screen users
+* Screen Exchange:: Sharing data between screen users
* History:: Recalling previous input
@end menu
@@ -2756,6 +2938,12 @@ digits @kbd{0@dots{}9}) which is taken as a repeat count. Example:
@noindent
@kbd{C-r} @code{emacs} style reverse i-search.
+@deffn Command ignorecase [state]
+(none)@*
+Tell screen to ignore the case of caracters in searches. Default is
+@code{off}.
+@end deffn
+
@node Specials, , Searching, Copy
@subsection Specials
@@ -2800,7 +2988,7 @@ the contents of the paste buffer will not be overwritten, but appended to.
@noindent
@kbd{>} sets the (second) mark and writes the contents of the paste buffer
to the screen-exchange file (@file{/tmp/screen-exchange} per default)
-once copy-mode is finished. @xref{Screen-Exchange}.@*
+once copy-mode is finished. @xref{Screen Exchange}.@*
This example demonstrates how to dump the
whole scrollback buffer to that file: @*@kbd{C-a [ g SPACE G $ >}.
@@ -2863,13 +3051,14 @@ amounts of text.
@code{defslowpaste} specifies the default for new windows.
@end deffn
-@deffn Command readreg [register [filename]]
+@deffn Command readreg [-e encoding] [register [filename]]
(none)@*
Does one of two things, dependent on number of arguments: with zero or one
arguments it it duplicates the paste buffer contents into the register specified
or entered at the prompt. With two arguments it reads the contents of the named
file into the register, just as @code{readbuf} reads the screen-exchange file
into the paste buffer.
+You can tell screen the encoding of the file via the @code{-e} option.
The following example will paste the system's password file into
the screen window (using register p, where a copy remains):
@@ -2879,7 +3068,7 @@ C-a : paste p
@end example
@end deffn
-@node Registers, Screen-Exchange, Paste, Copy and Paste
+@node Registers, Screen Exchange, Paste, Copy and Paste
@section Registers
@deffn Command copy_reg [key]
@@ -2900,9 +3089,10 @@ register name. The text is parsed as if it had been typed in from the user's
keyboard. This command can be used to bind multiple actions to a single key.
@end deffn
-@deffn Command register key string
+@deffn Command register [-e encoding] key string
(none)@*
Save the specified @var{string} to the register @var{key}.
+The encoding of the string can be specified via the @code{-e} option.
@end deffn
@deffn Command stuff string
@@ -2910,14 +3100,14 @@ Save the specified @var{string} to the register @var{key}.
Stuff the string @var{string} in the input buffer of the current window.
This is like the @code{paste} command, but with much less overhead.
You cannot paste large buffers with the @code{stuff} command. It is most
-useful for key bindings. @xref{Bindkey}
+useful for key bindings. @xref{Bindkey}.
@end deffn
-@node Screen-Exchange, History, Registers, Copy and Paste
-@section Screen-Exchange
+@node Screen Exchange, History, Registers, Copy and Paste
+@section Screen Exchange
-@deffn Command bufferfile [exchange-file]
+@deffn Command bufferfile [@var{exchange-file}]
(none)@*
Change the filename used for reading and writing with the paste buffer.
If the @var{exchange-file} parameter is omitted, @code{screen} reverts
@@ -2933,9 +3123,11 @@ C-a : bufferfile
@end deffn
@kindex <
-@deffn Command readbuf
+@deffn Command readbuf [-e @var{encoding}] [@var{filename}]
(@kbd{C-a <})@*
-Reads the contents of the current screen-exchange file into the paste buffer.
+Reads the contents of the specified file into the paste buffer.
+You can tell screen the encoding of the file via the @code{-e} option.
+If no file is specified, the screen-exchange filename is used.
@end deffn
@kindex =
@@ -2945,15 +3137,19 @@ Unlinks the screen-exchange file.
@end deffn
@kindex >
-@deffn Command writebuf
+@deffn Command writebuf [-e @var{encoding}] [@var{filename}]
(@kbd{C-a >})@*
-Writes the contents of the paste buffer to a public accessible
-screen-exchange file. This is thought of as a primitive means of
-communication between @code{screen} users on the same host. See also
+Writes the contents of the paste buffer to the specified file, or the
+public accessible screen-exchange file if no filename is given.
+This is thought of as a primitive means of
+communication between @code{screen} users on the same host.
+If an encoding is specified the paste buffer is recoded on the fly to
+match the encoding.
+See also
@kbd{C-a @key{ESC}} (@pxref{Copy}).
@end deffn
-@node History, , Screen-Exchange, Copy and Paste
+@node History, , Screen Exchange, Copy and Paste
@section History
@kindex @{
@@ -2982,7 +3178,7 @@ Use with care!
@node Exec, Using Exec, , Subprocess Execution
@section Exec
-@deffn Command exec @var{[[fdpat] newcommand [args ... ]]}
+@deffn Command exec [[@var{fdpat}] @var{newcommand} [@var{args} ... ]]
(none)@*
Run a unix subprocess (specified by an executable path @var{newcommand} and
its optional arguments) in the current window. The flow of data between
@@ -3095,7 +3291,7 @@ preferences.
@node Bind, Bind Examples, , Key Binding
@section The @code{bind} command
-@deffn Command bind key [command [args]]
+@deffn Command bind [-c class] key [command [args]]
(none)@*
Bind a command to a key. The @var{key} argument is either a single
character, a two-character sequence of the form @samp{^x} (meaning
@@ -3106,6 +3302,11 @@ quoted, if you like. If no further argument is given, any previously
established binding for this key is removed. The @var{command}
argument can be any command (@pxref{Command Index}).
+If a command class is specified via the @code{-c} option, the
+key is bound for the specified class. Use the @code{command}
+command to activate a class. Command classes can be used
+to create multiple command keys or multi-character bindings.
+
By default, most suitable commands are bound to one or more keys
(@pxref{Default Key Bindings}; for instance, the command to create a
new window is bound to @kbd{C-c} and @kbd{c}. The @code{bind} command
@@ -3132,6 +3333,22 @@ available as @kbd{C-a space}), bind @kbd{C-f} to the command
@samp{root} in slot #9, with a superuser shell and a scrollback buffer
of 1000 lines.
+@example
+bind -c demo1 0 select 10
+bind -c demo1 1 select 11
+bind -c demo1 2 select 12
+bindkey "^B" command -c demo1
+@end example
+makes @kbd{C-b 0} select window 10, @kbd{C-b 1} window 11, etc.
+
+@example
+bind -c demo2 0 select 10
+bind -c demo2 1 select 11
+bind -c demo2 2 select 12
+bind - command -c demo2
+@end example
+makes @kbd{C-a - 0} select window 10, @kbd{C-a - 1} window 11, etc.
+
@node Command Character, Help, Bind Examples, Key Binding
@cindex escape character
@cindex command character
@@ -3169,11 +3386,12 @@ window. The keystroke for this command is the second parameter to the
@code{escape} .screenrc directive.
@end deffn
-@deffn Command command
+@deffn Command command [-c @var{class}]
(none)@*
This command has the same effect as typing the screen escape character
(@kbd{C-a}). It is probably only useful for key bindings.
-@xref{Bindkey}.
+If the @samp{-c} option is given, select the specified command class.
+@xref{Bind}, @xref{Bindkey}.
@end deffn
@node Help, Bindkey, Command Character, Key Binding
@@ -3186,19 +3404,21 @@ pages list all the internal commands followed by their bindings.
Subsequent pages will display the custom commands, one command per key.
Press space when you're done reading each page, or return to exit early.
All other characters are ignored.
+If the @samp{-c} option is given, display all bound commands for the
+specified command class.
@xref{Default Key Bindings}.
@end deffn
@node Bindkey, Bindkey Examples, Help, Key Binding
@section Bindkey
-@deffn Command bindkey @var{[opts] [string [cmd args]]}
+@deffn Command bindkey [@var{opts}] [@var{string} [@var{cmd} @var{args}]]
(none)@*
This command manages screen's input translation tables. Every
entry in one of the tables tells screen how to react if a certain
sequence of characters is encountered. There are three tables:
one that should contain actions programmed by the user, one for
the default actions used for terminal emulation and one for
-screen's copy mode to do cursor movement. @xref{Input Translation}
+screen's copy mode to do cursor movement. See @ref{Input Translation}
for a list of default key bindings.
If the @samp{-d}
@@ -3686,8 +3906,8 @@ Set the output buffer limit. See the @samp{obuflimit} command
@item KJ
(str)@*
-Set the kanji type of the terminal. Valid strings are @samp{jis},
-@samp{euc} and @samp{sjis}.
+Set the encoding of the terminal. See the @samp{encoding} command
+(@pxref{Character Processing}) for valid encodings.
@item AF
(str)@*
@@ -3708,6 +3928,14 @@ Does understand ANSI set default fg/bg color (@samp{\E[39m / \E[49m}).
Describe a translation of characters to strings depending on the
current font. (@pxref{Character Translation}).
+@item XT
+(bool)@*
+Terminal understands special xterm sequences (OSC, mouse tracking).
+
+@item C8
+(bool)@*
+Terminal needs bold to display high-intensity colors (e.g. Eterm).
+
@item TF
(bool)@*
Add missing capabilities to the termcap/info entry. (Set by default).
@@ -3732,7 +3960,7 @@ want to have a terminal type dependent setting.
@node Obuflimit, Character Translation, Autonuke, Termcap
@section Obuflimit
-@deffn Command obuflimit @var{[limit]}
+@deffn Command obuflimit [@var{limit}]
(none)@*
If the output buffer contains more bytes than the specified limit, no
more data will be read from the windows. The default value is 256. If
@@ -3875,10 +4103,10 @@ the type even if the terminal supports a hardstatus line.
The third form specifies the contents of the hardstatus line.
@code{%h} is used as default string, i.e. the stored hardstatus of the
-current window (settable via @samp{\E]0;^G} or @samp{\E_\\}) is
+current window (settable via @samp{ESC]0;^G} or @samp{ESC_\\}) is
displayed.
You can customize this to any string you like including
-string escapes (@xref{String Escapes}).
+string escapes (@pxref{String Escapes}).
If you leave
out the argument @var{string}, the current string is displayed.
@@ -3925,12 +4153,15 @@ This section describes the commands for keeping a record of your session.
@section hardcopy
@kindex h
@kindex C-h
-@deffn Command hardcopy
+@deffn Command hardcopy [-h] [@var{file}]
(@kbd{C-a h}, @kbd{C-a C-h})@*
-Writes out the current display contents to the file @file{hardcopy.@var{n}}
-in the window's default directory, where @var{n} is the number of the
+Writes out the currently displayed image to the file @var{file}, or,
+if no filename is specified, to @file{hardcopy.@var{n}}
+in the default directory, where @var{n} is the number of the
current window. This either appends or overwrites the file if it
exists, as determined by the @code{hardcopy_append} command.
+If the option @code{-h} is specified, dump also the
+contents of the scrollback buffer.
@end deffn
@deffn Command hardcopy_append state
@@ -3949,6 +4180,13 @@ directory.
@node Log, , Hardcopy, Logging
@section log
+
+@deffn Command deflog state
+(none)@*
+Same as the @code{log} command except that the default setting for new
+windows is changed. Initial setting is `off'.
+@end deffn
+
@kindex H
@deffn Command log [state]
(@kbd{C-a H})@*
@@ -4048,6 +4286,9 @@ categories.
* Zombie:: Keep dead windows.
* Printcmd:: Set command for VT100 printer port emulation.
* Sorendition:: Change the text highlighting method.
+* Attrcolor:: Map attributes to colors.
+* Setsid:: Change process group management
+* Eval:: Parse and execute arguments
@end menu
@node At, Break, , Miscellaneous
@@ -4170,7 +4411,7 @@ may be helpful when multiple displays show the same window.
@node Number, Silence, Nonblock, Miscellaneous
@section Number
@kindex N
-@deffn Command number @var{[n]}
+@deffn Command number [@var{n}]
(@kbd{C-a N})@*
Change the current window's number. If the given number @var{n} is already
used by another window, both windows exchange their numbers. If no argument is
@@ -4179,7 +4420,7 @@ specified, the current window number (and title) is shown.
@node Silence, Time, Number, Miscellaneous
@section Silence
-@deffn Command silence @var{[state|sec]}
+@deffn Command silence [@var{state}|@var{sec}]
(none)@*
Toggles silence monitoring of windows. When silence is turned on and an
affected window is switched into the background, you will receive the
@@ -4205,11 +4446,13 @@ before displaying a message. Default is 30 seconds.
@section Time
@kindex t
@kindex C-t
-@deffn Command time
+@deffn Command time [@var{string}]
(@kbd{C-a t}, @kbd{C-a C-t})@*
Uses the message line to display the time of day, the host name, and the
load averages over 1, 5, and 15 minutes (if this is available on your
system). For window-specific information use @code{info} (@pxref{Info}).
+If a @var{string} is specified, it changes the format of the time report
+like it is described in the string escapes chapter (@pxref{String Escapes}). Screen uses a default of @samp{%c:%s %M %d %H%? %l%?}.
@end deffn
@node Verbose, Version, Time, Miscellaneous
@@ -4230,8 +4473,8 @@ Display the version and modification date in the message line.
@node Zombie, Printcmd, Version, Miscellaneous
@section Zombie
-@deffn Command zombie @var{[keys]}
-@deffnx Command defzombie @var{[keys]}
+@deffn Command zombie [@var{keys}]
+@deffnx Command defzombie [@var{keys}]
(none)@*
Per default windows are removed from the window list as soon as the
windows process (e.g. shell) exits. When a string of two keys is
@@ -4250,7 +4493,7 @@ setting, the commands @code{zombie} and @code{defzombie} are synonymous.
@node Printcmd, Sorendition, Zombie, Miscellaneous
@section Printcmd
-@deffn Command printcmd @var{[cmd]}
+@deffn Command printcmd [@var{cmd}]
(none)@*
If @var{cmd} is not an empty string, screen will not use the terminal
capabilities @code{po/pf} for printing if it detects an ansi print
@@ -4264,19 +4507,64 @@ Warning: Be careful with this command! If other user have write
access to your terminal, they will be able to fire off print commands.
@end deffn
-@node Sorendition, , Printcmd, Miscellaneous
+@node Sorendition, Attrcolor, Printcmd, Miscellaneous
@section Sorendition
-@deffn Command sorendition @var{[attr [color]]}
+@deffn Command sorendition [@var{attr} [@var{color}]]
(none)@*
Change the way screen does highlighting for text marking and printing
messages.
-@var{attr} is a hexadecimal number and describes the attributes
-(inverse, underline, ...) the text will get. @var{color}
-is a 2 digit number and changes the
-foreground/background of the highlighted text.
-Some knowledge of screen's internal character representation is
-needed to make the characters appear in the desired way. The default
-is currently @samp{10 99} (standout, default colors).
+See the chapter
+about string escapes (@pxref{String Escapes}) for the syntax of
+the modifiers. The default is currently @samp{=s dd} (standout,
+default colors).
+@end deffn
+
+@node Attrcolor, Setsid, Sorendition, Miscellaneous
+@section Attrcolor
+@deffn Command attrcolor @var{attrib} [@var{attribute/color-modifier}]
+(none)@*
+This command can be used to highlight attributes by changing the color of
+the text. If the attribute
+@var{attrib}
+is in use, the specified attribute/color modifier is also applied. If no
+modifier is given, the current one is deleted. See the chapter
+about string escapes (@pxref{String Escapes}) for the syntax of
+the modifier. Screen understands two pseudo-attributes, @code{i}
+stands for high-intensity foreground color and @code{I} for
+high-intensity background color.
+
+@noindent
+Examples:
+@table @code
+@item attrcolor b "R"
+Change the color to bright red if bold text is to be printed.
+@item attrcolor u "-u b"
+Use blue text instead of underline.
+@item attrcolor b "I"
+Use bright colors for bold text. Most terminal emulators do this
+already.
+@item attrcolor i "+b"
+Make bright colored text also bold.
+@end table
+@end deffn
+
+@node Setsid, Eval, Attrcolor, Miscellaneous
+@section Setsid
+@deffn Command setsid state
+(none)@*
+Normally screen uses different sessions and process groups for
+the windows. If setsid is turned @code{off}, this is not done
+anymore and all windows will be in the same process group as the
+screen backend process. This also breaks job-control, so be careful.
+The default is @code{on}, of course. This command is probably useful
+only in rare circumstances.
+@end deffn
+
+@node Eval, , Setsid, Miscellaneous
+@section Eval
+@deffn Command eval @var{command1} [@var{command2} ...]
+(none)@*
+Parses and executes each argument as seperate command.
@end deffn
@node String Escapes, Environment, Miscellaneous, Top
@@ -4304,8 +4592,14 @@ current time @code{HH:MM} in 12h format
day number
@item D
weekday name
+@item f
+flags of the window
+@item F
+sets %? to true if the window has the focus
@item h
hardstatus of the window
+@item H
+hostname of the system
@item l
current load of the system
@item m
@@ -4321,7 +4615,9 @@ window title
@item u
all other users on this window
@item w
-all window numbers and names
+all window numbers and names. With @code{-} quailifier: up to the current
+window; with @code{+} qualifier: starting with the window after the current
+one.
@item W
all window numbers and names except the current one
@item y
@@ -4333,11 +4629,125 @@ the part to the next @code{%?} is displayed only if an escape expands
to an nonempty string
@item :
else part of @code{%?}
+@item =
+pad the string to the display's width (like TeX's hfill). If a
+number is specified, pad to the percentage of the window's width.
+A @code{0} qualifier tells screen to treat the number as absolute position.
+You can specify to pad relative to the last absolute pad position
+by adding a @code{+} qualifier or to pad relative to the right margin
+by using @code{-}. The padding truncates the string if the specified
+position lies before the current position. Add the @code{L} qualifier
+to change this.
+@item <
+same as @code{%=} but just do truncation, do not fill with spaces
+@item >
+mark the current text position for the next truncation. When
+screen needs to do truncation, it tries to do it in a way that
+the marked position gets moved to the specified percentage of
+the output area. (The area starts from the last absolute pad
+position and ends with the position specified by the truncation
+operator.) The @code{L} qualifier tells screen to mark the truncated
+parts with @samp{...}.
+@item @{
+attribute/color modifier string terminated by the next @code{@}}
@end table
The @code{c} and @code{C} escape may be qualified with a @code{0} to
make screen use
-zero instead of space as fill character. The @code{n} escape understands
-a length qualifier (e.g. @code{%3n}).
+zero instead of space as fill character.
+The @code{n} and
+@code{=} escapes understand
+a length qualifier (e.g. @code{%3n}), @code{D} and @code{M} can be
+prefixed with @code{L} to generate long names, @code{w} and
+@code{W} also show the window flags if @code{L} is given.
+
+An attribute/color modifier is is used to change the attributes or the
+color settings. Its format
+is @samp{[attribute modifier] [color description]}. The attribute modifier
+must be prefixed by a change type indicator if it can be confused with
+a color desciption. The following change types are known:
+@table @code
+@item +
+add the specified set to the current attributes
+@item -
+remove the set from the current attributes
+@item !
+invert the set in the current attributes
+@item =
+change the current attributes to the specified set
+@end table
+The attribute set can either be specified as a hexadecimal number or
+a combination of the following letters:
+@table @code
+@item u
+underline
+@item b
+bold
+@item r
+reverse
+@item s
+standout
+@item B
+blinking
+@end table
+Colors are coded either as a hexadecimal number or two letters specifying
+the desired background and foreground color (in that order). The following
+colors are known:
+@table @code
+@item k
+black
+@item r
+red
+@item g
+green
+@item y
+yellow
+@item b
+blue
+@item m
+magenta
+@item c
+cyan
+@item w
+white
+@item d
+default color
+@item .
+leave color unchanged
+@end table
+The capitalized versions of the letter specify bright colors. You can also
+use the pseudo-color @samp{i} to set just the brightness and leave the color
+unchanged.
+
+A one digit/letter color description is treated as foreground or
+background color dependant on the current attributes: if reverse mode is
+set, the background color is changed instead of the foreground color.
+If you don't like this, prefix the color with a @samp{.}. If you want
+the same behaviour for two-letter color descriptions, also prefix them
+with a @samp{.}.
+
+As a special case, @samp{%@{-@}} restores the attributes and colors that
+were set before the last change was made (i.e. pops one level of the
+color-change stack).
+
+@noindent
+Examples:
+@table @samp
+@item G
+set color to bright green
+@item +b r
+use bold red
+@item = yd
+clear all attributes, write in default color on yellow background.
+@item %-Lw%@{= BW@}%50>%n%f* %t%@{-@}%+Lw%<
+The available windows centered at the current win dow and truncated to
+the available width. The current window is displayed white on blue.
+This can be used with @samp{hardstatus alwayslastline}.
+@item %?%F%@{.R.@}%?%3n %t%? [%h]%?
+The window number and title and the window's hardstatus, if one is set.
+Also use a red background if this is the active focus.
+Useful for @samp{caption string}.
+@end table
+
@node Environment, Files, String Escapes, Top
@chapter Environment Variables
@@ -4387,6 +4797,9 @@ Terminal name.
@item TERMCAP
Terminal description.
+
+@item WINDOW
+Window number of a window (at creation time).
@end table
@node Files, Credits, Environment, Top
@@ -4411,7 +4824,10 @@ Read in after /etc/screenrc
@item @code{$SCREENDIR}/S-@var{login}
@item /var/run/screen/S-@var{login}
-Socket directories (default for Debian GNU/Linux)
+Socket directories (default)
+
+@item /usr/tmp/screens/S-@var{login}
+Alternate socket directories.
@item @var{socket directory}/.termcap
Written by the @code{dumptermcap} command
@@ -4430,7 +4846,7 @@ Output log files created by the log command
@itemx /etc/termcap
Terminal capability databases
-@item /etc/utmp
+@item /var/run/utmp
Login records
@item @code{$LOCKPRG}
@@ -4477,7 +4893,9 @@ Contributors @*
Christopher Williams (cgw@@unt.edu),
Matt Mosley (mattm@@access.digex.net),
Gregory Neil Shapiro (gshapiro@@wpi.WPI.EDU),
- Jason Merrill (jason@@jarthur.Claremont.EDU).
+ Jason Merrill (jason@@jarthur.Claremont.EDU),
+ Johannes Zellner (johannes@@zellner.org),
+ Pablo Averbuj (pablo@@averbuj.com).
@end example
@noindent
@@ -4533,10 +4951,10 @@ capabilities to @code{$TERMCAP} may not have any effects.
in order to be able to
correctly change the owner of the tty device file for each window.
Special permission may also be required to write the file
-@file{/etc/utmp}.
+@file{/var/run/utmp}.
@item
-Entries in @file{/etc/utmp} are not removed when @code{screen} is killed
+Entries in @file{/var/run/utmp} are not removed when @code{screen} is killed
with SIGKILL. This will cause some programs (like "w" or "rwho") to
advertise that a user is logged on who really isn't.
@@ -4617,9 +5035,8 @@ does not include these features of 4.2 and 4.3 BSD UNIX.
@cindex socket directory
The socket directory defaults either to @file{$HOME/.screen} or simply to
-@file{/tmp/screens} or preferably to @file{/usr/local/screens} chosen at
-compile-time. (@file{/var/run/screen} for Debian GNU/Linux).
-If @code{screen} is installed
+@file{/tmp/screens} or preferably to @file{/var/run/screen} chosen at
+compile-time. If @code{screen} is installed
setuid root, then the administrator should compile screen with an
adequate (not NFS mounted) @code{SOCKDIR}. If @code{screen} is not
running setuid-root, the user can specify any mode 700 directory in the