'\"macro stdmacro
.if n .pH g1.xterm @(#)xterm	40.3 of 1/9/90
.nr X
.if \nX=0 .ds x} XTERM 1 "9/1/88" "X\s-2WIN\s+2 3.0" "\&"
.if \nX=1 .ds x} XTERM 1 "9/1/88" "X\s-2WIN\s+2 3.0"
.if \nX=2 .ds x} XTERM 1 "" "\&"
.if \nX=3 .ds x} XTERM "" "" "\&"
.TH \*(x}
.tr ~
.IX applications supported, xterm
.IX \f2xterm\f1 command
.SH NAME
xterm \- terminal emulator for X
.SH SYNOPSIS
.B xterm
[-\f2toolkitoption\fP ...] [-option ...]
.SH DESCRIPTION
\f2xterm\fP is a terminal emulator designed specifically for use in
the OPEN LOOK Interface or
the X\s-2WIN \s+2Graphical Window System.  
It emulates the AT&T 6386 WGS system console. \f2xterm\fP also
supports most of the DEC VT102\(tm escape sequences. When running on a
color console, \f2xterm\fP honors the ANSI standard color escape
sequences.
Thus, curses-based
color applications can run under \f2xterm\f1.
.PP
Each invocation of \f2xterm\fP 
produces a separate
X window, in which terminal emulation is performed.  
This emulation
allows non-X applications to be run from within the X environment.
.PP
Although more than one X window may be displayed concurrently, only one
X window may accept keyboard input at a time.  The window which is 
currently accepting keyboard input is known as the "active"
window.  The \f2active\fP window is selected 
by using the SELECT
pointer button.
.SH OPTIONS
\f2xterm\fP 
accepts all of the following options:
.TP 8
.BI \-b " positive integer"
This option specifies the size of the inner border 
(the distance between
the outer edge of the characters and the window 
border) in pixels.  It can range between 3 and 40. The
default is 3.
.TP 8
.BI \-cr " color"
This option specifies the color to use for text cursor.  The default is
black.
.TP 8
.BI \-e " program \[arguments \.\.\.\]"
This option specifies the program (and its command line 
arguments) to be
run in the \f2xterm\fP window.  The default is 
to start the user's shell.
\f3This must be the last option on the command line.\fP
.TP 8
.BI \-fb " font"
This option specifies a font to be used when displaying bold text.
There is no default.
.br
\f3It is the user's responsibility to select a bold font with  
the same height and width as the normal font.\fP  
If only one of the
normal or bold fonts is specified, it will be used as the normal 
font and the bold font will be produced by overstriking this font.
.TP 8
.B \-j
This option indicates that \f2xterm\fP should use jump
scrolling. The default is jump scrolling is used.
.TP 8
.B \+j
This option indicates that \f2xterm\fP should not use jump
scrolling.
.TP 8
.B \-l
This option indicates that \f2xterm\fP should send all 
terminal output to
a log file as well as to the screen.  This option 
can be enabled or disabled
using the Xterm property window. The default is 
no logging.
.TP 8
.B \+l
This option indicates that \f2xterm\fP should not do logging.
.TP 8
.BI \-lf " filename"
This option specifies the name of the file to 
which the output log described
above is written.  If \f2file\fP 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 "\f3XtermLog.\f2XXXXX\f1" 
(where \f2XXXXX\fP
is the process id of the parent \f2xterm\fP process) 
and is created in the directory from which
\f2xterm\fP was started (or the user's 
home directory in the case of a
login window).  Note that logging can be done in only one 
window at a time.
.TP 8
.B \-ls
This option indicates that the shell that is started in the
\f2xterm\fP window be a login shell, i.e. the first character of
argv[0] will be a dash, indicating to a shell that it should read the
user's .login or .profile.
.TP 8
.B \-mb
This option indicates that \f2xterm\fP 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 Xterm property window. The default is off.
.TP 8
.B \+mb
This option indicates that margin bell should not be rung.
.TP 8
.B \-ms " color"
This option specifies the color to be used for the mouse pointer.
The default is black.
.TP 8
.BI \-nb " positive integer"
This option specifies the number of characters from the 
right end of a line
at which the margin bell, if enabled, will ring.  
The default is 10.
.TP 8
.B \-rw
This option 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 option can 
be turned on and off from
the Xterm property window. The default is off.  
Note that wraparound must be enabled for reverse wraparound to
work. 
.TP 8
.B \+rw
This option indicates that reverse-wraparound should not 
be allowed.
.TP 8
.B \-sb
This option brings Xterm up with a scrollbar.
.TP 8
.B \+sb
This option brings Xterm up without a scrollbar. The default
is with scrollbar.
.TP 8
.BI \-sl " positive integer"
This option specifies the number of lines to save 
that have been scrolled 
off the top of the screen.  The default is 64.
The maximum allowed is 256.
.TP 8
.B \-t
This option brings up \f2xterm\fP in Tektronix mode.
.TP 8
.B \-vb
This option indicates that a visual bell is preferred 
over an audible one.
Instead of ringing the terminal bell whenever a 
\f3<CNTRL>-G\f1 is received, the
window will be flashed.  The default is audible.
.TP 8
.B \+vb
This option indicates that a visual bell should not be used.
.sp
The following command line arguments are provided for compatibility 
reasons.  They may not be supported in the next release as the X 
Toolkit provides standard options that accomplish the same task.
.TP 8
.BI \-T " string"
This option specifies the title for \f2xterm\fP's windows.
It is equivalent to \f3-title\fP.  
The default name is \f2xterm\f1.
.TP 8
.BI \-n " string"
This option specifies the icon name for \f2xterm\fP's windows.
The default icon name is \f2xterm\f1.
.TP 8
.B \-r
This option indicates that reverse video should be 
simulated by swapping
the foreground and background colors.  It is equivalent to \f3-rv\fP.
The default is no reverse video.
.TP 8
.BI \-w " positive integer"
This option specifies the width in pixels of the 
border surrounding the window.
It is equivalent to \f3-bw\fP.  
It can range between 1 and 40.
The default width is one pixel.
.sp
The following standard X Toolkit command line arguments are 
commonly used 
with \f2xterm\fP:
.TP 8
.B \-bd \f2color\fP
This option specifies the color to use for the border of the window.
The default is "black."
.TP 8
.B \-bg \f2color\fP
This option specifies the color to use for 
the background of the window.  
The default is "white."
.TP 8
.B \-bw \f2 positive integer\fP
This option specifies the width in pixels of the 
border surrounding the window.
It is equivalent to \f3-w\fP.
The default width is one pixel.
.TP 8
.B \-fg \f2color\fP
This option specifies the color to use for displaying 
text.  The default is 
"black".
.TP 8
.B \-fn \f2font\fP
This option specifies the font to be used for 
displaying normal text.  The
default font is "fixed."  It is 6x13 and has no corresponding bold
font.  In all cases where there is no corresponding bold font,
the regular font is used in its place.
The fonts \f2xterm\fP supports are: fixed, 6x10, 
8x13, 8x13bold, and a14;
see /usr/X/lib/fonts for more fonts.
.TP 8
.B \-name \f2name\fP
This option specifies the application name under which 
resources are to be
obtained, rather than the default executable file name.
.TP 8
.B \-rv
This option indicates that reverse video will be 
affected by swapping
the foreground and background colors.  The default is 
no reverse video.
.TP 8
\f3-geometry~\f2geometry\fP
This option specifies the preferred size and position of 
the \f2xterm\fP
window in characters.
.TP 8
~
This argument is specified as \f3-geometry WxH\(+-X\(+-Y\f1, with
\f2W\f1 = width in columnar characters and 
\f2H\f1 = number of rows. \f2X\f1 and
\f2Y\f1 are always measured in pixels
with the upper left corner X pixels to 
the right and Y pixels below the
upper left corner of the screen (origin (0,0)).  
.TP 8
~
The maximum \f3H\f1 is 128 and maximum \f3W\f1 is 200. 
.TP 8
~
Note that if the window is larger than the screen, \f2xterm\fP
will automatically reduce its size to the size of the screen.
Also
note that \f2olwm\fP may modify geometry requests
if the resulting window is totally off-screen.
.TP 8
~
``WxH'' can be omitted
to obtain the default application size, or 
``+X+Y'' can be omitted
to obtain the default application position (which is 
usually then left up
to the window manager or user to choose).
The X and Y values may be negative to
position the window off the screen.  In addition, 
if minus signs are used
instead of plus signs (e.g. WxH-X-Y), 
then (X,Y) represents the location
of the lower right hand corner of the window 
relative to the lower right
hand corner of the screen.
.TP 8
.B \-display \f2display\fP
This option specifies the X server to contact; the default is
\f3unix:0\fP and specifies the console device.  
See \f2X(1)\fP.
.TP 8
.B \-xrm \f2resourcestring\fP
This option specifies a resource string to be used.  
This is especially
useful for setting resources that do not have separate 
command line options.
.TP 8
.B \-i
This option indicates that \f2xterm\fP should ask the Window Manager
to start it as an icon rather than as the normal window.
.SH "X DEFAULTS"
The program understands all of the core X Toolkit 
resource names and
classes as well as:
.TP 8
.B "name (\fPclass\f3 Name)"
Specifies the application name under which resources are to be
obtained, rather than the default executable file name.
.TP 8
.B "title (\fPclass\f3 Title)"
Specifies a string that will be displayed in the 
header of the window,
if the window manager is running.
.sp
The following resources are private to \f2xterm\f1.
.TP 8
.B "allowSendEvents (\fPclass\f3 AllowSendEvents)
Specifies whether or not synthetic key and button events
(generated using the X protocol SendEvent request) should be
interpreted or discarded. The default is "false," meaning that
they are discarded. Note that allowing such events creates a
very large security hole.
.TP 8
.B "font (\fPclass\f3 Font)"
Specifies the name of the normal font.  The default is "fixed."
See \f3\-fn\fP for other supported fonts and more information.
.TP 8
.B "boldFont (\fPclass\f3 Font)"
Specifies the name of the bold font.  There is no default.
.TP 8
.B "background (\fPclass\f3 Background)"
Specifies the color to use for the background of the 
window.  The default is 
"white."
.TP 8
.B "foreground (\fPclass\f3 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."
.TP 8
.B "cursorColor (\fPclass\f3 Foreground)"
Specifies the color to use for the text cursor.  
The default is "black."
.TP 8
.B "geometry (\fPclass\f3 Geometry)"
Specifies the preferred size and position of the VT102 window.
.TP 8
.B "iconName (\fPclass\f3IconName)"
Specifies the icon name for \f2xterm\fP window. See \f3-n\fP
option.
.TP 8
.B "internalBorder (\fPclass\f3 BorderWidth)"
Specifies the number of pixels between the characters and 
the window border.
The default is 3.
.TP 8
.B "jumpScroll (\fPclass\f3JumpScroll)"
Specifies if jump scrolling should be used. The default is
"true."
.TP 8
.B "logFile (\fPclass\f3 Logfile)"
Specifies the name of the file to which a 
terminal session is logged.  The
default is "\f3XtermLog.\f2XXXXX\f1" (where \f2XXXXX\fP
is the process id of the parent \f2xterm\fP process).
.TP 8
.B "logging (\fPclass\f3 Logging)"
Specifies whether or not a terminal session should be 
logged.  The default is
"false."
Note that logging can be done in only one window at a time.
.TP 8
.B "logInhibit (\fPclass\f3 LogInhibit)"
Specifies whether or not terminal session logging should be 
inhibited.  
The default is "false."
.TP 8
.B "loginShell (\fPclass\f3 LoginShell)"
Specifies whether or not the shell to be run 
in the window should be started
as a login shell.  The default is "false."
.TP 8
.B "marginBell (\fPclass\f3 MarginBell)"
Specifies whether or not the bell should be run 
when the user types near the
right margin.  The default is "false."
.TP 8
.B "nMarginBell (\fPclass\f3 Column)"
Specifies the number of characters from the right margin 
at which the margin
bell should be run, when enabled.  
The default is 10 characters from the end of the line.
.TP 8
.B "pointerColor (\fPclass\f3 Foreground)"
Specifies the color of the pointer.  The default is "black."
.TP 8
.B "reverseVideo (\fPclass\f3 ReverseVideo)"
Specifies whether or not reverse video should be 
affected.  The default is
"false."
.TP 8
.B "reverseWrap (\fPclass\f3 ReverseWrap)"
Specifies whether or not reverse-wraparound should be enabled.  
The default is "false."
.TP 8
.B "saveLines (\fPclass\f3 SaveLines)"
Specifies the number of lines to save beyond the 
top of the screen when a
scrollbar is turned on.  
The maximum is less than 256.
The default is 64.
.TP 8
.B "scrollBar (\fPclass\f3 ScrollBar)"
Specifies whether or not the scrollbar should be displayed.
The default is "false."
.TP 8
.B "signalInhibit (\fPclass \f3SignalInhibit\fP"
Specifies whether or not the entries in the "xterm X11" menu for
sending signals to \f2xterm\fP should be disallowed. The default is
"false."
.TP 8
.B tekInhibit (\fPclass \f3TekInhibit\fP)
Specifies whether or not Tektronix mode should be disallowed. The
default is "false."
.TP 8
.B tekStartup (\fPclass \f3TekStartup\fP)
Specifies whether or not \f2xterm\fP should start up in Tektronix 
mode. The
default is "false."
.TP 8
.B "visualBell (\fPclass\f3 VisualBell)"
Specifies whether or not a visible bell (i.e. 
flashing) should be used instead
of an audible bell when Control-G is received.  
The default is "off."
.sp
.SH TERMINAL EMULATION
\f2xterm\fP VT102 emulation is fairly complete but 
does not support the blinking
character attribute nor the double-wide and 
double-size character sets.
.SH SCROLLBAR
The scrollbar represents the position and amount of text 
currently displayed
in the window relative to the amount of text actually saved.
As more text is saved (up to the 
maximum), the elevator moves to the bottom
of the scrollbar.  
.PP
Pressing the \f3SELECT\f1 pointer button 
on the middle portion of the
elevator and moving the mouse cursor 
up or down results in scrolling up or down 
through the scrolling
region.  
.PP
Clicking \f3SELECT\f1 on the up or down 
arrow (at each end of
the elevator) moves the visible text
region up or down one line.  
.PP
Pressing \f3SELECT\f1 on the up or down arrow scrolls the visible text
region one line at the time until the \f3SELECT\f1 is released or the
margin of the text buffer is reached.
.PP
Clicking \f3SELECT\f1 on the top or bottom
box of the scrollbar moves the visible region to 
the top or bottom of the
text buffer.
.PP
Clicking \f3SELECT\f1 in the scroll region above 
or below the
elevator moves the
visible region one page up or down.
.SH MENUS
.PP
\f2xterm\fP has two menus which can be accessed by pressing or
clicking
the \f3MENU\f1 button while on the Xterm
window pane.
The Xterm menus contain 
commands which perform individual
\f2xterm\fP
functions. Choosing a button to select any of the entries on the menus 
activates the indicated functions. 
Notable entries in the command sections of the menus are the
.BR Interrupt ,
.BR Hangup ,
.B Terminate
and
.B Kill ,
which send the SIGINT, SIGHUP, SIGTERM and
SIGKILL signals, respectively, to the process group 
of the process running
under
.I xterm
(usually the shell).
The 
.BR Properties
entry on the Xterm menu causes a property window to display.
This property window
sets
various modes in the \f2xterm\fP emulation,
among them auto wraparound, auto linefeed, and reverse wrap.
.SH ENVIRONMENT
.PP
.I xterm
sets the environment variable TERM properly for the
type of display you are using.
.BR TERM=xterm 
on color displays and 
.BR TERM=xtermm 
on monochrome displays.
\f3Modifying corresponding terminfo 
entries will produce undesirable and 
irrevocable
damage to the X operating environment and require reinstallation 
of the
X package.  \fP
.I xterm
also uses and sets the environment
variable DISPLAY to specify which bitmap display terminal to use.
The environment variable WINDOWID is set to the X 
window id number
of the
.I xterm
window.
If you run applications which use TERMCAP, use
\f3TERMCAP=`infocmp -C`; export TERMCAP\fP whenever creating or 
resizing a window.
.SH "SEE ALSO"
X(1)
.SH CAVEATS
If a user invokes the UNIX System \f2exec
\fPcommand from an \f2xterm\fP window,
it is the \f2xterm\fP process which will
disappear.  This is correct behavior but most likely 
not desirable.
See \f2exec\fP SH(1) for more detail.

Applications which close \f2stdin\fP, 
\f2stdout\fP, and/or \f2stderr\fP may
produce unpredictable results and should be avoided. 

If the display is monochrome and options in 
an \f2.Xdefaults\fP file or on a command line specify background
and foreground colors that would produce black on black or
white on white, \f2xterm\fP provides a default of black on
white.

If the stty settings you use are not those used by
\f2xterm\fP, you may need to import your "stty" environment to
xterm; e.g. interrupt, erase, and kill characters. However,
caution should be used in the redefinition of these values.
\f2xterm\fP does not inherit stty settings set prior to
starting \f2xterm\fP.
.PP
You should not attempt to modify the terminfo entries xterm,
xtermm. This will preclude the mouse from working with FMLI
and require reinstallation of the AT&T X\s-2WIN\s+2 Graphical
Windowing System.
.PP
On the AT&T Intel-386 based product line, CONSEM can be set
for better performance, but this will provide a lesser degree
of console emulation support for certain ioctls (i.e. 
\f3CONSEM=yes; export CONSEM).
.PP
If you exec an application that creates its own window (such
as MS-DOS) and then try to change the input focus to the
\f2xterm\fP window which exec-ed the application, the next
attempt to input to 
that window will cause the \f2xterm\fP window and the exec-ed
process to die. This is due to the nature of exec (see
\f2exec(2)).\fP The recommendation is not to exec programs
like MS-DOS.
.SH BUGS
\f2xterm\fP may hang if you try 
to paste too much text at one time.
It is both producer and consumer for the pty 
and can deadlock.
Should \f2xterm\fP hang, 
the \f3<return><ctrl-Z><return>\fP sequence 
will return the prompt.
.PP
Variable-width fonts are not handled reasonably.
.PP
\f3<ctrl-BREAK>\fP does not work in an \f2xterm\fP window.
.PP
The \f3-w\fP option is not available for this release.
Instead, use the \f3-bw\fP option for the same function.
.PP
<Ctrl-G> (bell), <Ctrl-L> (vertical tab), and <Ctrl-k> (form
feed) are not available for use on 3B2s running UNIX SVR4.0. 
