Strict Standards: Declaration of action_plugin_loglog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/public/screen/lib/plugins/loglog/action.php on line 15

Strict Standards: Declaration of action_plugin_captcha::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/public/screen/lib/plugins/captcha/action.php on line 0
GNU screen [terminal]

Differences

This shows you the differences between two versions of the page.

terminal [2010/01/21 23:30]
asciiphil Links to special_terminal_capabilities changed to man:special_terminal_capabilities
terminal [2010/01/28 01:57] (current)
asciiphil
Line 1: Line 1:
-===== Terminal Manipulations =====+====== Terminal Manipulations ======
-==== Basics ====+===== Basics =====
-==== Extras ====+===== Extras =====
-screen is flexible about flow control.  Traditionally, some terminals do +''screen'' is flexible about flow control.  Traditionally, some terminals 
-flow control in-band, using ^S when they want to stop the flow data and ^Q +do flow control in-band, using ''^S'' when they want to stop the flow data 
-when they want it to resume.  On the other hand, some programs (such as +and ''^Q'' when they want it to resume.  On the other hand, some programs 
-emacs) use those keys for other purposes.  If flow control is turned on in +(such as ''emacs'') use those keys for other purposes.  If flow control is 
-screen, ^S will stop screen from sending anything more to your terminal +turned on in ''screen'', ''^S'' will stop ''screen'' from sending anything 
-and ^Q will resume.  Turning flow control off allows those characters to +more to your terminal and ''^Q'' will resume.  Turning flow control off 
-pass through to your programs.  The default setting is "auto", which +allows those characters to pass through to your programs.  The default 
-attempts to determine if flow control is needed or not.  screen is +setting is "auto", which attempts to determine if flow control is needed 
-generally pretty good at figuring this out.+or not.  ''screen'' is generally pretty good at figuring this out.
-screen can deal with multiple character sets and character encodings.  The +''screen'' can deal with multiple character sets and character encodings.  The 
-''encoding'' and ''defencoding'' commands can be used to set window+''[[commands:encoding]]'' and ''[[commands:defencoding]]'' commands can be used to set window
encodings or override the detected terminal encoding.  If the display's encodings or override the detected terminal encoding.  If the display's
-and window's encodings differ, screen will translate between the two.+and window's encodings differ, ''screen'' will translate between the two.
Characters not in the display's charset are represented by question marks. Characters not in the display's charset are represented by question marks.
-screen does its own encoding and only supports a handful of encodings.  As+''screen'' does its own encoding and only supports a handful of encodings.  As
of version 4.0.2, those are: C, eucJP, SJIS, eucKR, eucCN, Big5, KOI8-R, of version 4.0.2, those are: C, eucJP, SJIS, eucKR, eucCN, Big5, KOI8-R,
CP1251, UTF-8, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6, CP1251, UTF-8, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6,
ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-15, jis, and GBK. ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-15, jis, and GBK.
-[//This somehow ties in with the ''charset'' setting, but I don't+[//This somehow ties in with the ''[[commands:charset]]'' setting, but I don't
understand that one.  <PMG>//] understand that one.  <PMG>//]
You can alter various aspects of screen's use of termcap and terminfo, via You can alter various aspects of screen's use of termcap and terminfo, via
-the ''termcap'', ''terminfo'', and ''termcapinfo'' commands.  All three +the ''[[commands:termcap]]'', ''[[commands:terminfo]]'', and 
-have the same syntax. Using ''termcapinfo'' is recommended, since that +''[[commands:termcapinfo]]'' commands.  All three have the same syntax. 
-affects both termcap and terminfo settings.  Note that all three require +Using ''[[commands:termcapinfo]]'' is recommended, since that affects both 
-the use of termcap names; terminfo-style long names are not supported. +termcap and terminfo settings.  Note that all three require the use of 
-The most common use of these commands is to change how screen treats +termcap names; terminfo-style long names are not supported. The most 
-display terminals.  If you want to change a termcap setting for, say, +common use of these commands is to change how ''screen'' treats display 
-xterms, you can use the ''termcapinfo'' command to change the termcap +terminals.  If you want to change a termcap setting for, say, xterms, you 
-definition that screen uses for that terminal type.  This affects only +can use the ''[[commands:termcapinfo]]'' command to change the termcap 
-screen, and can be used to effect changes when you don't want to or can't +definition that ''screen'' uses for that terminal type.  This affects only 
-change the system terminal definitions.  There are also several [[man:special terminal capabilities]] that are screen-specific.  See the "Examples" section for+''screen'', and can be used to effect changes when you don't want to or 
-well, examples.  The other use is to change the terminal capbilities of +can't change the system terminal definitions.  There are also several 
-screen's virtual terminal.  This can be useful to alter how other programs +[[man:special terminal capabilities]] that are ''screen''-specific.  See 
-interact with screen, without having to edit screen's source code and +the "Examples" section below for specific examples.  The other use is to change 
-recompile.  [//This is ugly. I need to rewrite it to make it clearer. +the terminal capabilities of ''screen'''s virtual terminal.  This can be 
-<PMG>//]+useful to alter how other programs interact with ''screen'', without 
 +having to edit ''screen'''s source code and recompile.  [//This is ugly. 
 +I need to rewrite it to make it clearer. <PMG>//]
 +Some programs use ANSI escape sequences to print data; this was originally used in the days when serial terminals were common, and a terminal might have a printer directly attached to it.  Any sequence starting with ''<esc>[5i'' and ending with ''<esc>\'' would cause the data between the two escape sequences to be printed.  ''screen'' supports this behavior in two ways: if the display terminal has the ''po'' and ''pf'' termcap entries (indicating that it understands printing escapes), ''screen'' will pass any print requests through to the display terminal.  Alternately, you can use the ''[[commands:printcmd]]'' command to define a program to which ''screen'' will send any print jobs.
 +===== Keybindings =====
 +  * ''C-a C-b'' - (''[[commands:break]]'') Sends a break signal to the current window.
 +  * ''C-a B'' - (''[[commands:pow_break]]'') Closes and reopens the terminal and sends a break signal.
 +  * ''C-a f'' - (''[[commands:flow]]'') Toggle flow setting between on, off, and auto.
 +  * ''C-a q'' - (''[[commands:xon]]'') Sends an XON (^Q) to the current window.
 +  * ''C-a r'' - (''[[commands:wrap]]'') Toggle the current window's line-wrap setting.
 +  * ''C-a S'' - (''[[commands:xoff]]'') Sends an XOFF (^S) to the current window.
 +  * ''C-a Z'' - (''[[commands:reset]]'') Reset the window's terminal settings to its defaults.
 +  * ''C-a .'' - (''[[commands:dumptermcap]]'') Write out a .termcap file.
 +===== Commands =====
-==== Keybindings ====+  * ''[[commands:allpartial]]'' - Global command equivalent to setting ''[[commands:partial]]'' for all current windows. 
 +  * ''[[commands:altscreen]]'' - Enables "alternate screen" support (''ti'' and ''te'' termcap settings) for ''screen'' windows. 
 +  * ''[[commands:bce]]'' - Sets or toggle background-color-erase setting. 
 +  * ''[[commands:breaktype]]'' - Currently a synonym for ''[[commands:defbreaktype]]'' 
 +  * ''[[commands:c1]]'' - Sets or toggles c1 code processing. 
 +  * ''[[commands:charset]]'' - Change the current character set slot designation and charset mapping. 
 +  * ''[[commands:defbce]]'' - Same as ''[[commands:bce]]'', but sets the default setting for new windows. 
 +  * ''[[commands:defbreaktype]]'' - Sets the type of break signal sent via the ''[[commands:break]]'' or ''[[commands:pow_break]]'' command. 
 +  * ''[[commands:defc1]]'' - Same as ''[[commands:c1]]'', but sets the default setting for new windows. 
 +  * ''[[commands:defcharset]]'' - Same as ''[[commands:charset]]'', but sets the default setting for new windows. 
 +  * ''[[commands:defflow]]'' - Same as ''[[commands:flow]]'', but sets the default setting for new windows. 
 +  * ''[[commands:defgr]]'' - Same as ''[[commands:gr]]'', but sets the default setting for new windows. 
 +  * ''[[commands:defencoding]]'' - Same as ''[[commands:encoding]]'', but sets the default setting for new windows. 
 +  * ''[[commands:defnonblock]]'' - Same as ''[[commands:nonblock]]'', but sets the default setting for new displays. 
 +  * ''[[commands:defutf8]]'' - Same as ''[[commands:utf8]]'', but sets the default setting for new windows. 
 +  * ''[[commands:defwrap]]'' - Same as ''[[commands:wrap]]'', but sets the default setting for new windows. 
 +  * ''[[commands:dinfo]]'' - Shows what settings ''screen'' is using for the current display. 
 +  * ''[[commands:dumptermcap]]'' - Tells ''screen'' to create a .termcap file in its socket directory. 
 +  * ''[[commands:encoding]]'' - Sets the character encoding for the current window. 
 +  * ''[[commands:flow]]'' - Sets the current window's flow control mode. 
 +  * ''[[commands:gr]]'' - Sets or toggles GR charset switching. 
 +  * ''[[commands:nonblock]]'' - Sets or toggles ''screen'''s behavior when a display stops receiving characters. 
 +  * ''[[commands:partial]]'' - Sets whether ''screen'' should draw the entire window when switching windows. 
 +  * ''[[commands:printcmd]]'' - Shows or sets the command used for handling the ANSI print sequence ''ESC [ 5 i''. 
 +  * ''[[commands:reset]]'' - Resets the current window's virtual terminal settings to their default settings. 
 +  * ''[[commands:term]]'' - Changes the value of $TERM that screen passes to its windows' child processes. 
 +  * ''[[commands:termcap]]'', ''[[commands:terminfo]]'', and ''[[commands:termcapinfo]]'' - Tweak termcap and/or terminfo entries for either ''screen'''s interaction with the display terminal or for the virtual terminal presented to child programs. 
 +  * ''[[commands:utf8]]'' - Changes or toggles the encoding on the current window. 
 +  * ''[[commands:wrap]]'' - Sets or toggles the current window's line wrap setting. 
 +  * ''[[commands:xoff]]'' - Sends an XOFF (''^S'') to the current window. 
 +  * ''[[commands:xon]]'' - Sends an XON (''^Q'') to the current window. 
 +  * ''[[commands:zmodem]]'' - Sets ''screen'''s handling of zmodem communcations.
-  * ''C-a C-b'' - (''break'') Sends a break signal to the current window. +===== Examples =====
-  * ''C-a B'' - (''pow_break'') Closes and reopens the terminal and sends a break signal. +
-  * ''C-a f'' - (''flow'') Toggle flow setting between on, off, and auto. +
-  * ''C-a q'' - (''xon'') Sends an XON (^Q) to the current window. +
-  * ''C-a r'' - (''wrap'') Toggle the current window's line-wrap setting. +
-  * ''C-a S'' - (''xoff'') Sends an XOFF (^S) to the current window. +
-  * ''C-a W'' - (''width'') Toggle terminal between 80 and 132 columns. +
-  * ''C-a Z'' - (''reset'') Reset the window's terminal settings to its defaults. +
-  * ''C-a .'' - (''dumptermcap'') Write out a .termcap file.+
- +Upon being asked to print a block of text, save it to a file in the user's home directory:
-==== Commands ==== +
- +
-  * ''allpartial on|off'' - Global command equivalent to setting ''partial'' for all current windows.  Default is off. +
-  * ''altscreen on|off'' - Enables "alternate screen" support (''ti'' and ''te'' termcap settings) for screen windows.  Does not change existing windows.  Default is off. +
-  * ''bce [on|off]'' - Set or toggle background-color-erase setting.  "If ''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."  Most noticeable when your terminal's "default" background is different from the current background color, such as an xterm with a background image.  [//What's the default setting?  <PMG>//] +
-  * ''c1 [on|off]'' - Sets or toggles c1 code processing.  If on, characters with the high bit set will be treated as an ESC followed by the corresponding 7-bit character.  Default is off. +
-  * ''charset //set//'' - "Change the current character set slot designation and charset mapping.  The first four character of //set// are treated as charset designators while the fifth and sixth character must be in range 0 to 3 and set the GL/GR charset mapping.  On every position a '.' may be used to indicate that the corresponding charset/mapping should not be changed (//set// is padded to six characters internally by appending '.' chars).  New windows have ''BBBB02'' as default charset, unless an ''encoding'' command is active."  [//I don't really understand this.  It's obviously terminal charset munging, but I don't get the particulars--I just use UTF-8.  <PMG>//] +
-  * ''defbce on|off'' - Same as ''bce'', but sets the default setting for new windows. +
-  * ''defbreaktype [tcsendbreak|TIOCSBRK|TCSBRK]'' - Sets the type of break signal sent via the ''break'' or ''pow_break'' command.  Recommended settings are tcsendbreak and TIOCSBRK.  TCSBRK blocks the whole session, but may be the only way to get long breaks.  [//The man page is somewhat light on detail here.  Clarifications appreciated.  <PMG>//] +
-  * ''defc1 on|off'' - Same as ''c1'', but sets the default setting for new windows. +
-  * ''defcharset [//set//]'' - Same as ''charset'', but sets the default setting for new windows. +
-  * ''defflow on|off|auto [interrupt]'' - Same as ''flow'', but sets the default setting for new windows. +
-  * ''defgr on|off'' - Same as ''gr'', but sets the default setting for new windows. +
-  * ''defencoding //enc//'' - Same as ''encoding'', but sets the default setting for new windows. +
-  * ''defnonblock on|off|//numsecs//'' - Same as ''nonblock'', but sets the default setting for new displays. +
-  * ''defutf8 on|off'' - Same as ''utf8'', but sets the default setting for new windows. +
-  * ''defwrap on|off'' - Same as ''wrap'', but sets the default setting for new windows. +
-  * ''dinfo'' - Shows what settings screen is using for the current display.  As of screen 4.0.2 shows: display dimensions (columns, rows), encoding, whether the display is an xterm, whether the display supports color, and what charset is in use (one of iso2022 or altchar). +
-  * ''dumptermcap'' - Tells screen to create a .termcap file in its socket directory.  The file will contain all the termcap settings for screen's virtual terminal.  It's the same as the $TERMCAP environment variable that screen sets, but can be used for programs that don't understand $TERMCAP. +
-  * ''encoding //enc// [//enc//]'' - Set the character encoding for the current window.  The second argument sets the character encoding for the current display (and is rarely needed because screen can usually tell from its locale settings). +
-  * ''flow [on|off|auto]'' - Sets the current window's flow control mode. +
-  * ''gr [on|off]'' - Sets or toggles GR charset switching.  If on, when asked to display a character with the 8th bit set, screen uses the GR charset.  While necessary for some terminals, it is not compatible with 8-bit encodings (such as ISO8859-1) and dfaults to off. +
-  * ''nonblock [on|off|//numsecs//]'' - Sets or toggles screen's behavior when a display stops receiving characters.  When off, screen blocks on sending to the terminal; in some situations this can freeze the entire session.  When on, screen waits the specified timeout (''on'' is equivalent to 1 second); if the display still does not respond, screen stops sending to it until it recovers.  Default is off. +
-  * ''partial on|off'' - Sets whether screen should draw the entire window when switching windows.  If on, screen will blank the display and then draw only the line that the cursor is on.  Useful for slow terminals.  Default is off. +
-  * ''printcmd [//cmd//]'' - Shows or sets the command used for handling the ANSI print sequence ''ESC [ 5 i''.  If set, the text to be printed will be given to the command on standard input.  If unset, screen will use the ''po'' and ''pf'' terminal capabilities to tell the display terminal to print the text.  Default is unset. +
-  * ''reset'' - Resets the current window's virtual terminal settings to their default settings.  Only affects changes made by escape sequences (things like scrolling regions, color settings, etc.), not changes made by screen commands.  Effectively the same as power-cycling a physical terminal. +
-  * ''term //term//'' - Changes the value of $TERM that screen passes to its windows' child processes.  Useful when the default, 'screen', is unknown to a system.  Be careful to set it to a compatible value; 'vt100' is recommended. +
-  * ''[termcap|terminfo|termcapinfo] //term// //terminal-tweaks// [//window-tweaks//]'' - Tweaks termcap entries for either screen's interaction with the display terminal (//terminal-tweaks//) or for the virtual terminal presented to child programs (//window-tweaks//).  See "Extras" section for discussion. +
-  * ''utf8 [on|off [on|off]]'' - Changes or toggles the encoding on the current window.  The second parameter changes the UTF-8 setting of the display.  (The ''-U'' option is the preferred way to set that, however.)  [//Is this merely equivalent to ''encoding UTF-8''?  <PMG>//] +
-  * ''wrap [on|off]'' - Sets or toggles the current window's line wrap setting.  When on, characters displayed while the cursor is at the end of the line will cause the cursor to wrap to the next line.  When off, the cursor will stay at the end of the line, and the characters will overwrite each other.  Default is on. +
-  * ''zmodem [off|auto|catch|pass]'' - Sets screen's handling of zmodem communcations.  ''pass'' means that screen will not do anything to zmodem streams and will relay them to the display terminal.  ''catch'' means that screen will catch and intermret the streams itself; the display terminal will not see them.  ''auto'' attempts to determine what the correct setting is; it uses ''catch'' if the display is a tty and ''pass'' if the display is a pseudoterminal.  [//But what does ''off'' mean?  <PMG>//]  This is an experimental feature. +
-  * ''zmodem sendcmd|recvcmd [//string//]'' - Sets the templates used when in ''catch'' mode for the zmodem protocol. +
-==== Examples ==== +
- +
-Upon being asked to print a block of text, save it to a file in the user's ome directory:+
<code> <code>
Line 125: Line 126:
Add function key labels to the termcap entries for screen's virtual Add function key labels to the termcap entries for screen's virtual
terminal.  For purposes of modifying the windows' termcap entries, the terminal.  For purposes of modifying the windows' termcap entries, the
-term-type specified doesn't matter.+term-type specified doesn't matter:
<code> <code>
Line 131: Line 132:
</code> </code>
-Abuse screen's hardstatus support to put things in xterm titlebars. This +Abuse ''screen'''s hardstatus support to put things in xterm titlebars. 
-tells screen that xterms (and related terminals) have a hardstatus line +This tells ''screen'' that ''xterm''s (and related terminals) have a 
-(''hs'') and sets the escape sequences for entering (''ts'') and leaving +hardstatus line (''hs'') and sets the escape sequences for entering 
-(''fs'') the hardstatus to the sequences for entering and leaving the +(''ts'') and leaving (''fs'') the hardstatus to the sequences for entering 
-titlebar.  To go with that, uses ''defhstatus'' to set a default message +and leaving the titlebar.  To go with that, uses 
-and ''hardstatus off'' to tell screen not to use the hardstatus line for +''[[commands:defhstatus]]'' to set a default message and 
-screen messages:+''[[commands:hardstatus]] off'' to tell ''screen'' not to use the 
 +hardstatus line for ''screen'' messages:
<code> <code>
Line 145: Line 147:
</code> </code>
-(FAQ) Turns off alternate screen switching in xterms, so that text in screen +(FAQ) Turns off alternate screen switching in ''xterm''s, so that text in 
-will go into the xterm's scrollback buffer:+''screen'' will go into the ''xterm'''s scrollback buffer:
<code> <code>
Line 152: Line 154:
</code> </code>
-Uses screen's output translation capability (''XC'') to rot-13 all+Uses ''screen'''s output translation capability (''XC'') to rot-13 all
output.  (Will not work in UTF-8 mode, apparently.): output.  (Will not work in UTF-8 mode, apparently.):
Line 158: Line 160:
termcapinfo * XC=B%,an,AN,bo,BO,cp,CP,dq,DQ,er,ER,fs,FS,gt,GT,hu,HU,iv,IV,jw,JW,kx,KX,ly,LY,mz,MZ,na,NA,ob,OB,pc,PC,qd,QD,re,RE,sf,SF,tg,TG,uh,UH,vi,VI,wj,WJ,xk,XK,yl,YL,zm,ZM termcapinfo * XC=B%,an,AN,bo,BO,cp,CP,dq,DQ,er,ER,fs,FS,gt,GT,hu,HU,iv,IV,jw,JW,kx,KX,ly,LY,mz,MZ,na,NA,ob,OB,pc,PC,qd,QD,re,RE,sf,SF,tg,TG,uh,UH,vi,VI,wj,WJ,xk,XK,yl,YL,zm,ZM
</code> </code>
 +
 
terminal.1264116619.txt.gz · Last modified: 2010/01/21 23:30 by asciiphil
Recent changes RSS feed GNU General Public License Driven by DokuWiki