「XTerm支持的命令行选项及含义」

  LINUX MANUAL PAGES

The xterm terminal emulator accepts the standard X Toolkit command line options as well as many
application-specific options. If the option begins with a `+’ instead of a `-‘, the option is
restored to its default value.

-version

This causes xterm to print a version number to the standard output, and then exit.

-help This causes xterm to print out a verbose message describing its options, one per line. The

message is written to the standard output. After printing the message, xterm exits. Xterm

generates this message, sorting it and noting whether a “-option” or a “+option” turns the

feature on or off, since some features historically have been one or the other. Xterm

generates a concise help message (multiple options per line) when an unknown option is used,

e.g.,

xterm -z

If the logic for a particular option such as logging is not compiled into xterm, the help text

for that option also is not displayed by the -help option.

Most of the xterm options are actually parsed by the X Toolkit, which sets resource values. Xterm
provides the X Toolkit with a table of options. A few of these are marked, telling the X Toolkit to
ignore them (-help, -version, -class, -e, and -into). After the X Toolkit has parsed the command-line
parameters, it removes those which it handles, leaving the specially-marked parameters for xterm to
handle.

The -version and -help options are interpreted even if xterm cannot open the display, and are useful
for testing and configuration scripts. Along with -class, they are checked before other options. To
do this, xterm has its own (much simpler) argument parser, along with a table of the X Toolkit’s
built-in list of options.

Relying upon the X Toolkit to parse the options and associated values has the advantages of simplicity
and good integration with the X resource mechanism. There are a few drawbacks

· Xterm cannot tell easily whether a resource value was set by one of the external resource- or
application-defaults files, or if it was set through the -xrm option or via some directly relevant
command-line option. Xterm sees only the end-result: a value supplied when creating its widgets.

· Xterm does not know the order in which particular options and items in resource files are
evaluated. Rather, it sees all of the values for a given widget at the same time. In the design
of these options, some are deemed more important, and can override other options.

The X Toolkit uses patterns (constants and wildcards) to match resources. Once a particular
pattern has been used, it will not modify it. To override a given setting, a more-specific
pattern must be used, e.g., replacing “*” with “.”. Some poorly-designed resource files are too
specific to allow the command-line options to affect the relevant widget values.

· In a few cases, the X Toolkit combines its standard options in ways which do not work well with
xterm. This happens with the color (-fg, -bg) and reverse (-rv) options. Xterm makes a special
case of these and adjusts its sense of “reverse” to lessen user surprise.

One parameter (after all options) may be given. That overrides xterm’s built-in choice of shell
program:

· If the parameter is not a relative path, i.e., beginning with “./” or “../”, xterm looks for the
file in the user’s PATH. In either case, this check fails if xterm cannot construct an absolute
path.

· If that check fails (or if no such parameter is given), xterm next checks the “SHELL” variable.
If that specifies an executable file, xterm will attempt to start that. However, xterm
additionally checks if it is a valid shell, and will unset “SHELL” if it is not.

· If “SHELL” is not set to an executable file, xterm tries to use the shell program specified in the
user’s password file entry. As before, xterm verifies if this is a valid shell.

· Finally, if the password file entry does not specify a valid shell, xterm uses /bin/sh.

The -e option cannot be used with this parameter since it uses all parameters following the option.

Xterm validates shell programs by finding their pathname in the text file /etc/shells. It treats the
environment variable “SHELL” specially because (like “TERM”), xterm both reads and updates the
variable, and because the program started by xterm is not necessarily a shell.

用于控制外观和行为的选项

Not all options are necessarily configured into your copy of xterm:

-132 Normally, the VT102 DECCOLM escape sequence that switches between 80 and 132 column mode is

ignored. This option causes the DECCOLM escape sequence to be recognized, and the xterm

window will resize appropriately.

-ah This option indicates that xterm should always highlight the text cursor. By default, xterm

will display a hollow text cursor whenever the focus is lost or the pointer leaves the window.

+ah This option indicates that xterm should do text cursor highlighting based on focus.

-ai This option disables active icon support if that feature was compiled into xterm. This is

equivalent to setting the vt100 resource activeIcon to “false”.

+ai This option enables active icon support if that feature was compiled into xterm. This is

equivalent to setting the vt100 resource activeIcon to “true”.

-aw This option indicates that auto-wraparound should be allowed, and is equivalent to setting the

vt100 resource autoWrap to “false”.

Auto-wraparound allows the cursor to automatically wrap to the beginning of the next line when

it is at the rightmost position of a line and text is output.

+aw This option indicates that auto-wraparound should not be allowed, and is equivalent to setting

the vt100 resource autoWrap to “false”.

-b number

This option specifies the size of the inner border (the distance between the outer edge of the

characters and the window border) in pixels. That is the vt100 internalBorder resource. The

default is “2”.

-baudrate number

Set the line-speed, used to test the behavior of applications that use the line-speed when

optimizing their output to the screen. The default is “38400”.

+bc turn off text cursor blinking. This overrides the cursorBlink resource.

-bc turn on text cursor blinking. This overrides the cursorBlink resource.

-bcf milliseconds

set the amount of time text cursor is off when blinking via the cursorOffTime resource.

-bcn milliseconds

set the amount of time text cursor is on when blinking via the cursorOnTime resource.

-bdc Set the vt100 resource colorBDMode to “false”, disabling the display of characters with bold

attribute as color.

+bdc Set the vt100 resource colorBDMode to “true”, enabling the display of characters with bold

attribute as color rather than bold.

-cb Set the vt100 resource cutToBeginningOfLine to “false”.

+cb Set the vt100 resource cutToBeginningOfLine to “true”.

-cc characterclassrange:value[,…]

This sets classes indicated by the given ranges for using in selecting by words (see CHARACTER

CLASSES and the charClass resource).

-cjk_width

Set the cjkWidth resource to “true”. When turned on, characters with East Asian Ambiguous (A)

category in UTR 11 have a column width of 2. Otherwise, they have a column width of 1. This

may be useful for some legacy CJK text terminal-based programs assuming box drawings and

others to have a column width of 2. It also should be turned on when you specify a TrueType

CJK double-width (bi-width/monospace) font either with -fa at the command line or faceName

resource. The default is “false”

+cjk_width

Reset the cjkWidth resource.

-class string

This option allows you to override xterm’s resource class. Normally it is “XTerm”, but can be

set to another class such as “UXTerm” to override selected resources.

-cm This option disables recognition of ANSI color-change escape sequences. It sets the colorMode

resource to “false”.

+cm This option enables recognition of ANSI color-change escape sequences. This is the same as

the vt100 resource colorMode.

-cn This option indicates that newlines should not be cut in line-mode selections. It sets the

cutNewline resource to “false”.

+cn This option indicates that newlines should be cut in line-mode selections. It sets the

cutNewline resource to “true”.

-cr color

This option specifies the color to use for text cursor. The default is to use the same

foreground color that is used for text. It sets the cursorColor resource according to the

parameter.

-cu This option indicates that xterm should work around a bug in the more(1) program that causes

it to incorrectly display lines that are exactly the width of the window and are followed by a

line beginning with a tab (the leading tabs are not displayed). This option is so named

because it was originally thought to be a bug in the curses(3x) cursor motion package.

+cu This option indicates that xterm should not work around the more(1) bug mentioned above.

-dc This option disables the escape sequence to change dynamic colors: the vt100 foreground and

background colors, its text cursor color, the pointer cursor foreground and background colors,

the Tektronix emulator foreground and background colors, its text cursor color and highlight

color. The option sets the dynamicColors option to “false”.

+dc This option enables the escape sequence to change dynamic colors. The option sets the

dynamicColors option to “true”.

-e program [ arguments … ]

This option specifies the program (and its command line arguments) to be run in the xterm

window. It also sets the window title and icon name to be the basename of the program being

executed if neither -T nor -n are given on the command line.

NOTE: This must be the last option on the command line.

-en encoding

This option determines the encoding on which xterm runs. It sets the locale resource.

Encodings other than UTF-8 are supported by using luit. The -lc option should be used instead

of -en for systems with locale support.

-fb font

This option specifies a font to be used when displaying bold text. It sets the boldFont

resource.

This font must be the same height and width as the normal font, otherwise it is ignored. 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.

See also the discussion of boldMode and alwaysBoldMode resources.

-fa pattern

This option sets the pattern for fonts selected from the FreeType library if support for that

library was compiled into xterm. This corresponds to the faceName resource. When a CJK

double-width font is specified, you also need to turn on the cjkWidth resource.

See also the renderFont resource, which combines with this to determine whether FreeType fonts

are initially active.

-fbb This option indicates that xterm should compare normal and bold fonts bounding boxes to ensure

they are compatible. It sets the freeBoldBox resource to “false”.

+fbb This option indicates that xterm should not compare normal and bold fonts bounding boxes to

ensure they are compatible. It sets the freeBoldBox resource to “true”.

-fbx This option indicates that xterm should not assume that the normal and bold fonts have VT100

line-drawing characters. If any are missing, xterm will draw the characters directly. It

sets the forceBoxChars resource to “false”.

+fbx This option indicates that xterm should assume that the normal and bold fonts have VT100 line-

drawing characters. It sets the forceBoxChars resource to “true”.

-fd pattern

This option sets the pattern for double-width fonts selected from the FreeType library if

support for that library was compiled into xterm. This corresponds to the faceNameDoublesize

resource.

-fi font

This option sets the font for active icons if that feature was compiled into xterm.

See also the discussion of the iconFont resource.

-fs size

This option sets the pointsize for fonts selected from the FreeType library if support for

that library was compiled into xterm. This corresponds to the faceSize resource.

-fullscreen

This option indicates that xterm should ask the window manager to let it use the full-screen

for display, e.g., without window decorations. It sets the fullscreen resource to “true”.

+fullscreen

This option indicates that xterm should not ask the window manager to let it use the full-

screen for display. It sets the fullscreen resource to “false”.

-fw font

This option specifies the font to be used for displaying wide text. By default, it will

attempt to use a font twice as wide as the font that will be used to draw normal text. If no

double-width font is found, it will improvise, by stretching the normal font. This

corresponds to the wideFont resource.

-fwb font

This option specifies the font to be used for displaying bold wide text. By default, it will

attempt to use a font twice as wide as the font that will be used to draw bold text. If no

double-width font is found, it will improvise, by stretching the bold font. This corresponds

to the wideBoldFont resource.

-fx font

This option specifies the font to be used for displaying the preedit string in the

“OverTheSpot” input method.

See also the discussion of the ximFont resource.

-hc color

(see -selbg).

-hf This option indicates that HP function key escape codes should be generated for function keys.

It sets the hpFunctionKeys resource to “true”.

+hf This option indicates that HP function key escape codes should not be generated for function

keys. It sets the hpFunctionKeys resource to “false”.

-hm Tells xterm to use highlightTextColor and highlightColor to override the reversed

foreground/background colors in a selection. It sets the highlightColorMode resource to

“true”.

+hm Tells xterm not to use highlightTextColor and highlightColor to override the reversed

foreground/background colors in a selection. It sets the highlightColorMode resource to

“false”.

-hold Turn on the hold resource, i.e., xterm will not immediately destroy its window when the shell

command completes. It will wait until you use the window manager to destroy/kill the window,

or if you use the menu entries that send a signal, e.g., HUP or KILL.

+hold Turn off the hold resource, i.e., xterm will immediately destroy its window when the shell

command completes.

-ie Turn on the ptyInitialErase resource, i.e., use the pseudo-terminal’s sense of the stty erase

value.

+ie Turn off the ptyInitialErase resource, i.e., set the stty erase value using the kb string from

the termcap entry as a reference, if available.

-im Turn on the useInsertMode resource, which forces use of insert mode by adding appropriate

entries to the TERMCAP environment variable. (This option is ignored on most systems, because

TERMCAP is not used).

+im Turn off the useInsertMode resource.

-into windowId

Given an X window identifier (an integer, which can be hexadecimal, octal or decimal according

to whether it begins with “0x”, “0” or neither), xterm will reparent its top-level shell

widget to that window. This is used to embed xterm within other applications.

For instance, there are scripts for Tcl/Tk and Gtk which can be used to demonstrate the

feature. When using Gtk, there is a limitation of that toolkit which requires that xterm’s

allowSendEvents resource is enabled.

-itc Set the vt100 resource colorITMode to “false”, disabling the display of characters with italic

attribute as color.

+itc Set the vt100 resource colorITMode to “true”, enabling the display of characters with italic

attribute as color rather than italic.

-j This option indicates that xterm should do jump scrolling. It corresponds to the jumpScroll

resource. Normally, text is scrolled one line at a time; this option allows xterm to move

multiple lines at a time so that it does not fall as far behind. Its use is strongly

recommended since it makes xterm much faster when scanning through large amounts of text. The

VT100 escape sequences for enabling and disabling smooth scroll as well as the VT Options menu

can be used to turn this feature on or off.

+j This option indicates that xterm should not do jump scrolling.

-k8 This option sets the allowC1Printable resource. When allowC1Printable is set, xterm overrides

the mapping of C1 control characters (code 128-159) to treat them as printable.

+k8 This option resets the allowC1Printable resource.

-kt keyboardtype

This option sets the keyboardType resource. Possible values include: “unknown”, “default”,

“legacy”, “hp”, “sco”, “sun”, “tcap” and “vt220”.

The value “unknown”, causes the corresponding resource to be ignored.

The value “default”, suppresses the associated resources

hpFunctionKeys,

scoFunctionKeys,

sunFunctionKeys,

tcapFunctionKeys,

oldXtermFKeys and

sunKeyboard,

using the Sun/PC keyboard layout.

-l Turn logging on, unless disabled by the logInhibit resource.

Some versions of xterm may have logging enabled. However, normally logging is not supported,

due to security concerns in the early 1990s. That was a problem in X11R4 xterm (1989) which

was addressed by a patch to X11R5 late in 1993. X11R6 included these fixes. The older

version (when running with root privilege) would create the log-file using root privilege.

The reason why xterm ran with root privileges was to open pseudo-terminals. Those privileges

are now needed only on very old systems: Unix98 pseudo-terminals made the BSD scheme

unnecessary.

Unless overridden by the -lf option or the logFile resource:

· The logfile is written to the directory from which xterm is invoked.

· The filename is generated, of the form

XtermLog.XXXXXX

or

Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX

depending on how xterm was built.

+l Turn logging off.

-lc Turn on support of various encodings according to the users’ locale setting, i.e., LC_ALL,

LC_CTYPE, or LANG environment variables. This is achieved by turning on UTF-8 mode and by

invoking luit for conversion between locale encodings and UTF-8. (luit is not invoked in

UTF-8 locales.) This corresponds to the locale resource.

The actual list of encodings which are supported is determined by luit. Consult the luit

manual page for further details.

See also the discussion of the -u8 option which supports UTF-8 locales.

+lc Turn off support of automatic selection of locale encodings. Conventional 8bit mode or, in

UTF-8 locales or with -u8 option, UTF-8 mode will be used.

-lcc path

File name for the encoding converter from/to locale encodings and UTF-8 which is used with -lc

option or locale resource. This corresponds to the localeFilter resource.

-leftbar

Force scrollbar to the left side of VT100 screen. This is the default, unless you have set

the rightScrollBar resource.

-lf filename

Specify the log-filename. This sets the logFile resource. See the -l option.

-ls This option indicates that the shell that is started in the xterm window will be a login shell

(i.e., the first character of argv[0] will be a dash, indicating to the shell that it should

read the user’s .login or .profile).

The -ls flag and the loginShell resource are ignored if -e is also given, because xterm does

not know how to make the shell start the given command after whatever it does when it is a

login shell – the user’s shell of choice need not be a Bourne shell after all. Also, xterm -e

is supposed to provide a consistent functionality for other applications that need to start

text-mode programs in a window, and if loginShell were not ignored, the result of ~/.profile

might interfere with that.

If you do want the effect of -ls and -e simultaneously, you may get away with something like

xterm -e /bin/bash -l -c “my command here”

Finally, -ls is not completely ignored, because xterm -ls -e does write a /var/log/wtmp entry

(if configured to do so), whereas xterm -e does not.

-maximized

This option indicates that xterm should ask the window manager to maximize its layout on

startup. This corresponds to the maximized resource.

Maximizing is not the reverse of iconifying; it is possible to do both with certain window

managers.

+maximized

This option indicates that xterm should ask the window manager to not maximize its layout on

startup.

+ls This option indicates that the shell that is started should not be a login shell (i.e., it

will be a normal “subshell”).

-mb This option indicates that xterm should ring a margin bell when the user types near the right

end of a line.

+mb This option indicates that margin bell should not be rung.

-mc milliseconds

This option specifies the maximum time between multi-click selections.

-mesg Turn off the messages resource, i.e., disallow write access to the terminal.

+mesg Turn on the messages resource, i.e., allow write access to the terminal.

-mk_width

Set the mkWidth resource to “true”. This makes xterm use a built-in version of the wide-

character width calculation. The default is “false”

+mk_width

Reset the mkWidth resource.

-ms color

This option specifies the color to be used for the pointer cursor. The default is to use the

foreground color. This sets the pointerColor resource.

-nb number

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”.

-nul This option disables the display of underlining.

+nul This option enables the display of underlining.

-pc This option enables the PC-style use of bold colors (see boldColors resource).

+pc This option disables the PC-style use of bold colors.

-pob This option indicates that the window should be raised whenever a Control-G is received.

+pob This option indicates that the window should not be raised whenever a Control-G is received.

-report-colors

Print a report to the standard output showing information about colors as xterm allocates

them. This corresponds to the reportColors resource.

-report-fonts

Print a report to the standard output showing information about fonts which are loaded. This

corresponds to the reportFonts resource.

-rightbar

Force scrollbar to the right side of VT100 screen.

-rvc This option disables the display of characters with reverse attribute as color.

+rvc This option enables the display of characters with reverse attribute as color.

-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 is very useful for editing long shell command lines and is encouraged. This option can

be turned on and off from the VT Options menu.

+rw This option indicates that reverse-wraparound should not be allowed.

-s This option indicates that xterm may 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 across a very large

internet or many gateways.

+s This option indicates that xterm should scroll synchronously.

-samename

Does not send title and icon name change requests when the request would have no effect: the

name is not changed. This has the advantage of preventing flicker and the disadvantage of

requiring an extra round trip to the server to find out the previous value. In practice this

should never be a problem.

+samename

Always send title and icon name change requests.

-sb This option indicates that some number of lines that are scrolled off the top of the window

should be saved and that a scrollbar should be displayed so that those lines can be viewed.

This option may be turned on and off from the VT Options menu.

+sb This option indicates that a scrollbar should not be displayed.

-selbg color

This option specifies the color to use for the background of selected text. If not specified,

reverse video is used. See the discussion of the highlightColor resource.

-selfg color

This option specifies the color to use for selected text. If not specified, reverse video is

used. See the discussion of the highlightTextColor resource.

-sf This option indicates that Sun function key escape codes should be generated for function

keys.

+sf This option indicates that the standard escape codes should be generated for function keys.

-sh number

scale line-height values by the given number. See the discussion of the scaleHeight resource.

-si This option indicates that output to a window should not automatically reposition the screen

to the bottom of the scrolling region. This option can be turned on and off from the VT

Options menu.

+si This option indicates that output to a window should cause it to scroll to the bottom.

-sk This option indicates that pressing a key while using the scrollbar 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 This option indicates that pressing a key while using the scrollbar should not cause the

window to be repositioned.

-sl number

This option specifies the number of lines to save that have been scrolled off the top of the

screen. This corresponds to the saveLines resource. The default is “64”.

-sm This option, corresponding to the sessionMgt resource, indicates that xterm should set up

session manager callbacks.

+sm This option indicates that xterm should not set up session manager callbacks.

-sp This option indicates that Sun/PC keyboard should be assumed, providing mapping for keypad “+”

to “,”, and CTRL-F1 to F13, CTRL-F2 to F14, etc.

+sp This option indicates that the standard escape codes should be generated for keypad and

function keys.

-t This option indicates that xterm should start in Tektronix mode, rather than in VTxxx mode.

Switching between the two windows is done using the “Options” menus.

Terminal database (terminfo (5) or termcap (5)) entries that work with xterm are:

“tek4014”,

“tek4015”,

“tek4012”,

“tek4013”,

“tek4010”, and

“dumb”.

xterm automatically searches the terminal database in this order for these entries and then

sets the “TERM” and the “TERMCAP” environment variables.

+t This option indicates that xterm should start in VTxxx mode.

-tb This option, corresponding to the toolBar resource, indicates that xterm should display a

toolbar (or menubar) at the top of its window. The buttons in the toolbar correspond to the

popup menus, e.g., control/left/mouse for Main Options.

+tb This option indicates that xterm should not set up a toolbar.

-ti term_id

Specify the name used by xterm to select the correct response to terminal ID queries. It also

specifies the emulation level, used to determine the type of response to a DA control

sequence. Valid values include vt52, vt100, vt101, vt102, vt220, and vt240 (the “vt” is

optional). The default is “vt420”. The term_id argument specifies the terminal ID to use.

(This is the same as the decTerminalID resource).

-tm string

This option specifies a series of terminal setting keywords followed by the characters that

should be bound to those functions, similar to the stty program. The keywords and their

values are described in detail in the ttyModes resource.

-tn name

This option specifies the name of the terminal type to be set in the TERM environment

variable. It corresponds to the termName resource. This terminal type must exist in the

terminal database (termcap or terminfo, depending on how xterm is built) and should have li#

and co# entries. If the terminal type is not found, xterm uses the built-in list “xterm”,

“vt102”, etc.

-u8 This option sets the utf8 resource. When utf8 is set, xterm interprets incoming data as

UTF-8. This sets the wideChars resource as a side-effect, but the UTF-8 mode set by this

option prevents it from being turned off. If you must turn UTF-8 encoding on and off, use the

-wc option or the corresponding wideChars resource, rather than the -u8 option.

This option and the utf8 resource are overridden by the -lc and -en options and locale

resource. That is, if xterm has been compiled to support luit, and the locale resource is not

“false” this option is ignored. We recommend using the -lc option or the “locale: true”

resource in UTF-8 locales when your operating system supports locale, or -en UTF-8 option or

the “locale: UTF-8” resource when your operating system does not support locale.

+u8 This option resets the utf8 resource.

-uc This option makes the cursor underlined instead of a box.

+uc This option makes the cursor a box instead of underlined.

-ulc This option disables the display of characters with underline attribute as color rather than

with underlining.

+ulc This option enables the display of characters with underline attribute as color rather than

with underlining.

-ulit This option, corresponding to the italicULMode resource, disables the display of characters

with underline attribute as italics rather than with underlining.

+ulit This option, corresponding to the italicULMode resource, enables the display of characters

with underline attribute as italics rather than with underlining.

-ut This option indicates that xterm should not write a record into the the system utmp log file.

+ut This option indicates that xterm should write a record into the system utmp log file.

-vb This option 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 will be flashed.

+vb This option indicates that a visual bell should not be used.

-wc This option sets the wideChars resource.

When wideChars is set, xterm maintains internal structures for 16-bit characters. If xterm is

not started in UTF-8 mode (or if this resource is not set), initially it maintains those

structures to support 8-bit characters. Xterm can later be switched, using a menu entry or

control sequence, causing it to reallocate those structures to support 16-bit characters.

The default is “false”.

+wc This option resets the wideChars resource.

-wf This option indicates that xterm should wait for the window to be mapped the first time before

starting the subprocess 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 This option indicates that xterm should not wait before starting the subprocess.

-ziconbeep percent

Same as zIconBeep resource. If percent is non-zero, xterms that produce output while

iconified will cause an XBell sound at the given volume and have “***” prepended to their icon

titles. Most window managers will detect this change immediately, showing you which window

has the output. (A similar feature was in x10 xterm.)

-C This option indicates that this window should receive console output. This is not supported

on all systems. To obtain console output, you must be the owner of the console device, and

you must have read and write permission for it. If you are running X under xdm on the console

screen you may need to have the session startup and reset programs explicitly change the

ownership of the console device in order to get this option to work.

-Sccn This option allows xterm to be used as an input and output channel for an existing program and

is sometimes used in specialized applications. The option value specifies the last few

letters of the name of a pseudo-terminal to use in slave mode, plus the number of the

inherited file descriptor. If the option contains a “/” character, that delimits the

characters used for the pseudo-terminal name from the file descriptor. Otherwise, exactly two

characters are used from the option for the pseudo-terminal name, the remainder is the file

descriptor. Examples (the first two are equivalent since the descriptor follows the last

“/”):

-S/dev/pts/123/45

-S123/45

-Sab34

Note that xterm does not close any file descriptor which it did not open for its own use. It

is possible (though probably not portable) to have an application which passes an open file

descriptor down to xterm past the initialization or the -S option to a process running in the

xterm.

旧选项

The following command line arguments are provided for compatibility with older versions. They may not
be supported in the next release as the X Toolkit provides standard options that accomplish the same
task.

%geom This option specifies the preferred size and position of the Tektronix window. It is

shorthand for specifying the “tekGeometry” resource.

#geom This option specifies the preferred position of the icon window. It is shorthand for

specifying the “iconGeometry” resource.

-T string

This option specifies the title for xterm’s windows. It is equivalent to -title.

-n string

This option specifies the icon name for xterm’s windows. It is shorthand for specifying the

“iconName” resource. Note that this is not the same as the toolkit option -name. The default

icon name is the application name.

If no suitable icon is found, xterm provides a compiled-in pixmap.

-r This option indicates that reverse video should be simulated by swapping the foreground and

background colors. It is equivalent to -rv.

-w number

This option specifies the width in pixels of the border surrounding the window. It is

equivalent to -borderwidth or -bw.

关于X工具包选项

The following standard X Toolkit command line arguments are commonly used with xterm:

-bd color

This option specifies the color to use for the border of the window. The corresponding

resource name is borderColor. Xterm uses the X Toolkit default, which is

“XtDefaultForeground”.

-bg color

This option specifies the color to use for the background of the window. The corresponding

resource name is background. The default is “XtDefaultBackground”.

-bw number

This option specifies the width in pixels of the border surrounding the window.

This appears to be a legacy of older X releases. It sets the borderWidth resource of the

shell widget, and may provide advice to your window manager to set the thickness of the window

frame. Most window managers do not use this information. See the -b option, which controls

the inner border of the xterm window.

-display display

This option specifies the X server to contact; see X(7).

-fg color

This option specifies the color to use for displaying text. The corresponding resource name

is foreground. The default is “XtDefaultForeground”.

-fn font

This option specifies the font to be used for displaying normal text. The corresponding

resource name is font. The resource value default is fixed.

-font font

This is the same as -fn.

-geometry geometry

This option specifies the preferred size and position of the VTxxx window; see X(7).

The normal geometry specification can be suffixed with @ followed by a Xinerama screen

specification; it can be either g for the global screen (default), c for the current screen or

a screen number.

-iconic

This option indicates that xterm should ask the window manager to start it as an icon rather

than as the normal window. The corresponding resource name is iconic.

-name name

This option specifies the application name under which resources are to be obtained, rather

than the default executable file name. Name should not contain “.” or “*” characters.

-rv This option indicates that reverse video should be simulated by swapping the foreground and

background colors. The corresponding resource name is reverseVideo.

+rv Disable the simulation of reverse video by swapping foreground and background colors.

-title string

This option specifies the window title 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 application name.

-xrm resourcestring

This option specifies a resource string to be used. This is especially useful for setting

resources that do not have separate command line options.