xterm(1X) xterm(1X)
NAME
xterm - eumulates terminals
SYNOPSIS
xterm [toolkit-option] ... [option] ...
DESCRIPTION
xterm is a terminal emulator for the X Window System. It
provides DEC VT102 and Tektronix 4014 compatible terminals
for programs that can't use the window system directly. If
the underlying operating system supports terminal resizing
capabilities (for example, the SIGWINCH signal in systems
derived from 4.3 BSD), xterm uses the facilities to notify
programs running in the window whenever it is resized.
The VT102 and Tektronix 4014 terminals each have their own
window so that you can edit text in one and look at graphics
in the other at the same time. To maintain the correct as-
pect ratio (height/width), Tektronix graphics is restricted
to the largest box with a 4014's aspect ratio that fits in
the window. This box is located in the upper-left area of
the window.
Although both windows may be displayed at the same time, one
of them is considered the active window for receiving key-
board input and terminal output. This is the window that
contains the text cursor and whose border is highlighted
whenever the pointer is in either window. The active window
can be chosen through escape sequences, the VT Options menu
in the VT102 window, or the Tek Options menu in the 4014
window.
Options
The xterm terminal emulator accepts all the standard X
Toolkit command-line options, as described in X(1X), as well
as these options. If you precede an option listed below
with a plus sign (+) instead of a hyphen (-), the option is
restored to its default value.
-132 Sets xterm to recognize DECCOLM escape sequences so
that on their receipt an xterm window resizes ap-
propriately. Normally, the VT102 DECCOLM escape se-
quence that switches between 80-column and 132-
column mode is ignored.
-ah Indicates that xterm should always highlight the
text cursor and borders. By default, xterm displays
a hollow text cursor whenever the focus is lost or
the pointer leaves the window.
+ah Indicates that xterm should do text cursor
highlighting.
November, 1990 1
xterm(1X) xterm(1X)
-aw Indicates that auto-wraparound should be allowed.
This allows the cursor to automatically wrap to the
beginning of the next line when it is at the right-
most position of a line and text is displayed.
+aw Indicates that auto-wraparound should not be al-
lowed.
-b number
Specifies in pixels the size of the inner border
(the distance between the outer edge of the charac-
ters and the window border). The default is 2.
-C Indicates that this window should receive console
output. This is not supported on all systems.
-cc Indicates that xterm should automatically extend a
line selection to the beginning of the line.
+cb Indicates that xterm should not automatically extend
a line selection to the beginning of the line.
-cc character-class-range:value[,...]
Sets classes indicated by the given ranges for use
in selecting by words. See ``Character Classes''
later in the ``Description'' section.
-cn Indicates that newlines should not be cut in line-
mode selections.
+cn Indicates that newlines should be cut in line-mode
selections.
-cr color
Specifies the color to use for the text cursor. The
default is to use the same foreground color that is
used for text.
-cu Indicates that xterm should work around a problem in
the curses pointer-motion package. See curses(3X) in
A/UX Programmer's Reference. This problem causes
more(1) to display lines incorrectly if they are ex-
actly the width of the window and are followed by a
line beginning with a tab character (the leading
tabs are not displayed).
+cu Indicates that xterm should not work around the
curses problem mentioned above.
-e program [options]...
Specifies the command (and its command-line options)
to be run in the xterm window. It also sets the
2 November, 1990
xterm(1X) xterm(1X)
window title and icon name to be the base name of
the command being executed if neither -T or -n are
given on the command line. This must be the last op-
tion on the command line.
-fb font
Specifies a font to be used when displaying bold
text. This font must be the same height and width
as the normal font. If only one of the normal or
bold fonts is specified, it is used as the normal
font, and the bold font is produced by overstriking
this font. The default is to do overstriking of the
normal font.
-help Displays a summary of the command syntax.
-j Indicates that xterm should do jump scrolling. Nor-
mally, text is scrolled one line at a time, but this
option allows xterm to move multiple lines at a time
so that the display of the scrolled text is kept up
to date. This option is strongly recommended be-
cause it makes xterm much faster when scanning
through large amounts of text. The VT100 escape se-
quences for enabling and disabling smooth scrolling,
as well as the VT Options menu, can be used to turn
this feature on or off.
+j Indicates that xterm should not do jump scrolling.
-l Indicates that xterm should send all terminal output
to a log file as well as to the screen. This option
can be enabled or disabled using the Main Options
menu.
+l Indicates that xterm should not do logging.
-lf file
Specifies the name of the file to which the output
log, described in the -l option, is written. If
file begins with a pipe symbol (|), the rest of the
string is assumed to be a command to be used as the
endpoint of a pipe. The default filename is
XtermLog.n, where n is the process ID of xterm, and
is created in the directory from which xterm was
started (or the user's home directory in the case of
a login window).
-ls Indicates that the shell that is started in the
xterm window be a login shell (that is, the first
character of argv[0] is a hyphen, indicating to the
shell that it should read the user's .login or .pro-
file).
November, 1990 3
xterm(1X) xterm(1X)
+ls Indicates that the shell that is started should not
be a login shell (meaning it is a normal subshell).
-mb Indicates that xterm should ring a margin bell when
the user types near the right end of a line. This
option can be turned on and off from the VT Options
menu.
+mb Indicates that a margin bell should not be rung.
-mc milliseconds
Specifies the maximum time between multiclick selec-
tions.
-ms color
Specifies the color to be used for the pointer. The
default is to use the foreground color.
-nb number
Specifies the number of characters from the right
end of a line at which the margin bell, if enabled,
rings. The default is 10 characters.
-rw Indicates that reverse wraparound should be allowed.
This allows the cursor to back up from the leftmost
column of one line to the rightmost column of the
previous line. This is very useful for editing long
shell command lines. This option can be turned on
and off from the VT Options menu.
+rw Indicates that reverse wraparound should not be al-
lowed.
-Sccn Specifies the last two letters (cc) of the name of a
pseudoterminal to use in slave mode, plus the number
(n) of the inherited file descriptor. The argument
ccn is parsed as %c%c%d. This allows xterm to be
used as an input and output channel for an existing
program and is sometimes used in specialized appli-
cations.
-s Indicates that xterm can scroll asynchronously,
meaning that the screen does not have to be kept
completely up to date while scrolling. This allows
xterm to run faster when network latencies are very
high and is typically useful when running xterm
across a very large internet or across many gate-
ways.
+s Indicates that xterm should scroll synchronously.
-sb Indicates that some number of lines that are
4 November, 1990
xterm(1X) xterm(1X)
scrolled off the top of the window should be saved
and that a scroll bar should be displayed so that
those lines can be viewed. This option may be
turned on and off from the VT Options menu.
+sb Indicates that a scroll bar should not be displayed.
-sf Indicates that Sun Function Key escape codes should
be generated for function keys.
+sf Indicates that the standard escape codes should be
generated for function keys.
-si Indicates that output to a window should not au-
tomatically reposition the screen to the bottom of
the scrolling region. This option can be turned on
and off from the VT Options menu.
+si Indicates that output to a window should cause it to
scroll to the bottom.
-sk Indicates that pressing a key while using the scroll
bar to review previous lines of text should cause
the window to be repositioned automatically in the
normal position at the bottom of the scroll region.
+sk Indicates that pressing a key while using the scroll
bar should not cause the window to be repositioned.
-sl number
Specifies the number of lines to save that have been
scrolled off the top of the screen. The default is
64.
-t Indicates that xterm should start in Tektronix mode
rather than in VT102 mode. Switching between modes
is done using the VT Options and the Tek Options
menu.
+t Indicates that xterm should start in VT102 mode.
-tm string
Specifies a series of terminal setting keywords fol-
lowed by the characters that should be bound to
those functions, similar to the stty(1). Allowable
keywords include: intr, quit, erase, kill, eof, eol,
swtch, start, stop, brk, susp, dsusp, rprnt, flush,
weras, and lnext. Control characters may be speci-
fied as ^char (for example ^c or ^u), and ^? may be
used to indicate delete.
-tn name
November, 1990 5
xterm(1X) xterm(1X)
Specifies the name of the terminal type to be set in
the TERM environment variable. This terminal type
must exist in the termcap(4) database and should
have li# and co# entries.
-ut Indicates that xterm shouldn't write a record into
the the system log file /etc/utmp.
+ut Indicates that xterm should write a record into the
system log file /etc/utmp.
-vb Indicates that a visual bell is preferred over an
audible one. Instead of ringing the terminal bell
whenever a CONTROL-G is received, the window is
flashed.
+vb Indicates that a visual bell should not be used.
-wf Indicates that xterm should wait for the window to
be mapped the first time before starting the subpro-
cess so that the initial terminal size settings and
environment variables are correct. It is the
application's responsibility to catch subsequent
terminal size changes.
+wf Indicates that xterm should not wait before starting
the subprocess.
The following command-line options are provided for compati-
bility with older versions. They may not be supported in
the next release because the X Toolkit provides standard op-
tions that accomplish the same task.
%geom Specifies the preferred size and position of the
Tektronix window. This argument is shorthand for
specifying the
*tekGeometry resource.
#geom Specifies the preferred position of the icon window.
It is shorthand for specifying the *iconGeometry
resource.
6 November, 1990
xterm(1X) xterm(1X)
-n string
Specifies the icon name for xterm windows. It is
shorthand for specifying the *iconName resource.
Note that this is not the same as the X Toolkit op-
tion
-name, which you'll find later in this section. The
default icon name is the application name.
-r Indicates that reverse video should be simulated by
swapping the foreground and background colors. This
option is equivalent to the -reversevideo and -rv
options.
-T string
Specifies the title for xterm windows. This option
is equivalent to the -title option
-w number
Specifies in pixels the width of the border sur-
rounding the window. This option is equivalent to
the
-borderwidth and -bw options
The following standard X Toolkit command-line options are
commonly used with xterm:
-bd color
Specifies the color to use for the border of the
window. The default is black.
-bg color
Specifies the color to use for the background of the
window. The default is white.
-bw width
Specifies in pixels the width of the border sur-
rounding the window.
-display display
Specifies the X server to contact. See X(1X) for
details.
-fg color
Specifies the color to use for displaying text. The
default is black.
-fn font
Specifies the font to be used for displaying normal
text. The default is fixed.
November, 1990 7
xterm(1X) xterm(1X)
-geometry geometry
Specifies the preferred size and position of the
VT102 window. See X(1X) for details.
-iconic Indicates that xterm should ask the window manager
to start xterm as an icon rather than as the normal
window.
-name name
Specifies the application name under which resources
are to be obtained rather than the default execut-
able filename. The argument name should not contain
periods (.) or asterisks (*).
-title string
Sets the window title string to string, which may be
displayed by window managers if the user so chooses.
The default title is the command line specified
after the -e option, if any; otherwise, the applica-
tion name.
-rv Indicates that reverse video should be simulated by
swapping the foreground and background colors.
-xrm resourcestring
Specifies a resource string to be used. This is
especially useful for setting resources that do not
have separate command-line options.
Menus
The xterm client provides four menus named Main Options, VT
Options, VT Fonts, and Tek Options. Each menu pops up under
the correct combinations of key and mouse button presses.
Most menus are divided into two sections, separated by a
horizontal line. The top portion contains various modes
that can be altered. A checkmark appears next to a mode
that is currently active. Selecting one of these modes tog-
gles its state. The bottom portion of the menu contains
menu items that perform the indicated function when select-
ed.
The Main Options menu pops up when the CONTROL key and mouse
button are pressed while the pointer resides in a window.
The Main Options menu contains items that apply to both the
VT102 and Tektronix windows. The Secure Keyboard item
should be used when typing in passwords or other sensitive
data. See the next section, ``Security,'' for details.
Other items Main Options menu are Send STOP Signal, Send
CONT Signal, Send INT Signal, Send HUP Signal, Send TERM
Signal, and Send KILL Signal, which send the SIGTSTP,
SIGCONT, SIGINT, SIGHUP, SIGTERM, and SIGKILL signals,
respectively, to the process group of the process running
8 November, 1990
xterm(1X) xterm(1X)
under xterm (usually the shell). The Send CONT Signal item
is especially useful if the user has accidentally typed
CONTROL-Z, suspending the process.
The VT Options menu sets various modes in the VT102 emula-
tion and is popped up when the CONTROL and LEFT ARROW keys
are pressed simultaneously while the pointer is in the VT102
window. The Do Soft Reset item in this menu resets scroll
regions. This can be convenient when a client application
has left the scroll regions set incorrectly. The Do Full
Reset menu item clears the screen, resets tabs to every
eighth column, and resets the terminal modes (such as wrap
and smooth scroll) to their initial states just after xterm
finishes processing the command-line options.
The VT Fonts menu sets the font used in the VT102 window.
The Tek Options menu sets various modes in the Tektronix
emulation and is popped up when the CONTROL and LEFT ARROW
keys are pressed while the pointer is in the Tektronix win-
dow. A checkmark appears next to the current font size.
The PAGE menu item clears out the Tektronix window.
Security
X environments differ in their security consciousness. The
servers provided by MIT use a host-based mechanism to con-
trol access to the server. See xhost(1X) for details. If
you enable access for a host and other users are also per-
mitted to run clients on that host, there is the possibility
that someone will run an application that attempts to use
the basic services of the X protocol to snoop on your ac-
tivities and potentially capture a transcript of everything
you type at the keyboard. This is of particular concern
when you want to type in a password or other sensitive data.
The best solution to this problem is for the industry to
choose a standard authorization mechanism, with the neces-
sary operating system support, and to incorporate this into
the X protocol (which is already designed to handle such a
mechanism). In the mean time, because passwords are most
commonly typed to something running in an xterm window, a
simple mechanism exists for protecting keyboard input in
xterm.
The Main Options menu contains a Secure Keyboard item which,
when enabled, ensures that all keyboard input is directed
only to xterm (using the GrabKeyboard protocol request).
See the section, ``Menus,'' earlier in the ``Description''
section. When an application prompts you for a password (or
other sensitive data), you can enable Secure Keyboard mode
by selecting it in the Main Options menu, type in the data,
and then disable Secure Keyboard mode by selecting it in the
Main Options menu again.
November, 1990 9
xterm(1X) xterm(1X)
Only one X client at a time can secure the keyboard, so when
you attempt to enable Secure Keyboard mode, it may fail. In
this case, the bell sounds. If Secure Keyboard is enabled,
the foreground and background colors are exchanged (as if
you selected the Enable Reverse Video item in the VT Options
menu); they are exchanged again when you exit Secure Key-
board mode. If the colors do not switch, you should be
suspicious that you are being spoofed. If the application
you are running displays a prompt before asking for the
password, it is safest to enter Secure Keyboard mode before
the prompt is displayed. You should make sure that the
prompt is displayed correctly in the new colors to minimize
the probability of spoofing. You can also bring up the menu
again and make sure that a checkmark appears next to the
item.
The Secure Keyboard mode is disabled automatically when your
xterm window becomes iconified (or otherwise unmapped) or
when you start up a reparenting window manager that places a
title bar or other decoration around the window. This is a
feature of the X protocol not easily overcome. When this
happens, the foreground and background colors are switched
back, and the bell sounds in warning.
Emulations
The VT102 emulation is fairly complete but does not support
the blinking-character attribute nor the double-wide and
double-size character sets. The termcap(4) entries that
work with xterm include xterm, vt102, vt100, and ansi.
xterm automatically searches the termcap file in this order
for these entries and then sets the TERM and TERMCAP en-
vironment variables.
Many of the special xterm features (such as logging) may be
modified under program control through a set of escape se-
quences that are different from the standard VT102 escape
sequences. (See XTerm Control Sequences in
/usr/lib/X11/XTerm_ctlseq.)
The Tektronix 4014 emulation is also fairly complete. Four
different font sizes and five different lines types are sup-
ported. The Tektronix text and graphics commands are
recorded internally by xterm and may be written to a file by
sending the COPY escape sequence or through the Tek Options
menu. See tek-copy in ``Actions'' later in the ``Descrip-
tion'' section. The name of the file is of the form
COPYyy-MM-dd.hh:mm:ss, where yy, MM, dd, hh, mm, and ss are
the year, month, day, hour, minute, and second when the COPY
was performed. The file is created in the directory xterm
is started in, or the home directory for a login xterm.
10 November, 1990
xterm(1X) xterm(1X)
Selecting and copying text
After the VT102 window is created, xterm allows you to
select text and copy it within the same or other windows.
The selection functions are invoked when the mouse button,
LEFT ARROW key and RIGHT ARROW key (the left, middle, and
right buttons, respectively, on a three-button mouse) are
used with no modifiers and when they are used with the SHIFT
key. You can change the assignment of the functions to keys
and the mouse button through the resource database. See
``Actions'' later in the ``Description'' section.
The mouse button (or the left button on a three-button
mouse) is used to save text to the cut buffer. To select
text by dragging, move the pointer to the beginning of the
text, press and hold the mouse button down while moving the
pointer to the end of the region, and then release the mouse
button. The selected text is highlighted and is saved in
the global cut buffer and made the PRIMARY selection when
the button is released. Double-clicking (pressing the mouse
button twice in rapid succession) selects by word. Triple-
clicking selects by line. Quadruple-clicking goes back to
characters, and so on. A multiple-click is determined by the
time from mouse button up to mouse button down, so you can
change the selection unit in the middle of a selection. If
the key and button bindings specify that an X selection is
to be made, xterm leaves the selected text highlighted for
as long as it is the selection owner.
The LEFT ARROW key (or the middle button on a three-button
mouse) inserts the text from the PRIMARY selection, if any;
otherwise, the text is inserted from the cut buffer as key-
board input.
The RIGHT ARROW key (or the right button on a three-button
mouse) extends the current selection. If pressed while
closer to the right edge of the selection than the left, it
extends or contracts the right edge of the selection. If
you contract the selection past the left edge of the selec-
tion, xterm assumes you really meant the left edge, restores
the original selection, and then extends or contracts the
left edge of the selection. Extension works in the same
manner for the opposite edges. Extension starts in the
selection unit mode that the last selection or extension was
performed in; you can multiple-click to cycle through them.
By cutting and pasting pieces of text without trailing new-
lines, you can take text from several places in different
windows and form a command to the shell, for example, or
take output from a program and insert it into your favorite
editor. Because the cut buffer is globally shared among
different applications, you should regard it as a ``file''
November, 1990 11
xterm(1X) xterm(1X)
whose contents you know. The terminal emulator, and other
text programs, should treat it as if it were a text file;
that is, the text is delimited by newlines.
The scroll region displays the position and amount of text
currently showing in the window (highlighted) relative to
the amount of text actually saved. As more text is saved
(up to the maximum), the size of the highlighted area de-
creases.
Pressing the mouse button with the pointer in the scroll re-
gion moves the adjacent line to the top of the display win-
dow.
Pressing the RIGHT ARROW key with the pointer in the scroll
region moves the top line of the display window down to the
pointer position.
Pressing the LEFT ARROW key with the pointer in the scroll
region moves the display to a position in the saved text
that corresponds to the pointer position in the scroll bar.
Unlike the VT102 window, the Tektronix window does not allow
the copying of text. It does allow Tektronix GIN mode, and
in this mode, the pointer changes from an arrow to a
crosshair. Pressing any key sends that key and the current
coordinate of the crosshair pointer.
Pressing the mouse button, the LEFT ARROW key, and the RIGHT
ARROW key returns the letters l, m, and r, respectively. If
the SHIFT key is also pressed, the corresponding uppercase
letter is sent. To distinguish the mouse button or
equivalent from a key, the high bit of the character is set,
but this bit is normally stripped unless the terminal mode
is RAW. See tty(7) for details.
Other features
The xterm client automatically highlights the window border
and text cursor when the pointer enters the window (select-
ed) and unhighlights them when the pointer leaves the window
(unselected). If the window is the focus window, then the
window is highlighted no matter where the pointer is.
In VT102 mode, there are escape sequences to activate and
deactivate an alternate screen buffer, which is the same
size as the display area of the window. When activated, the
current screen is saved and replace with the alternate
screen. Saving of lines scrolled off the top of the window
is disabled until the normal screen is restored. The
termcap(4) entry for xterm allows the visual editor vi(1) to
switch to the alternate screen for editing, and restore the
screen on exit.
12 November, 1990
xterm(1X) xterm(1X)
In either VT102 or Tektronix mode, there are escape se-
quences to change the name of the windows and to specify a
new log file name.
Character classes
Pressing the LEFT ARROW key (or the middle mouse button on a
three-button mouse) twice in rapid succession, which is
known as double-clicking, causes all characters of the same
class (such as letters, white space, punctuation) to be
selected. Because different people have different prefer-
ences for what should be selected (for example, should
filenames be selected as a whole or only the separate sub-
names), the default mapping can be overridden through the
use of the charClass resource.
This resource is simply a list of range:value pairs where
range is either a single number or low-high in the range of
0-127, corresponding to the ASCII code for the character or
characters to be set. The value portion of the pair is ar-
bitrary, although the default table uses the character
number of the first character occurring in the set.
The default table is:
static int charClass[128] = {
/* NUL SOH STX ETX EOT ENQ ACK BEL */
32, 1, 1, 1, 1, 1, 1, 1,
/* BS HT NL VT NP CR SO SI */
1, 32, 1, 1, 1, 1, 1, 1,
/* DLE DC1 DC2 DC3 DC4 NAK SYN ETB */
1, 1, 1, 1, 1, 1, 1, 1,
/* CAN EM SUB ESC FS GS RS US */
1, 1, 1, 1, 1, 1, 1, 1,
/* SP ! " # $ % & ' */
32, 33, 34, 35, 36, 37, 38, 39,
/* ( ) * + , - . / */
40, 41, 42, 43, 44, 45, 46, 47,
/* 0 1 2 3 4 5 6 7 */
48, 48, 48, 48, 48, 48, 48, 48,
/* 8 9 : ; < = > ? */
48, 48, 58, 59, 60, 61, 62, 63,
/* @ A B C D E F G */
64, 48, 48, 48, 48, 48, 48, 48,
/* H I J K L M N O */
48, 48, 48, 48, 48, 48, 48, 48,
/* P Q R S T U V W */
48, 48, 48, 48, 48, 48, 48, 48,
/* X Y Z [ \ ] ^ _ */
48, 48, 48, 91, 92, 93, 94, 48,
/* ` a b c d e f g */
96, 48, 48, 48, 48, 48, 48, 48,
/* h i j k l m n o */
November, 1990 13
xterm(1X) xterm(1X)
48, 48, 48, 48, 48, 48, 48, 48,
/* p q r s t u v w */
48, 48, 48, 48, 48, 48, 48, 48,
/* x y z { | } ~ DEL */
48, 48, 48, 123, 124, 125, 126, 1};
For example, the string 33:48,37:48,45-47:48,64:48 indicates
that the exclamation mark, percent sign, hyphen, period,
slash, and ampersand characters should be treated the same
way as characters and numbers. This is very useful for cut-
ting and pasting electronic mailing addresses and filenames.
Resources
The xterm client understands all the core X Toolkit resource
names and classes, as well as the following, which can be
specified in the /usr/lib/X11/app-defaults file for xterm:
iconGeometry (class IconGeometry)
Specifies the preferred size and position of the ap-
plication when iconified. It is not necessarily
obeyed by all window managers.
sunFunctionKeys (class SunFunctionKeys)
Specifies whether Sun Function Key escape codes
should be generated for function keys instead of
standard escape sequences.
termName (class termName)
Specifies the terminal type name to be set in the
TERM environment.
title (class Title)
Specifies a string that may be used by the window
manager when displaying this application.
ttyModes (class ttyModes)
Specifies a string containing terminal-setting key-
words and the characters to which they may be bound.
Allowable keywords include: intr, quit, erase, kill,
eof, eol, swtch, start, stop, brk, susp, dsusp,
rprnt, flush, weras, and lnext. Control characters
may be specified as ^char (for example ^c or ^u) and
^? may be used to indicate delete. This is very
useful for overriding the default terminal settings
without having to do an stty every time an xterm is
started.
utmpInhibit (class utmpInhibit)
Specifies whether xterm should try to record the
user's terminal in /etc/utmp.
14 November, 1990
xterm(1X) xterm(1X)
The following resources are specified as part of the vt100
widget (class VT100):
allowSendEvents (class AllowSendEvents)
Specifies whether synthetic key and button events
(generated using the Xlib routine XSendEvent(3X))
should be interpreted or discarded. The default is
FALSE, meaning they are discarded. Note that allow-
ing such events creates a very large security hole.
alwaysHighlight (class AlwaysHighlight )
Specifies whether xterm should always display a
highlighted text cursor. By default, a hollow text
cursor is displayed whenever the pointer moves out
of the window or the window loses the input focus.
autoWrap (class AutoWrap)
Specifies whether auto-wraparound should be enabled.
The default is TRUE.
background (class Background)
Specifies the color to use for the background of the
window. The default is white.
boldFont (class Font)
Specifies the name of the bold font to use instead
of overstriking.
c132 (class C132)
Specifies whether the VT102 DECCOLM escape sequence
should be honored. The default is FALSE.
charClass (class CharClass)
Specifies comma-separated lists of character class
bindings of the form [low-]high:value. These are
used in determining which sets of characters should
be treated the same when doing cut and paste. See
``Character Classes'' later in the ``Description''
section.
curses (class Curses)
Specifies whether the last-column problem in curses
should be worked around. See curses(3X) in A/UX
Programmer's Reference. The default is FALSE.
cursorColor (class Foreground)
Specifies the color to use for the text cursor. The
default is black.
eightBitInput (class EightBitInput)
Specifies whether 8-bit character input from the
keyboard should be accepted as is or converted into
November, 1990 15
xterm(1X) xterm(1X)
a sequence of escape-7-bit characters. The default
is TRUE.
eightBitOutput (class EightBitOutput)
Specifies whether 8-bit characters sent from the
host should be accepted as is or stripped when
printed. The default is TRUE.
font (class Font)
Specifies the name of the normal font. The default
is fixed.
font1 (class Font1)
Specifies the name of the first alternate font.
font2 (class Font2)
Specifies the name of the second alternate font.
font3 (class Font3)
Specifies the name of the third alternate font.
font4 (class Font4)
Specifies the name of the fourth alternate font.
foreground (class Foreground)
Specifies the color to use for displaying text in
the window. Setting the class name instead of the
instance name is an easy way to have everything that
would normally appear in the text color change
color. The default is black.
geometry (class Geometry)
Specifies the preferred size and position of the
VT102 window.
internalBorder (class BorderWidth)
Specifies the number of pixels between the charac-
ters and the window border. The default is 2.
jumpScroll (class JumpScroll)
Specifies whether jump scroll should be used. The
default is TRUE.
logFile (class Logfile)
Specifies the name of the file to which a terminal
session is logged. The default filename is
XtermLog.n, where n is the process ID of xterm.
logging (class Logging)
Specifies whether a terminal session should be
logged. The default is FALSE.
16 November, 1990
xterm(1X) xterm(1X)
logInhibit (class LogInhibit)
Specifies whether terminal session logging should be
inhibited. The default is FALSE.
loginShell (class LoginShell)
Specifies whether the shell to be run in the window
should be started as a login shell. The default is
FALSE.
marginBell (class MarginBell)
Specifies whether the bell should be rung when the
user types near the right margin. The default is
FALSE.
multiClickTime (class MultiClickTime)
Specifies the maximum time in milliseconds between
multi-clock select events. The default is 250 mil-
liseconds.
multiScroll (class MultiScroll)
Specifies whether asynchronous scrolling is allowed.
The default is FALSE.
nMarginBell (class Column)
Specifies the number of characters from the right
margin at which the margin bell should be rung, when
enabled.
pointerColor (class Foreground)
Specifies the color of the pointer. The default is
XtDefaultForeground.
pointerColorBackground (class Background)
Specifies the background color of the pointer. The
default is XtDefaultBackground.
pointerShape (class Cursor)
Specifies the name of the shape of the pointer. The
default is xterm.
reverseVideo (class ReverseVideo)
Specifies whether reverse video should be simulated.
The default is FALSE.
reverseWrap (class ReverseWrap)
Specifies whether reverse wraparound should be en-
abled. The default is FALSE.
saveLines (class SaveLines)
Specifies the number of lines to save beyond the top
of the screen when a scroll bar is turned on. The
default is 64.
November, 1990 17
xterm(1X) xterm(1X)
scrollBar (class ScrollBar)
Specifies whether the scroll bar should be
displayed. The default is FALSE.
scrollInput (class ScrollCond)
Specifies whether output to the terminal should au-
tomatically cause the scroll bar to go to the bottom
of the scrolling region. The default is TRUE.
scrollKey (class ScrollCond)
Specifies whether pressing a key should automatical-
ly cause the scroll bar to go to the bottom of the
scrolling region. The default is FALSE.
scrollLines (class ScollLines)
Specifies the number of lines that the scroll-back
and scroll-forw actions should use as a default. See
``Actions'' later in the ``Description'' section.
The default value is 1.
scrollTtyOutput (class ScrollCond)
Specifies whether output to the terminal should au-
tomatically cause the scroll bar to go to the bottom
of the scrolling region. The default is TRUE.
signalInhibit (class SignalInhibit)
Specifies whether the items in the Main Options menu
for sending signals to xterm should be disallowed.
The default is FALSE.
tekGeometry (class Geometry)
Specifies the preferred size and position of the
Tektronix window.
tekInhibit (class TekInhibit)
Specifies whether Tektronix mode should be disal-
lowed. The default is FALSE.
tekSmall (class TekSmall)
Specifies whether the Tektronix mode window should
start in its smallest size if no explicit geometry
is given. This is useful when running xterm on
displays with small screens. The default is FALSE.
tekStartup (class TekStartup)
Specifies whether xterm should start up in Tektronix
mode. The default is FALSE.
titeInhibit (class TiteInhibit )
Specifies whether xterm should remove the ti or te
termcap entries (used to switch between alternate
screens on startup of many screen-oriented programs)
18 November, 1990
xterm(1X) xterm(1X)
from the TERMCAP string.
translations (class Translations )
Specifies the key and button bindings for menus,
selections, programmed strings, and others. See the
next section, ``Actions.''
visualBell (class VisualBell)
Specifies whether a visible bell (that is, flashing)
should be used instead of an audible bell when
CONTROL-G is received. The default is FALSE.
waitForMap (class WaitForMap)
Specifies whether xterm should wait for the initial
window map before starting the subprocess. The de-
fault is FALSE.
The following resources are specified as part of the tek4014
widget (class Tek4014):
font2 (class Font)
Specifies font number 2 to use in the Tektronix win-
dow.
font3 (class Font)
Specifies font number 3 to use in the Tektronix win-
dow.
fontLarge (class Font)
Specifies the large font to use in the Tektronix
window.
fontSmall (class Font)
Specifies the small font to use in the Tektronix
window.
height (class Height)
Specifies the height of the Tektronix window in pix-
els.
width (class Width)
Specifies the width of the Tektronix window in pix-
els.
The resources that may be specified for the various menus
are described under the SimpleMenu Widget in Chapter 4,
``Menus'' in Athena Widget Set -C Language Interface. The
name and class of the items in each menu are listed below.
The mainMenu widget uses the following resources:
securekbd (class SmeBSB)
November, 1990 19
xterm(1X) xterm(1X)
Invokes the secure() action.
allowsends (class SmeBSB)
Invokes the allow-send-events(toggle) action.
logging (class SmeBSB)
Invokes the set-logging(toggle) action.
redraw (class SmeBSB)
Invokes the redraw() action.
line1 (class SmeLine)
Acts as a separator.
suspend (class SmeBSB)
Invokes the send-signal(suspend) action on systems
that support job control.
continue (class SmeBSB)
Invokes the send-signal(cont) action on systems that
support job control.
interrupt (class SmeBSB)
Invokes the send-signal(int) action.
hangup (class SmeBSB)
Invokes the send-signal(hup) action.
terminate(class SmeBSB)
Invokes the send-signal(term) action.
kill (classSmeBSB)
Invokes the send-signal(kill) action.
line2 (class SmeLine)
Acts as a separator.
quit (class SmeBSB)
Invokes the quit() action.
The vtMenu widget uses the following resources:
scrollbar (class SmeBSB)
Invokes the set-scrollbar(toggle) action.
jumpscroll (class SmeBSB)
Invokes the set-jumpscroll(toggle) action.
reversevideo (class SmeBSB)
Invokes the set-reverse-video(toggle) action.
autowraparound (class SmeBSB)
20 November, 1990
xterm(1X) xterm(1X)
Invokes the set-autowrap(toggle) action.
reversewrap (class SmeBSB)
Invokes the set-reversewrap(toggle) action.
autolinefeed (class SmeBSB)
Invokes the set-autolinefeed(toggle) action.
appcursor (class SmeBSB)
Invokes the set-appcursor(toggle) action.
appkeypad (class SmeBSB)
Invokes the set-appkeypad(toggle) action.
scrollKey (class SmeBSB)
Invokes the set-scroll-on-key(toggle) action.
scrollttyoutput (class SmeBSB)
Invokes the
set-scroll-on-tty-output(toggle) action.
allow132 (class SmeBSB)
Invokes the set-allow132(toggle) action.
cursesemul (class SmeBSB)
Invokes the set-cursesemul(toggle) action.
visualbell (class SmeBSB)
Invokes the set-visualbell(toggle) action.
marginbell (class SmeBSB)
Invokes the set-marginbell(toggle) action.
altscreen (class SmeBSB)
Currently disabled.
line1 (class SmeLine)
Acts as a separator.
softreset (class SmeBSB)
Invokes the soft-reset() action.
hardreset (class SmeBSB)
Invokes the hard-reset() action.
line2 (class SmeLine)
Acts as a separator.
tekshow (class SmeBSB)
Invokes the set-visibility(tek,toggle) action.
tekmode (class SmeBSB)
November, 1990 21
xterm(1X) xterm(1X)
Invokes the set-terminal-type(tek) action.
vthide (class SmeBSB)
Invokes the set-visibility(vt,off) action.
The fontMenu widget uses the following resources:
fontdefault (class SmeBSB)
Invokes the set-vt-font(d) action.
font1 (class SmeBSB)
Invokes the set-vt-font(1) action.
font2 (class SmeBSB)
Invokes the set-vt-font(2) action.
font3 (class SmeBSB)
Invokes the set-vt-font(3) action.
font4 (class SmeBSB)
Invokes the set-vt-font(4) action.
fontescape (class SmeBSB)
Invokes the set-vt-font(e) action.
fontsel (class SmeBSB)
Invokes the set-vt-font(s) action.
The tekMenu widget uses the following resources:
tektextlarge (class SmeBSB)
Invokes the set-tek-text(large) action.
tektext2 (class SmeBSB)
Invokes the set-tek-text(2) action.
tektext3 (class SmeBSB)
Invokes the set-tek-text(3) action.
tektextsmall (class SmeBSB)
Invokes the set-tek-text(small) action.
line1 (class SmeLine)
Acts as a separator.
tekpage (class SmeBSB)
Invokes the tek-page() action.
tekreset (class SmeBSB)
Invokes the tek-reset() action.
tekcopy (class SmeBSB)
22 November, 1990
xterm(1X) xterm(1X)
Invokes the tek-copy() action.
line2 (class SmeLine)
Acts as a separator.
vtshow (class SmeBSB)
Invokes the set-visibility(vt,toggle) action.
vtmode (class SmeBSB)
Invokes the set-terminal-type(vt) action.
tekhide (class SmeBSB)
Invokes the set-visibility(tek,toggle) action.
The following resources are useful when specified for the
Athena Scrollbar widget:
background (class Background)
Specifies the color to use for the background of the
scroll bar.
foreground (class Foreground)
Specifies the color to use for the foreground of the
scroll bar. The thumb of the scroll bar is a simple
checkerboard pattern alternating pixels for fore-
ground and background color.
thickness (class Thickness)
Specifies in pixels the width of the scroll bar.
Actions
It is possible to rebind keys (or sequences of keys) to ar-
bitrary strings for input by changing the translations for
the vt100 or tek4014 widgets. Changing the translations for
events other than key and mouse button events is not expect-
ed and causes unpredictable behavior. The following actions
are provided for use within the vt100 or tek4014 transla-
tions resources:
allow-send-events(on | off | toggle)
Sets or toggles the allowSendEvents resource and is
also invoked by the Allow SendEvents item in the
Main Options menu.
bell([percent])
Rings the keyboard bell at the specified percentage
above or below the base volume.
hard-reset()
Resets the scrolling region, tabs, window size, and
cursor keys and clears the screen. It is also in-
voked from the Do Full Reset item in the VT Options
November, 1990 23
xterm(1X) xterm(1X)
menu.
ignore()
Ignores the event but checks for special pointer-
position escape sequences.
insert()
Acts as a synonym for insert-seven-bit().
insert-eight-bit().
Inserts the 8-bit ISO Latin-1 character or string
associated with the key that was pressed.
insert-selection(source [, ...])
Inserts the string found in the selection or cut
buffer indicated by source. Sources are checked in
the order given (case is significant) until one is
found. Commonly-used selections include: PRIMARY,
SECONDARY, and CLIPBOARD. Cut buffers are typically
named CUT_BUFFER0 through CUT_BUFFER7.
insert-seven-bit()
Inserts the 7-bit ASCII character or string associ-
ated with the key that was pressed.
keymap(name)
Dynamically defines a new translation table whose
resource name is name with the suffix Keymap (case
is significant). Using None as name restores the
original translation table.
popup-menu(menu)
Displays the specified pop-up menu. Valid names
(case is significant) include: mainMenu, vtMenu,
fontMenu, and tekMenu.
quit() Sends a SIGHUP to the subprogram and exits. It is
also invoked by the Quit item in the Main Options
menu.
redraw()
Redraws the window and is also invoked by the Redraw
Window item in the Main Options menu.
scroll-back(count [,units])
Scrolls the text window backward so that text that
had previously scrolled off the top of the screen is
now visible. The count argument indicates the
number of units (which may be page, halfpage, pixel,
or line) by which to scroll.
scroll-forw(count [,units])
24 November, 1990
xterm(1X) xterm(1X)
Similar to scroll-back except that it scrolls the
other direction.
secure()
Toggles the Secure Keyboard mode described earlier
in the ``Security'' section and is invoked by the
Secure Keyboard item in the Main Options menu.
select-cursor-end(destname [, ...])
Similar to select-end except that it should be used
with select-cursor-start.
select-cursor-start()
Similar to select-start except that it begins the
selection at the current text cursor position.
select-end(destname [, ...])
Puts the currently selected text into all of the
selections or cut buffers specified by destname.
select-extend()
Tracks the pointer and extends the selection. It
should only be bound to Motion events.
select-start()
Begins text selection at the current pointer loca-
tion. See ``Selecting and Copying Text'' earlier in
the ``Description'' section for information on mak-
ing selections.
send-signal(signame)
Sends the signal named by signame (which may also be
a number) to the xterm subprocess (the shell or pro-
gram specified with the -e command-line option) and
is also invoked by the Send STOP Signal, Send CONT
Signal, Send INT Signal, Send HUP Signal, Send TERM
Signal, and Send KILL Signal items in the Main Op-
tions menu. Allowable signal names are (case is not
significant): suspend, tstp (if supported by the
operating system), cont (if supported by the operat-
ing system), int, hup, term, and kill.
set-allow132(on | off | toggle)
Toggles the c132 resource and is also invoked by the
Allow 80/132 Column Switching item in the VT Options
menu.
set-altscreen(on | off | toggle)
Toggles between the alternative and current screens.
set-appcursor(on | off | toggle)
Toggles the handling of Application Cursor Key mode
November, 1990 25
xterm(1X) xterm(1X)
and is also invoked by the Enable Application Cursor
Keys item in the VT Options menu.
set-appkeypad(on | off | toggle)
Toggles the handling of Application Keypad mode and
is also invoked by the Enable Application Keypad
item in the VT Options menu.
set-autolinefeed(on | off | toggle)
Toggles automatic insertion of linefeeds and is also
invoked by the Enable Auto LineFeed item in the VT
Options menu.
set-autowrap(on | off | toggle)
Toggles automatic wrapping of long lines and is also
invoked by the Enable Auto Wraparound item in the VT
Options menu.
set-cursesemul(on | off | toggle)
Toggles the curses resource and is also invoked by
the Enable Curses Emulation item in the VT Options
menu.
set-jumpscroll(on | off | toggle)
Toggles the jumpscroll resource and is also invoked
by the Enable Jump Scroll item in the VT Options
menu.
set-logging(on | off | toggle)
Toggles the logging resource and is also invoked by
the Log to File item in the Main Options menu.
set-marginbell(on | off | toggle)
Toggles the marginBell resource and is also invoked
from the Enable Margin Bell item in the VT Options
menu.
set-reverse-video(on | off | toggle)
Toggles the reverseVideo resource and is also in-
voked by the Enable Reverse Video item in the VT Op-
tions menu.
set-reversewrap(on | off | toggle)
Toggles the reverseWrap resource and is also invoked
by the Enable Reverse Wraparound item in the VT Op-
tions menu.
set-scrollbar(on | off | toggle)
Toggles the scrollbar resource and is also invoked
by the Enable Scrollbar item in the VT Options menu.
set-scroll-on-key(on | off | toggle)
26 November, 1990
xterm(1X) xterm(1X)
Toggles the scrollKey resource and is also invoked
from the Scroll to Bottom on Key Press item in the
VT Options menu.
set-scroll-on-tty-output(on | off | toggle)
Toggles the scrollTtyOutput resource and is also in-
voked by the Scroll to Bottom on Tty Output item in
the VT Options menu.
set-tek-text(large | 2 | 3 | small)
Sets the font used in the Tektronix window to the
value of the resources tektextlarge, tektext2,
tektext3, and tektextsmall according to the argu-
ment. It is also invoked by the Large Characters,
#2 Size Characters, #3 Size Characters, and Small
Characters items in the Tek Options menu.
set-terminal-type(type)
Directs output to either the VT or Tek windows, ac-
cording to type. It is also invoked by the Switch
to Tek Mode item in the VT Options menu and the
Switch to VT Mode item in the Tek Options menu.
set-visibility(vt | tek,on | off | toggle)
Controls whether the vt or tek windows are visible.
It is also invoked by the Show Tek Window and Hide
VT Window items in the VT Options menu and the Show
VT Window and Hide Tek Window items in the Tek Op-
tions menu.
set-visual-bell(on | off | toggle)
Toggles the visualBell resource and is also invoked
by the Enable Visual Bell item in the VT Options
menu.
set-vt-font(d | 1 | 2 | 3 | 4 | e | s
[,normalfont [, boldfont]])
Sets the font or fonts currently being used in the
VT102 window. The first argument is a single char-
acter that specifies the font to be used: d or D in-
dicate the default font (the font initially used
when xterm was started), 1 through 4 indicate the
fonts specified by the font1 through font4
resources, e or E indicate the normal and bold fonts
that may be set through escape codes (or specified
as the second and third action arguments, respec-
tively), and i or I indicate the font selection (for
example, as made by xfontsel(1)) indicated by the
second action argument.
soft-reset()
Resets the scrolling region and is also invoked by
November, 1990 27
xterm(1X) xterm(1X)
the Do Soft Reset item in the VT Options menu.
start-cursor-extend()
Similar to select-extend except that the selection
is extended to the current text cursor position.
start-extend()
Similar to select-start except that the selection is
extended to the current pointer location.
string(string)
Inserts the specified text string as if it had been
typed. Quotation is necessary if the string con-
tains white space or nonalphanumeric characters. If
the string argument begins with the characters 0x,
it is interpreted as a hexadecimal character con-
stant.
tek-copy()
Copies the escape codes used to generate the current
window contents to a file in the current directory
beginning with the name COPY. It is also invoked
from the COPY item in the Tek Options menu.
tek-page()
Clears the Tektronix window and is also invoked by
the PAGE item in the Tek Options menu.
tek-reset()
Resets the Tektronix window and is also invoked by
the RESET item in the Tek Options menu.
The Tektronix window also has the following action:
gin-press(l | L | M | r | R)
Sends the indicated graphics input code.
The default bindings in the VT102 window are listed below.
r
On a Macintosh , you can use the COMMAND key or the UP ARROW
key for the Meta key.
SHIFT <KeyPress> Prior:
scroll-back(1,halfpage) \n\
SHIFT <KeyPress> Next:
scroll-forw(1,halfpage) \n\
SHIFT <KeyPress> Select:
select-cursor-start() \
select-cursor-end(PRIMARY, \
CUT_BUFFER0) \n\
28 November, 1990
xterm(1X) xterm(1X)
SHIFT <KeyPress> Insert:
insert-selection(PRIMARY, \
CUT_BUFFER0) \n\
~Meta<KeyPress>:
insert-seven-bit() \n\
Meta<KeyPress>:
insert-eight-bit() \n\
CONTR0L ~Meta<Btn1Down>:
popup-menu(mainMenu) \n\
~Meta <Btn1Down>:
select-start() \n\
~Meta <Btn1Motion>:
select-extend() \n\
CONTR0L ~Meta <Btn2Down>:
popup-menu(vtMenu) \n\
~CONTR0L ~Meta <Btn2Down>:
ignore() \n\
~CONTR0L ~Meta <Btn2Up>:
insert-selection(PRIMARY, \
CUT_BUFFER0) \n\
CONTR0L ~Meta <Btn3Down>:
popup-menu(fontMenu) \n\
~CONTR0L ~Meta <Btn3Down>:
start-extend() \n\
~Meta <Btn3Motion>:
select-extend() \n\
~CONTR0L ~Meta <BtnUp>:
select-end(PRIMARY, CUT_BUFFER0) \n\
<BtnDown>:
bell(0)
The default bindings in the Tektronix window are listed
below. On a Macintosh, you can use is the COMMAND key or the
UP ARROW key for the Meta key.
~Meta<KeyPress>:
insert-seven-bit() \n\
Meta<KeyPress>:
November, 1990 29
xterm(1X) xterm(1X)
insert-eight-bit()\n\
CONTR0L ~Meta<Btn1Down>:
popup-menu(mainMenu) \n\
CONTR0L ~Meta <Btn2Down>:
popup-menu(tekMenu) \n\
SHIFT ~Meta<Btn1Down>:
gin-press(L) \n\
~Meta<Btn1Down>:
gin-press(l) \n\
SHIFT ~Meta<Btn2Down>:
gin-press(M) \n\
~Meta<Btn2Down>:
gin-press(m) \n\
SHIFT ~Meta<Btn3Down>:
gin-press(R) \n\
~Meta<Btn3Down>:
gin-press(r)
Below is a sample how of the keymap() action is used to add
special keys for entering commonly typed works:
*VT100.Translations: #override <Key>F13: keymap(dbx)
*VT100.dbxKeymap.translations: \
<Key>F14: keymap(None) \n\
<Key>F17: string("next") string(0x0d) \n\
<Key>F18: string("step") string(0x0d) \n\
<Key>F19: string("continue") string(0x0d) \n\
<Key>F20: string("print ") insert-selection(PRIMARY, CUT_BUFFER0)
Environment variables
The xterm client application uses these environment vari-
ables:
DISPLAY Specifies the default host, display number, and
screen.
TERM Specifies the terminal type.
TERMCAP Specifies the terminal capabilities file or string.
WINDOWID
Specifies the X window ID number of the xterm win-
dow.
30 November, 1990
xterm(1X) xterm(1X)
LIMITATIONS
The Xterm Control Sequences document has yet to be converted
from X10. The old version, along with a first stab at an
update, are available in /usr/lib/X11/XTerm_ctlseq.
The class name is XTerm instead of Xterm.
If you try to paste too much text at one time, xterm hangs
forever. It is both producer and consumer for the pty and
can deadlock.
Variable-width fonts are not handled.
The xterm client still needs to be rewritten. It should be
split into very modular sections, with the various emulators
being completely separate widgets that don't know about each
other. Ideally, you'd like to be able to pick and choose
emulator widgets and stick them into a single control widg-
et.
The focus is considered lost if some other client (for exam-
ple, the window manager) grabs the pointer; it is difficult
to do better without an addition to the protocol.
There needs to be a dialog box to allow entry of the log
filename and the COPY filename.
Many of the options are not resettable after xterm starts.
The Tek widget does not support key and button rebinding.
NOTES
Copyright 1989, Massachusetts Institute of Technology.
See X(1X) for a full statement of rights and permissions.
Authors: Loretta Guarino Reid, DEC-UEG-WSL; Joel McCormack,
DEC-UEG-WSL; Terry Weissman, DEC-UEG-WSL; Edward Moy,
University of California, Berkeley; Ralph R. Swick, MIT-
Athena; Mark Vandevoorde, MIT-Athena; Bob McNamara, DEC-MAD;
Jim Gettys, MIT-Athena; Bob Scheifler, MIT X Consortium;
Doug Mink, SAO; Steve Pitschke, Stellar; Ron Newman, MIT-
Athena; Jim Fulton, MIT X Consortium; Dave Serisky, Hewlett
Packard; and others
SEE ALSO
resize(1X), X(1X)
stty(1) in A/UX Command Reference
termcap(4) in A/UX Programmer's Reference
November, 1990 31
pty(7), tty(7) in A/UX System Administrator's Reference
Athena Widget Set - C Language Interface
XTerm Control Sequences in /usr/lib/X11/XTerm_ctlseq
32 November, 1990