XWSH(1G) XWSH(1G)
xwsh - creates and specifies a window shell
xwsh [ -anchor anchor-point ] [ -autofork ] [ -bg color ]
[ -bindkey2dcs ] [ -bold color ] [ -boldfont font ]
[ -bolditalicfont font ] [ -cc string ] [ -console ]
[ -cursorbg color ] [ -cursorfg color ] [ -display display ]
[ -e cmd [ args ] ] [ -fg color ] [ -fn font ] [ -geom geometrystring
] [ -help ] [ -highlightURL ] [ -hold ] [ -holdonerror ]
[ -ibm ] [ -iconic ] [ -icontitle icon-title ] [ -italicfont font ]
[ -keymap file ] [ -log file ] [ -max COLSxLINES ]
[ -min COLSxLINES ] [ -name instance-name ] [ -nobindkey2dcs ]
[ -nokeyboard ] [ -nomenu ] [ -noscrollbar ] [ -nosend ]
[ -redirect device ] [ -selbg color ] [ -selfg color ]
[ -sl retainlimit ] [ -title title ] [ -transient window ] [ -ut ]
[ -vb ] [ -vt100 ] [ -xrm resource-string ]
xwsh is a terminal emulation program that runs a login shell (or other
UNIX command) within its own window on the screen.
Command line options are available to specify the font, window size,
title, and position when xwsh starts up. The command line options are:
-anchor anchor-point
Set the anchor point for window size changes. When the window
size is changed from the size menu, xwsh needs to define which
corner of the window is anchored down during the size change.
xwsh attempts to keep the anchor point constant across the size
change. Legal values are northwest, north, northeast, east,
southeast, south, southwest, west, center, and static.
-autofork
Make xwsh run in the background.
-bg color
Set the background (page) color.
-bindkey2dcs
Enable key bindings to device control strings and internal xwsh
functions. Unless explicitly enabled, xwsh will no longer bind
keys to control strings (see DCS codes 101 and 103 below).
-bold color
Set the bold text color. This color is used when ansi SGR bold
is done.
-boldfont font
Define the bold font. The bold font is used when the ansi SGR
bold is done. Note that both a color and a font can be chosen
and that both will apply.
Page 1
XWSH(1G) XWSH(1G)
-bolditalicfont font
Define the bold italic font. When both ansi SGR bold and ansi
SGR italic are done this font is used.
-cc string
Change the character class table using string. String is
composed of zero or more comma separated "range:value"
substrings. range can be either a single number or a pair of "-"
separated numbers. When a single number is specified a single
characters class is set to the value. When a range is specified,
all the characters inclusively in the range are have their class
set to value. The character class is used by the double click
logic to determine what is similar and what is different.
Characters that share the same character class are considered
similar. The initial character class table contains the
following values:
32, 1, 1, 1, 1, 1, 1, 1,
1, 32, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1,
32, 33, 34, 35, 36, 37, 38, 39,
40, 41, 42, 43, 44, 45, 46, 47,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 58, 59, 60, 61, 62, 63,
64, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 91, 92, 93, 94, 48,
96, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 123, 124, 125, 126, 1,
128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143,
144, 145, 146, 147, 148, 149, 150, 151,
152, 153, 154, 155, 156, 157, 158, 159,
160, 161, 162, 163, 164, 165, 166, 167,
168, 169, 170, 171, 172, 173, 174, 175,
176, 177, 178, 179, 180, 181, 182, 183,
184, 185, 186, 187, 188, 189, 190, 191,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 223,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 48,
48, 48, 48, 48, 48, 48, 48, 247,
248, 48, 48, 48, 48, 48, 48, 48
Page 2
XWSH(1G) XWSH(1G)
-console
Make this xwsh the console. All this does is issue the TIOCCONS
ioctl in the child process on the pty. If it succeeds then the
xwsh will manage console output and input. If it fails, a
warning will appear in the first line of the xwsh.
-cursorbg color
Set the cursor background color.
-cursorfg color
Set the cursor foreground color. This the color that the
character under the cursor (if any) will be rendered in.
-display display
Define which display xwsh will display to.
-e cmd [args]
Execute a child program within the xwsh window, using the
specified command line arguments, rather than the default login
shell (determined from the password database). The -e option
will pass all trailing arguments to xwsh , to be executed as a
command line. Thus, if -e is given, it must appear as the final
xwsh option. In order to determine what state the tty should
have xwsh will examine the file $HOME/.wshttymode. This file
should be created using the output of stty -g. If the file
doesn't exist, or if the file contains improper information, xwsh
will use the system defaults for the tty state.
-fg color
Set the foreground (text) color.
-fn font
Set the primary rendition font. Note that different fonts can be
used for bold, italic and bold-italic renditions. See ansi SGR
below in the section on escape sequences. If a proportional
width font is chosen xwsh will still function as a terminal
emulator. The characters will be positioned based on their
natural widths, but the right margin will remain at the number of
columns being emulated (usually 80). This means that a line may
wrap before or after the right edge of the window is reached.
-geometry geometry-string
This option provides xwsh with an X compatible geometry
specification. If the geometry-string includes x and y
coordinates, then xwsh will automatically set the anchor point
(see the -anchor option for more information). This option will
not be propagated via a clone.
-help Print out a concise description of the command line options to
xwsh.
Page 3
XWSH(1G) XWSH(1G)
-hold Hold xwsh after its child program has exited, to permit viewing
its output. See -holdonerror for a more useful variation.
Keyboard input is no longer accepted once the child process that
xwsh is managing exits.
-highlightURL
Cause xwsh to highlight any URLs it detects in the stream of text
that it prints. See below for more details about XWsh and URLs.
This option is off by default.
-holdonerror
Inform xwsh that it should hold the display when the command
exits, if and only if the command exits with an error. Keyboard
input is no longer accepted once the child process that xwsh is
managing exits.
-ibm Tell xwsh to use rebind the keyboard to look as much like an IBM
rt keyboard as possible. This is the default mode.
-iconic Start up xwsh in an iconic form.
-icontitle string
Define the icon title for the xwsh window. The icon title can be
set separately from the window title using this option.
-italicfont font
Define the italic font. The italic font is used when the ansi
SGR italic is done.
-keymap file
Define a key map file for the xwsh window. See the section below
on key maps.
-log file
Have xwsh log the output of the child program into file.
-max COLSxLINES
Set the maximum window size, as the number of columns wide by the
number of lines high. There is no default maximum window size.
Note that the x is literal. For example, 80x40 would limit xwsh
to a maximum of 80 columns and 40 rows.
-min COLSxLINES
Set the minimum window size, as the number of columns wide by the
number of lines high. There is no default minimum window size.
Note that the x is literal. For example, 80x10 would limit xwsh
to a minimum of 80 columns and 10 rows.
-name instance-name
Provide a unique name for an xwsh window. This name becomes the
instance name of the specific xwsh, with the class name always
being "XWsh".
Page 4
XWSH(1G) XWSH(1G)
-nobindkey2dcs
Disallow binding of keys to device control strings (see DCS codes
101 and 103 below).
-nokeyboard
Run xwsh without a keyboard. Any data received from the main
keyboard is ignored. Use this when you need an output only xwsh.
-nomenu Disable the menu. No menu will appear, thus disabling font and
size changes for xwsh.
-noscrollbar
Disable the scroll bar in xwsh. No scroll bar will be made
visible, though more than a windows full of data may be retained
with the -sl option. By using local key bindings the data may
still be viewed.
-nosend Disable the middle-pointer send feature.
-redirect device
Provide an alternate (redirect) output device. When xwsh
receives a "toggle-redirect" command from a locally bound
function key, the output of the xwsh is redirected to the given
device.
-selbg color
Set the selection background (page) color.
-selfg color
Set the selection foreground color. This the color that
characters in the selection will be rendered in.
-sl retainlimit
set the number of lines of text retained by xwsh. Using the
scroll bar one can view all of the lines retained by xwsh. New
lines entered by xwsh are retained up to the limit specified by
lines; after this, lines are deleted from the ``top'' of the list
of lines. Setting lines to zero eliminates the scroll bar. The
default value is 1000.
-title title
Set the title of the window to title.
-transient window
Make xwsh a transient for window. If window is "root" then xwsh
becomes a transient for the root window on the given display.
-ut Tell xwsh not to write records into the system log files
/etc/utmp and /etc/wtmp.
Page 5
XWSH(1G) XWSH(1G)
-vb Tell xwsh to use a visual bell whenever it receives octal 7. The
default behavior is to ask X to ring the bell.
-vt100 Make xwsh run as a vt100 terminal emulator. Normally, xwsh
emulates the "iris-ansi" terminal, which is almost a vt100. This
switch makes a few minor changes to the emulation for a majority
of vt100 compatibility. Most everything is supported, with the
exception of double width and double height characters. The -fn,
-boldfont, -italicfont and -bolditalicfont options (and
resources) are ignored when -vt100 mode is enabled. To change
the particular font use the decAsciiFont and decGraphicsFont
resources (see -xrm, below).
When in alternate key pad mode (ESC =), the special function keys
F9-F12 on the IRIS keyboard emulate the keys PF1-PF4 on a VT100
keyboard. (ESC P, ESC Q, ESC R, ESC S).
-xrm resource-string
Define a resource value in the command line. See the resource
section below for a list of xwsh's available resources.
When you log on to a remote system, use vt100 if no iris-ansi entry
exists in the terminfo or termcap file. You probably need to set the
xwsh terminal size to 80,24 and run xwsh with the -vt100 option for this
to work properly.
When you use vi, emacs, or other visual-mode programs remotely, you must
size the terminal window to match the terminal size referenced by the
current $TERM environment variable. Some systems (including IRIX)
support the ability to query the terminal size, and if this is the case,
xwsh should work correctly regardless of its size.
When in alternate key pad mode (ESC =), the special function keys F9-F12
on the IRIS keyboard emulate the keys PF1-PF4 on a VT100 keyboard. (ESC
P, ESC Q, ESC R, ESC S).
xwsh supports limited key binding through the bindkey(1) command. See
the bindkey man page for details.
To provide for highly customized keyboard xwsh supports key mapping. Key
mapping provides a two tier mapping system. At the bottom level is the
keysym rebinding supported by Xlib (see XRebindKeysym(3X) for details).
The top level bindings are independent of the Xlib bindings, but take
precedence over them. The keyboard input translation first checks the
input keysym (as returned by XLookupString(3X)) against the top level
bindings. If a binding for the keysym exists and the modifiers match or
are ignored (by using the any modifier) then the top level binding is
used. The top level binding will either generate a string whose output
is sent to the underlying shell or the binding will invoke a function
internal to xwsh. If no top level binding exists then the string
Page 6
XWSH(1G) XWSH(1G)
returned from XLookupString(3X) is used.
When the keyboard is in IBM rt mode three modifications to the above
process are done. First, at start up the keyboard is rebound using
XRebindKeysym to closely match the IBM rt definitions (this is what
previous IRIX releases used). Second, when a key press occurs the
modifier state is prioritized such that no chording of modifiers is
allowed (Alt is highest priority, Control is next, Shift is lowest).
Finally, if the decoded keysym has no top level binding and its the Pause
key and the user has pressed the Control modifier then a break function
is performed on the tty.
Here is the syntax for the key mappings:
keysym(modifiers): send(string);
keysym(modifiers): func(string);
keysym(modifiers): rebind(string);
keysym(modifiers): unbind();
keysym is a standard keysym as defined by X. modifiers can be one or
more of the standard modifiers (Shift, Control, Alt) or any. If any is
used then the modifier state is unimportant during input checking.
string can contain C style backslash sequences, such as \n, in order to
embed control characters.
If the target for the mapping is send then the given string will be sent
when the key (with its modifiers) is pressed. This mapping applies to
the top level bindings.
If the target for the mapping is func then the given string will be used
to apply an internal function to xwsh. The following internal functions
are currently supported: send, up-line, down-line, up-page, down-page,
home, end, push, pop and toggle-redirect.
If the target for the mapping is rebind then the given string will be
sent when the key (with its modifiers) is pressed. This mapping applies
to the bottom level bindings and just invokes an XRebindKeysym when the
key mapping is applied.
If the target for the mapping is unbind then when the key map is applied
any top level binding for the key (with its modifiers) is removed. Using
send and unbind one can setup bindings that are temporarily ``pushed''
and ``popped''.
Key mappings are specified in one of two ways. A command like option
exists which defines a key map file whose contents are lines in the
format described above. Resources also exist to define particular key
maps. See the section on string resources for more information. A quick
examination of /usr/lib/X11/app-defaults/XWsh may also help.
Page 7
XWSH(1G) XWSH(1G)
MENU OPERATION
xwsh has a popup menu which will be activated when the right pointer
button is pressed over the text area. Pop is used to raise the window to
the top of the window hierarchy, subject to any window manager
constraints. Send is used to send the primary selection (XA_PRIMARY in
ICCC terms) to the tty as if the user had typed it in. Size is a roll
off menu item that allows the user to resize the xwsh window to specific
commonly used sizes. Note that resizing a window is subject to window
manager constraints. The Font menu item will bring up a font browser
dialog (see below on how to use it). Finally, Clone is a roll off menu
item that is used to make a visually identical (within certain limits)
copy of the xwsh. The copy will have a new command, new tty, etc. It
will attempt to have the same font, same colors and other attributes.
The font browser is used to pick a new font for use as xwsh's primary
rendition font (there is currently no way to pick other rendition fonts).
The font browser displays three scrolling lists: the font list, the style
list and the size list. The font list lists in alphabetical order the
various fonts. A names shown are composed of the foundry, family,
registry and encoding (fonts that are iso8859-1 do not show the registry
and encoding). For example, terminal (bitstream) is an iso8859-1 font
from bitstream whose family is terminal. Also, terminal (bitstream, dec,
dectech) is another terminal font from bitstream, but it is not an
iso8859-1 font, rather it is of the Idec registry and dectech encoding.
The style list shows names (alphabetically sorted) which are composed of
the weight, slant, slant width, and adstyle. The size list shows the
available sizes for the given fonts (numerically sorted).
Any time a selection is made in one or more of the lists, items which are
not possible given the choices made are grayed out. Selections are made
by clicking on a particular item in the list. Selections can be unmade
by clicking on a selected item again. For instance, not all fonts have
15 pixel sizes. In this case when a font is chosen that has no 15 pixel
size, the 15 entry in the size list will be grayed out. The same kind of
constraints are applied to the style and font list.
There are two control buttons that determine which fonts are shown and
how they are presented. The Show proportional width fonts button when
enabled will add in proportional width fonts to the font, style and size
lists. By default this is disabled, because proportional width fonts are
often confusing to the user (see the discussion above, where -fn is
described). The Show size in points button when enabled changes the
units in the size list from pixels to points. The values used for the
points to pixel scaling are computed by using information provided by the
display that xwsh is connected to.
After all three lists have an item selected, the font browser will
display a sample from the font below the Show size in points button as
well as the full X name of the font in the name field editor. Using this
sample the user can preview the font choice, and if it is not desirable,
Page 8
XWSH(1G) XWSH(1G)
keep browsing other fonts. Once a choice has been made the user can
accept it by pressing the Accept button which changes the primary
rendition font of xwsh and dismisses the font browser. Pressing the
Apply button changes the font but leaves the browser up in case another
change is desired. The Cancel button dismisses the browser with no
further font changes (it will not undo a Apply).
xwsh optionally supports highlighting URLs that it detects in the stream
of output text. Having URLs highlighted makes them much easier to notice
when reading through lots of text. This feature is particularly useful
when coupled with the ability to pass URLs directly to a web browser
(more on this below). The disadvantage to this feature is that there is
a slight performance penalty in detecting the URLs and thus text will
print slower. Generally this is not noticeable. Also, the code that
detects URLs can be fooled under some (rare) circumstances. For more
information on passing URLs directly from xwsh to a Web browser, see the
section on Selections (below).
You can enable this behavior with the -highlightURL command line switch
or the boolean highlightURL X resource. By default this option is off.
xwsh supports manipulation of the primary selection (XA_PRIMARY in ICCC).
The left pointer button is the select button. The middle pointer button
is a shortcut for the Send menu entry (this can be disabled with the
-nosend command line option or the noQuickSend resource). Pressing left
pointer will begin a new selection. As the pointer is moved the
selection will be swept out. Finally, when the left pointer is released
a selection is made. If the area swept out is not empty then xwsh will
assert ownership of the primary selection. If xwsh cannot get ownership
of the primary selection then the selection will immediately disappear
from the display.
By rapidly clicking the left pointer button twice (down, up, down) the
user will enter double click mode. In double click mode moving the
pointer will select words. What constitutes a word is determined by the
charClass resource. By rapidly clicking the left pointer button three
times (down, up, down, up, down) the user will enter triple click mode.
In triple click mode entire lines are selected as the pointer is moved.
Holding down the Control key while pressing the left mouse button will
select URLs. That is, if the mouse is over a piece of text that is a
URL, it is automatically selected. Releasing the mouse button while the
control key is depressed runs an external program on the currently
selected text. You can specify the program to be run through X resources
(see below). The default program that runs will start a web browser with
the selected URL.
Selections can be extended by shift-clicking the left pointer button. If
a shift-click occurs above the current selection then the selection will
be extended up to the new position. If a shift-click occurs below the
Page 9
XWSH(1G) XWSH(1G)
current selection then the selection will be extended down to the new
position. If a shift-click occurs inside the selection then the top of
the selection remains fixed while the bottom is moved up to the new
position. Note that selections can be extended in single, double or
triple click mode.
If during the process of making a selection the pointer moves vertically
out of the text area then the text area will be automatically scrolled to
allow selections that are larger than the visible area.
Through X resources you can also use the Modifier keys (Control, Alt, and
Shift) to modify behavior of left mouse-button events. You can apply any
combination of Control, Alt, and Shift to the three actions of the left
mouse button (button down, drag with button down, and button up).
(However, specifying an action associated with the Alt and left-mouse
might interfere with a default 4Dwm binding.) The action taken when a
given key and mouse combination event occurs is specified in a way
similar to keysym functions.
The first mapping, selectDownMap, is the action taken when the left mouse
button is pressed down. The next mapping, selectDragMap, is the action
taken when the mouse is dragged (with the left button still depressed).
The final mapping, selectUpMap, is the action taken when the left mouse
button is released.
The actions available are:
BeginSelect - begin selecting a region of text
BeginExtendSelect - extend the current selection
NormalDragSelect - drag select a region of text
DoNothing - empty place holder operation
SelectURL - select an entire URL
DoFilter1 - execute filter command 1 on selection
DoFilter2 - execute filter command 2 on selection
DoFilter3 - execute filter command 3 on selection
You specify the commands executed by the 3 DoFilter actions with X
resources. The resource names are filterCmd1, filterCmd2, and filterCmd3.
The strings values of these resources are taken as a command line and
executed. If there is a "%s" (no quotes) in the string, it is replaced
with the currently selected text.
The default values for the three filter commands are:
XWsh*FilterCmd1: nr %s
XWsh*FilterCmd2: jot %s
XWsh*FilterCmd3: echo %s
It is important to note that these commands are run in the environment
that xwsh is run in by xdm. This is not the same as the environment of
the command that runs inside of the xwsh and thus environment variables
set in your shell may not be set for the filter program.
Page 10
XWSH(1G) XWSH(1G)
The default mapping of key and mouse clicks is as follows (taken from the
X resource file):
XWsh*selectDownMap: \
Control: func("SelectURL"); \
Shift: func("BeginExtendSelect");
XWsh*selectDragMap: \
Control: func("DoNothing"); \
Shift: func("NormalDragSelect");
XWsh*selectUpMap: \
Control: func("DoFilter1");
The mappings need not be single key modifiers, you can also specify
modifiers such as Control+Shift or Alt+Control. There can only be a
single function per key modifier however.
Note that you can select text without pressing any modifier keys, then
depress a modifier key before releasing the mouse button. Then (assuming
the modifier is still pressed) when you release the mouse button, the
selectUpMap for that modifier key will be executed.
The scroll bar is composed of four components. An up arrow, a down
arrow, a thumb and a divot. The up arrow scrolls the text display down
one line while the down arrow scrolls the text display up one line.
Dragging the thumb up will scroll the display down while dragging the
thumb down will scroll the display up. Most manipulation of the scroll
bar is done using the left pointer button. The divot is not manipulated
by the user but is used to show where the thumb was before scrolling
began (only when dragging the thumb).
By clicking the left pointer button above or below the thumb, the thumb
will begin scrolling in page sized increments until it reaches either of
the end points. By clicking the middle pointer button above, below, or
on the thumb the thumb will be moved to the location of the pointer (i.e.
a "goto" operation). The thumb will continue to track the pointer
location until the middle pointer button is released.
If the display is locked (via the Lock display escape sequence, see xwsh
set mode) or if there is insufficient data to scroll then the scroll bar
will be disabled (no thumb will show and the arrows will be grayed out).
xwsh emulates a terminal that supports a subset of ANSI X3.64-1979 (an
"ansi" terminal). xwsh also has features appropriate to a windowing
application. Escape sequences are special characters interpreted by the
terminal (or terminal emulator; i.e. xwsh) to perform functions beyond
simply placing a character on the display. The information that follows
describes all the escape sequences that xwsh understands. A standard set
of conventions are used to describe each escape sequence. For example:
Page 11
XWSH(1G) XWSH(1G)
CSI Pv m [Toc] [Back]
describes a sequence that begins with CSI ("control sequence introducer")
followed by zero or more semicolon separated numbers followed by the
character "m". ESC ("escape") expands to "\033". CSI expands to either
"ESC [" (escape left-bracket) or to "\233". DCS ("device control
string") expands to either "ESC P" (escape capital-P) or to "\220". ST
("string terminator") expands to either "ESC \\" (escape backslash) or to
"\234".
ANSI ESCAPE SEQUENCES [Toc] [Back] octal 7 Ring the bell. See the xwsh set mode below for what this
actually does.
octal 10 Move the cursor left one character. Does not wrap at the
left margin.
octal 11 Move the cursor to the next tab position. Tabs are settable.
octal 13 Move the cursor down one position. Scroll the display if
needed.
octal 14 Move the cursor down one position. Scroll the display if
needed.
octal 15 Move the cursor to the left margin.
ESC D or octal 204 [Toc] [Back]
Move the cursor down one position. Scroll the display if
needed.
ESC E or octal 205 [Toc] [Back]
Move the cursor to the start of the next line. Scroll the
display if needed.
ESC H or octal 210 [Toc] [Back]
Horizontal tab set. Set a tab at the current cursor column.
ESC M or octal 215 [Toc] [Back]
Move the cursor up one position. Scroll the display if
needed.
ESC c Reset to initial state.
CSI Pv A Move the cursor up. The amount to move is taken from the
first parameter, or defaults to one. The display will not be
scrolled.
CSI Pv B Move the cursor down. The amount to move is taken from the
first parameter, or defaults to one. The display will not be
scrolled.
Page 12
XWSH(1G) XWSH(1G)
CSI Pv C Move the cursor right. The amount to move is taken from the
first parameter, or defaults to one. The cursor will not
wrap at the right margin.
CSI Pv D Move the cursor left. The amount to move is taken from the
first parameter, or defaults to one. The cursor will not
wrap at the left margin.
CSI Pv H or CSI Pv f
Move the cursor to absolute coordinates specified by the
first and second parameters. The default values for the
parameters are one.
CSI Pv g Clear tabs. If the first parameter has the value 0, then the
tab at the current column is removed. If the first parameter
has the value 3 then all tab stops are cleared. Otherwise,
if the first parameter has a value of 100 then tab stops are
reset to the default state (one every 8 columns).
CSI Pv L Insert lines. The amount to insert is taken from the first
parameter, or defaults to one. Lines below the cursor
position are moved down. Blank lines with default display
attributes are added at the cursor position.
CSI Pv M Delete lines. The amount to delete is taken from the first
parameter, or defaults to one. Lines below the cursor
position are moved up, with lines at the bottom being
replaced with blank lines. The blank lines have default
display attributes.
CSI Pv @ Insert characters. The amount to insert is taken from the
first parameter, or defaults to one. Blank characters with
default display attributes are inserted at the cursor
position.
CSI Pv P Delete characters. The amount to delete is taken from the
first parameter, or defaults to one. Characters at the
cursor position are deleted.
CSI Pv X Erase characters. The amount to erase is taken from the
first parameter, or defaults to one. Characters at the
cursor position are erased.
CSI Pv K Erase in line. If the first parameter is zero then the line
is erased from the cursor position to the end of the line.
If the first parameter is one then the line is erased from
the start of the line up to and including the cursor
position. If the first parameter is two the line is
completely erased.
Page 13
XWSH(1G) XWSH(1G)
CSI Pv J Erase in display. If the first parameter is zero then lines
are erased from the cursor position to the end of the
display. If the first parameter is one then lines are erased
from the start of the display up to and including the cursor
position. If the first parameter is two the entire display
is erased.
CSI Pv m Set graphics rendition. Each parameter is examined in turn
and applied to the current graphics rendition. The following
table defines what each of the legal values for the
parameters are.
0 Reset to default.
1 Enable bold. Disable half intensity.
2 Enable half intensity. Disable bold.
3 Enable italics.
4 Enable underlining.
7 Enable reverse video.
21 Disable bold (VT100).
22 Disable half intensity (VT100).
23 Disable italics (VT100).
24 Disable underlining (VT100).
27 Disable reverse video (VT100).
30-37 Set the text color to black, red, green, yellow, blue,
magenta, cyan or white, respectively (ISO 6429).
40-47 Set the page color to black, red, green, yellow, blue,
magenta, cyan or white, respectively (ISO 6429).
CSI Pv h Ansi set mode. Each parameter is examined in turn and
applied to the current state of xwsh. The following table
defines what each of the legal values for the parameters
are.
2 Keyboard lock. When set, no keyboard input is allowed. When
reset, the keyboard behaves as normal.
4 Insert/replace mode. When set, characters are inserted into
the display. When reset, characters overwrite display
characters (this is the normal mode).
Page 14
XWSH(1G) XWSH(1G)
20 Line feed/new line mode. When set, the new line (octal 12)
character moves the cursor down one line and to the left
margin (scrolling as needed). When reset, the new line
character only performs a downward motion (this is the normal
mode).
CSI Pv l Ansi reset mode. Same as ansi set mode, except the modes
are disabled instead of enabled.
CSI Pv R Cursor position report. This sequence is ignored. The
sequence is usually a result of a request cursor position
escape sequence.
CSI Pv c Ansi device attributes request. If xwsh is run with the
VT100 option enabled, then xwsh will answer this escape
sequence by sending "ESC [ ? 1 ; 2 c".
CSI ? Pv c Ansi device attributes report. This sequence is ignored.
The sequence is usually a result of an ansi device
attributes request.
CSI Pv n Device status report. Legal values for the parameter are:
5 Send null DSR response CSI 0 n.
6 Report the current cursor position. A CSI row ; col R escape
sequence will be sent by xwsh.
100-107
Report the rgb value (#rrggbb) for a given color using a DCS
Pn .y Ps ST escape sequence (see DCS below for the values that
xwsh will use for Pn). DSR parameter 100 maps to the text
color, 101 to the page color, 102 the selection text color,
103 to the selection page color, 104 to the cursor text color,
105 to the cursor page color, 106 to the half intensity color
and 107 to the bold color.
XWSH ESCAPE SEQUENCES [Toc] [Back] CSI = Pv h xwsh set mode. Each parameter is examined in turn and
applied to the current state of xwsh. The following table
defines what each of the legal values for the parameters are.
6 Lock display. When set, this mode causes xwsh to keep its
display set to the current location in the retain buffer. Any
scrolling activities, line insert/deletes will not affect the
retain buffer that is outside of the display. When reset,
scrolling off the bottom will move the display to track the
bottom of the retain buffer. When the lock is set, the scroll
bar is disabled, as well as any extend selection mechanisms
that might cause a scroll. The normal mode is in the reset
state, but the standard terminfo for iris-ansi causes visual
programs to lock the display.
Page 15
XWSH(1G) XWSH(1G)
9 Enable visual bell. When set, xwsh will flash the display when
it receives an octal 7 instead of ringing the bell. When reset
it asks X to ring the bell.
12 Overlay mode. When set, xwsh moves its display into the
overlay planes. When reset, xwsh displays in the default
visual. This is no longer functional as of IRIX 4.0. The
escape sequence is now ignored.
CSI = Pv l xwsh reset mode. Same as xwsh set mode, except the modes
are disabled instead of enabled.
CSI Pv / y xwsh command. The first parameter to this escape sequence
is the particular command described in the table that
follows. Each command has different numbers of arguments
which are described below.
2 Textport init. Reset xwsh to be 40 rows by 80 columns. Reset
the colors to the default colors. Reset any graphics
rendition. Clear out the retain buffer. Home the cursor.
14 History init. Clear out the retain buffer. Home the cursor.
3 Push the window. Depending on the window manager, this may or
may not have any affect.
4 Pop the window. Depending on the window manager, this may or
may not have any affect.
16 Reset bindable function keys.
15 Initialize bindable function keys to defaults.
101 Set the text color by using a 3.3 compatible index.
102 Set the page color by using a 3.3 compatible index.
103 Set the bold color by using a 3.3 compatible index.
104 Set the cursor page color by using a 3.3 compatible index.
111 Set the selection colors by using 3.3 compatible indices.
This sequence takes three parameters. The first is 111. The
second parameter is the selection text color, the third is the
selection page color.
203 Set the window size by row and column. This sequence takes
three parameters. The first is 203. The second parameter is
the number of rows to use. The third parameter is the number
of columns to use.
Page 16
XWSH(1G) XWSH(1G)
204 Set the window size, in pixels. This sequence takes three
parameters. The first is 204. The second parameter is the
new width. The third parameter is the new height. The width
and height are rounded up to the nearest font boundaries.
205 Set the window position, in pixels. The lower left corner of
the display is specified as 0,0.
DCS Pn .y Ps ST
Device control string. Ps is a single ansi string (character codes in
the range of octal 040 to 0176 inclusive). The following defines what
the string is used for.
1 Set the window title.
3 Set the icon title.
4 Set the text color by string. See the -C command for a
description of how the string will be interpreted.
5 Set the page color by string.
6 Set the selection text color by string.
7 Set the selection page color by string.
8 Set the cursor text color by string.
9 Set the cursor page color by string.
10 Set the half intensity color by string.
11 Set the bold intensity color by string.
101 Bind the string to the key named by Pn+1. The key numbers are
the same as the numbers defined in <device.h>. The string can
contain C style backslashed characters to get control
characters into the string. When the key is pressed the value
will be sent to the process that xwsh is managing. This
capability is turned off by default for security. Turn it on
with the "-bindkey2dcs" command line option or with the
"bindKey2DCS" resource.
103 Bind the string to the key named by Pn+1. The key numbers are
the same as the numbers defined in <device.h>. When the key
is pressed the value will be used to invoke a function
internal to xwsh. This capability is turned off by default
for security. Turn it on with the "-bindkey2dcs" command line
option or with the "bindKey2DCS" resource.
Page 17
XWSH(1G) XWSH(1G)
VT100 ESCAPE SEQUENCES [Toc] [Back] ESC N or octal 216
Single shift G2. The next character is taken literally and
is displayed using the character set in G2.
ESC O or octal 217 [Toc] [Back]
Single shift G3. The next character is taken literally and
is displayed using the character set in G3.
CSI ? Pv n VT100 device status report.
CSI ? Pv h VT100 set mode. Each parameter is examined in turn and
applied to the current state of xwsh. The following table
defines what each of the legal values for the parameters are.
1 VT100 application cursor key mode. When set, the cursor keys
send application escape sequences. When reset, the cursor keys
send the cursor motion escape sequences.
3 VT100 column mode. When set, the display changes to 132
columns wide. When reset, the display changes to 80 columns
wide. These changes are independent of any size constraints
placed on xwsh.
5 VT100 screen mode. When set, the colors used to display text
are reversed with their page counterparts. The text and page
colors are exchanged. The selection text and selection page
colors are exchanged. When reset, the exchange is done again
reversing things to their original state.
6 VT100 origin mode. When set, cursor positions are taken
relative to the scroll region. When reset, cursor positions
are absolute.
7 VT100 auto wrap mode. When set, auto wrapping occurs normally.
When reset, the cursor will not auto wrap at the right margin.
25 VT100 text cursor enable. When set, the text cursor is
displayed. When reset, the text cursor is not displayed.
CSI ? Pv l VT100 reset mode. Same as VT100 set mode, except the modes
are disabled instead of enabled.
ESC = Put the key pad into application mode.
ESC > Put the key pad into numeric mode.
ESC Z VT100 identification. xwsh returns an escape sequence that
describes the configuration of its terminal emulator.
Page 18
XWSH(1G) XWSH(1G)
ESC 7 VT100 save cursor. The cursor position, graphics rendition,
character set, and auto wrap state are saved.
ESC 8 VT100 restore cursor. This reverses the save cursor
command.
CSI Pv r VT100 scroll region. Define the top and bottom margins for
scrolling.
ESC ( B Install ascii character set into G0.
ESC ( 0 Install graphics character set into G0.
ESC ) B Install ascii character set into G1.
ESC ) 0 Install graphics character set into G1.
ESC * B Install ascii character set into G2.
ESC * 0 Install graphics character set into G2.
ESC + B Install ascii character set into G3.
ESC + 0 Install graphics character set into G3.
octal 17 Make G0 the current character set.
octal 16 Make G1 the current character set.
ESC n Make G2 the current character set.
ESC o Make G3 the current character set.
ESC < VT52 enter ansi mode.
DCS Pv | Ps ST
VT100 device control string.
ESC # 8 VT100 screen alignment. Fills the display with upper case
E's.
CSI Pv x VT100 request terminal parameters.
CSI Pv q VT100 set/clear led.
XTERM ESCAPE SEQUENCES [Toc] [Back] ESC ] Pn ; Ps octal 7
XTERM set title. If the first parameter is one then Ps is
used as the new icon title. If the first parameter is two
then Ps is used as the new window title.
Page 19
XWSH(1G) XWSH(1G)
XWSH BOOLEAN RESOURCES [Toc] [Back] xwsh supports the following boolean resources.
allowSendEvents [class AllowSendEvents]
When set this flag allows xwsh to accept keyboard events that have
the send_event flag TRUE. This allows another program to type for
the user.
autoFork [class AutoFork]
A flag which specifies if xwsh should automatically fork into the
background during startup.
bindKey2DCS [class BindKey2DCS]
A flag which enables the binding of keys to device control strings
(DCS). This capability is disabled by default for security reasons.
console [class Console]
This resource when set performs the same function as the -console
command line option.
errorExitHolding [class ErrorExitHolding]
When enabled xwsh will maintain its window after the child exits if
the child returns an exit status showing an error condition. This
is a milder form of the holding resource.
fixedSize [class FixedSize]
When set xwsh behaves as a fixed size terminal. Its initial maximum
size determines the tty emulation area managed. When the window
changes size the underlying tty emulation area is not affected.
highlightURL [class HighlightURL]
This boolean controls whether xwsh will highlight URLs that it
detects in the input stream. If set to True, then if a URL is
detected in the output stream, it is highlighted in Bold Italic. By
default this resource is set to False.
holding [class Holding]
This boolean controls what xwsh does when the child program exits.
When set xwsh maintains its window until removed by the window
manager. When reset, xwsh exits when its child exits.
invertY [class InvertY]
When set xwsh will y invert the geometry origin coordinates. This
is a compatibility resource for the obsolete wsh(1g) command only.
This resource is obsolete and should not be used.
jumpToBottom [class JumpToBottom]
When set this flag tells xwsh to jump to the bottom of the scroll
display upon any data generating key stroke. When false, xwsh only
jumps when a data scroll occurs (i.e., a newline or equivalent is
output).
Page 20
XWSH(1G) XWSH(1G)
keepOnScreen [class KeepOnScreen]
When enabled this flag causes xwsh to attempt to keep its window on
the screen. This flag only takes affect when xwsh is resized from
its own popup menu or from an escape sequence.
keyMapFileAfter [class KeyMapFileAfter]
This boolean determines the order in which the key map file is
applied to the keyboard state. The default value of false means
that the users key map file is applied before any resources. A
value of TRUE means that the users key map file is applied after any
resources.
noKeyboard [class NoKeyboard]
When set this resource disables the keyboard. No keyboard input
will be allowed.
noMenu [class NoMenu]
When enabled xwsh will not have a popup menu. Same as the -nomenu
command line option.
noQuickSend [class NoQuickSend]
When enabled xwsh will not send the primary selection when the
middle pointer is clicked.
overFirst [class OverFirst]
This determines what menu item is under the pointer when the menu
button is pressed. The default value is false and means that
pointer will be over the title. When true the pointer will be over
the first item in the menu.
overrideRedirect [class OverrideRedirect]
When set xwsh will create an override redirect window. This flag
overrides the noBorder flag.
useScrollBar [class UseScrollBar]
When enabled and the retain limit is greater than the emulation area
xwsh will display a scroll bar. When disabled xwsh will not display
a scroll bar.
visualBell [class VisualBell]
This flag when set tells xwsh to flash the display in an irritating
manner instead of ringing the annoying bell.
vt100 [class Vt100]
If set then xwsh behaves very much like a vt100.
vt100Wrap [class Vt100Wrap]
When set this flag tells xwsh to perform right margin wrapping like
it does when in vt100 mode. The TERM variable will also be set to
iris-ansi-nowrap to facilitate correct editing.
Page 21
XWSH(1G) XWSH(1G)
XWSH INTEGER RESOURCES [Toc] [Back] xwsh supports the following integer resources.
barWidth [class ScrollBarWidth]
Define the width of the scroll bar.
metaKeyMask [class MetaKeyMask]
This mask is matched against the XKeyEvent.state to determine if
xwsh should set the high bit in the byte for single character key
strings. The default value is 0.
pickingInset [class PickingInset]
This value is used as the width of the gap between the scroll bar
(if any) and the tty region of xwsh.
retainLimit [class RetainLimit]
This integer value defines the number of lines of data to retain.
See the -sl option for more information.
underlineOffset [class UnderlineOffset]
Define the number of pixels below the baseline that xwsh will draw
the underline. This value will be limited against the fonts maximum
descender.
XWSH STRING RESOURCES [Toc] [Back] xwsh supports the following string resources.
anchorPoint [class AnchorPoint]
Define the anchor point that xwsh uses when resizing itself from an
escape sequence or its own size menu. See the -anchor option for
more information.
background [class Background]
Define the background color for xwsh.
barPointerColorBackground [class Background]
Define the background color of the pointer when its over the scroll
bar.
barPointerColorForeground [class Foreground]
Define the foreground color of the pointer when its over the scroll
bar.
barPointerShape [class Cursor]
Define the shape of the cursor to use when the pointer is over the
scroll bar (not the arrows!).
boldColor [class BoldColor]
Define the bold color for xwsh.
Page 22
XWSH(1G) XWSH(1G)
boldFont [class Font]
Sets the bold font for xwsh to use.
boldItalicont [class Font]
Sets the bold italic for xwsh to use.
charClass [class CharClass]
Define changes to the character class table used by double click.
ckmeKeyMap [class CkmeKeyMap]
This resource defines the key mappings that are applied when the
cursor key mode enable escape sequence is received.
ckmdKeyMap [class CkmdKeyMap]
This resource defines the key mappings that are applied when the
cursor key mode disable escape sequence is received.
cursorPageColor [class CursorBackground]
Define the cursor page color for xwsh.
cursorTextColor [class CursorForeground]
Define the cursor text color for xwsh.
decAsciiFont [class DecAsciiFont]
Define the font to use for regular ascii text when xwsh is in vt100
mode.
decGraphicsFont [class DecGraphicsFont]
Define the font to use for graphics characters when xwsh is in vt100
mode.
display [class Display]
This resource is the value of the -display command line options
argument.
filterCmd1 [class FilterCmd1]
This is the command that is executed when the corresponding
DoFilter1 action happens. Any %s in the string is replaced with the
currently selected text. The string is passed to a shell (/bin/sh)
and so may contain pipelines, redirection, etc.
filterCmd2 [class FilterCmd2]
This is the command that is executed when the corresponding
DoFilter2 action happens. Any %s in the string is replaced with the
currently selected text. The string is passed to a shell (/bin/sh)
and so may contain pipelines, redirection, etc.
filterCmd3 [class FilterCmd3]
This is the command that is executed when the corresponding
DoFilter3 action happens. Any %s in the string is replaced with the
currently selected text. The string is passed to a shell (/bin/sh)
and so may contain pipelines, redirection, etc.
Page 23
XWSH(1G) XWSH(1G)
font [class Font]
Sets the primary rendition font for xwsh to use.
foreground [class Foreground]
Define the foreground color for xwsh.
geometry [class Geometry]
This string specifies the columns rows and starting position for
xwsh in standard x form.
halfColor [class HalfColor]
Define the half intensity color for xwsh.
iconTitle [class Title]
Defines the title of the icon window if the window manager provides
icon title decorations.
initSequence [class InitSequence]
This resource provides a string which will be interpreted by xwsh
after all other initialization but before any output from the pty is
received. The string can contain escape sequences.
italicFont [class Font]
Sets the italic font for xwsh to use.
keyboardType [class KeyboardType]
Define the keyboard type for xwsh to emulate. ibmrt and xlib are the
only choices.
keyMapFile [class KeyMapFile]
This resource specifies the name of the key map file.
keyMapping0 [class KeyMapping0]
Define first key mappings. These mappings are applied before any
others unless a key map file is used and keyMapFileAfter is FALSE.
keyMapping1 [class KeyMapping1]
Define second key mappings. These mappings are applied after
keyMapping0.
keyMapping2 [class KeyMapping2]
Define third key mappings. These mappings are applied after
keyMapping1.
kpamKeyMap
|