XTERM(1)
๐ XTERM(1) ๐ โ the X Window System one, bestie
okay so we're doing xterm(1) today and honestly? iconic. it's from the X Window System manual, section 1. let's get into it ๐
โจ NAME โจ
xterm โ terminal emulator for X
๐ธ SYNOPSIS ๐ธ
xterm [-toolkitoption ...] [-option ...] [shell]
๐ฆ DESCRIPTION ๐ฆ
So the xterm program is a terminal emulator for the X Window System. It gives you DEC VT102/VT220 plus selected features from the higher-level terminals like VT320/VT420/VT520 โ collectively "VTxxx", iykyk. It also provides Tektronix 4014 emulation for programs that can't use the window system directly. And if your underlying operating system supports terminal resizing capabilities โ for example the SIGWINCH signal on systems derived from 4.3BSD โ then xterm will use those facilities to notify programs running in the window whenever it gets resized. resize slay ๐
The VTxxx and Tektronix 4014 terminals each have their own window, so you can edit text in one and look at graphics in the other at the same time. multitasking main character energy fr fr. To maintain the correct aspect ratio (height/width), Tektronix graphics get restricted to the largest box with a 4014's aspect ratio that will fit in the window. That box lives in the upper left area of the window.
Even though both windows may be displayed at the same time, one of them is considered the โactiveโ window โ the one receiving keyboard input and terminal output. It's the window that contains the text cursor, basically the one holding the aux cord. The active window can be chosen through escape sequences, the VT Options menu in the VTxxx window, and the Tek Options menu in the 4014 window.
๐ EMULATIONS ๐
xterm provides usable emulations of related DEC terminals:
- VT52 emulation is complete. ate and left no crumbs.
- VT102 emulation is fairly complete, but it does not support autorepeat (because that would affect the keyboard used by other X clients).
Double-size characters are displayed properly if your font server supports scalable bitmap fonts.
- VT220 emulation does not support soft fonts, but it's otherwise complete.
- VT420 emulation (the default) supports controls for manipulating rectangles of characters as well as left/right margins.
xterm does not support some other features which are not suitable for emulation, e.g., two-sessions.
Terminal database (terminfo(5) or termcap(5)) entries that work with xterm include:
- an optional platform-specific entry (
โxtermโ), โxtermโ,โvt102โ,โvt100โ,โansiโandโdumbโ
xterm automatically searches the terminal database in this order for these entries and then sets the โTERMโ variable (and the โTERMCAPโ environment variable on a few older systems). The alternatives after โxtermโ are very old โ like, late 1980s old. ๐
VT100 and VT102 emulations are commonly equated, though they actually differ. The VT102 provided controls for inserting and deleting lines.
Similarly, โansiโ and โvt100โ are often equated. These are not really the same. For instance, they use different controls for scrolling (but xterm supports both). These features differ in an โansiโ terminal description from xterm:
acscโ Pseudo-graphics (line-drawing) uses a different mapping.xenlโxtermwraps text at the right margin using the VT100 โnewline glitchโ behavior.
Because of the wrapping behavior, you would occasionally have to repaint the screen when using a text editor with the โansiโ description. not the vibe, but okay ๐
You may also use descriptions corresponding to the various supported emulations such as โvt220โ or โvt420โ, but you should set the terminal emulation level with the decTerminalID resource.
On most systems, xterm will use the terminfo database. Some older systems use termcap. (The โTERMCAPโ environment variable is not set if xterm is linked against a terminfo library, since the requisite information is not provided by the termcap emulation of terminfo libraries.)
Many of the special xterm features may be modified under program control through a set of escape sequences different from the standard VTxxx escape sequences (see Xterm Control Sequences).
The Tektronix 4014 emulation is also fairly good. It supports 12-bit graphics addressing, scaled to the window size. Four different font sizes and five different lines types are supported. There is no write-through or defocused mode support. 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 below). The name of the file will be:
โCOPYyyyy-MM-dd.hh:mm:ssโ
where yyyy, 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.)
โ ๏ธ Not all of the features described in this manual are necessarily available in this version of xterm. Some (e.g., the non-VT220 extensions) are available only if they were compiled in, though the most commonly-used are in the default configuration.
๐ OTHER FEATURES ๐
xterm automatically highlights the text cursor when the pointer enters the window (selected) and unhighlights it when the pointer leaves the window (unselected). If the window is the focus window, then the text cursor is highlighted no matter where the pointer is. loyalty ๐
In VTxxx 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 replaced with the alternate screen. Saving of lines scrolled off the top of the window is disabled until the normal screen is restored. The usual terminal description for xterm allows the visual editor vi(1) to switch to the alternate screen for editing and to restore the screen on exit. A popup menu entry makes it simple to switch between the normal and alternate screens for cut and paste. so handy, obsessed ๐ซถ
In either VTxxx or Tektronix mode, there are escape sequences to change the name of the windows. Additionally, in VTxxx mode, xterm implements the window-manipulation control sequences from dtterm, such as resizing the window and setting its location on the screen.
xterm allows character-based applications to receive mouse events (currently button-press and release events, and button-motion events) as keyboard control sequences. See Xterm Control Sequences for details.
๐ OPTIONS ๐
Because xterm uses the X Toolkit library, it accepts the standard X Toolkit command line options. xterm also accepts many application-specific options.
By convention, if an option begins with a โ+โ instead of a โ-โ, the option is restored to its default value.
Most of the xterm options are actually parsed by the X Toolkit, which sets resource values and overrides corresponding resource-settings in your X resource files. 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.
These options do not set a resource value, and are handled specially:
-versionโ This causesxtermto print a version number to the standard output, and then exit.-helpโ This causesxtermto print out a verbose message describing its options, one per line. The message is written to the standard output. After printing the message,xtermexits.xtermgenerates 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.xtermgenerates 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.
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:
xtermcannot tell easily whether a resource value was set by one of the external resource- or application-defaults files, whether it was set usingxrdb(1), or if it was set through the-xrmoption or via some directly relevant command-line option.xtermsees only the end-result: a value supplied when creating its widgets.xtermdoes 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.xtermmakes 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โ../โ,xtermlooks for the file in the user'sPATH. In either case, this check fails ifxtermcannot construct an absolute path. - If that check fails (or if no such parameter is given),
xtermnext checks theโSHELLโvariable. If that specifies an executable file,xtermwill attempt to start that. However,xtermadditionally checks if it is a valid shell, and will unsetโSHELLโif it is not. - If
โSHELLโis not set to an executable file,xtermtries to use the shell program specified in the user's password file entry. As before,xtermverifies if this is a valid shell. - Finally, if the password file entry does not specify a valid shell,
xtermuses/bin/sh.
okay that's part one bestie, and there is SO much more coming โ don't go anywhere ๐
The -e option can't be used with this parameter, bestie, because it literally eats all the parameters that come after it. Rude? Kinda. But that's the deal. ๐
Xterm checks out shell programs by hunting down their pathname in the text file /etc/shells. It treats the environment variable SHELL super specially, because (just like TERM) xterm both reads and updates that variable, and because the program that xterm starts up isn't necessarily a shell, yk?
The other options are the ones that control how everything looks and behaves. Heads up though: not all options are necessarily configured into your copy of xterm. ๐
-132โ Normally, that VT102DECCOLMescape sequence that flips between 80 and 132 column mode just gets ignored. This option makes theDECCOLMescape sequence actually get recognized, and the xterm window will resize accordingly. Slay. โจ-ahโ Says xterm should always highlight the text cursor. By default, xterm shows a hollow text cursor whenever focus is lost or the pointer dips out of the window.+ahโ Says xterm should do text cursor highlighting based on focus.-aiโ Disables active icon support if that feature was compiled into xterm. Same thing as setting thevt100resourceactiveIconto"false".+aiโ Enables active icon support if that feature was compiled into xterm. Equivalent to setting thevt100resourceactiveIconto"true".-awโ Says auto-wraparound should be allowed, equivalent to setting thevt100resourceautoWrapto"true".
Auto-wraparound lets the cursor automatically wrap to the beginning of the next line when it's at the rightmost position of a line and text gets output. Iconic behavior honestly.
+awโ Says auto-wraparound should not be allowed, equivalent to setting thevt100resourceautoWrapto"false".-bnumber โ Specifies the size of the inner border (the distance between the outer edge of the characters and the window border) in pixels. That's thevt100internalBorderresource. The default is"2".-barcโ This one, corresponding to thecursorBarresource, makes the cursor a bar instead of a box. ๐+barcโ This one, corresponding to thecursorBarresource, makes the cursor a box instead of a bar.-baudratenumber โ Sets 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โ Turns on text cursor blinking. This overrides thecursorBlinkresource.+bcโ Turns off text cursor blinking. This overrides thecursorBlinkresource.-bcfmilliseconds โ Sets how long the text cursor is off when blinking, via thecursorOffTimeresource.-bcnmilliseconds โ Sets how long the text cursor is on when blinking, via thecursorOnTimeresource.-bdcโ Sets thevt100resourcecolorBDModeto"false", which disables displaying characters with the bold attribute as color.+bdcโ Sets thevt100resourcecolorBDModeto"true", enabling display of characters with the bold attribute as color rather than bold.-cbโ Sets thevt100resourcecutToBeginningOfLineto"false".+cbโ Sets thevt100resourcecutToBeginningOfLineto"true".-cccharacterclassrange:value[, ...] โ Sets classes indicated by the given ranges, for use in selecting by words (check out CHARACTER CLASSES and thecharClassresource).-cjk_widthโ Sets thecjkWidthresource to"true". When it's turned on, characters with the East Asian Ambiguous (A) category in UTR 11 get a column width of 2. Otherwise, they get a column width of 1. This might be handy for some legacy CJK text terminal-based programs that assume box drawings and others 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-faat the command line or thefaceNameresource. The default is"false".+cjk_widthโ Resets thecjkWidthresource.-classstring โ Lets you override xterm's resource class. Normally it's"XTerm", but it can be set to another class like"UXTerm"to override selected resources.
X Toolkit sets the WM_CLASS property using the instance name and this class value.
-cmโ Disables recognition of ANSI color-change escape sequences. Sets thecolorModeresource to"false".+cmโ Enables recognition of ANSI color-change escape sequences. Same as thevt100resourcecolorMode.-cnโ Says newlines should not be cut in line-mode selections. Sets thecutNewlineresource to"false".+cnโ Says newlines should be cut in line-mode selections. Sets thecutNewlineresource to"true".-crcolor โ Specifies the color to use for the text cursor. The default is to use the same foreground color that's used for text. It sets thecursorColorresource according to the parameter.-cuโ Says xterm should work around a bug in themore(1)program that makes it incorrectly display lines that are exactly the width of the window and are followed by a line starting with a tab (the leading tabs just don't show up ๐ญ). This option is named this way because it was originally thought to be a bug in thecurses(3x)cursor motion package.+cuโ Says xterm should not work around thatmore(1)bug from above.-dcโ Disables the escape sequence for changing dynamic colors: thevt100foreground 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 its highlight color. Sets thedynamicColorsoption to"false".+dcโ Enables the escape sequence for changing dynamic colors. Sets thedynamicColorsoption to"true".-eprogram [arguments ...] โ Specifies the program (and its command line arguments) to run in the xterm window. It also sets the window title and icon name to the basename of the program being executed, if neither-Tnor-nare given on the command line.
NOTE: This must be the last option on the command line. No cap. ๐ซถ
-emoji_widthโ Sets theemojiWidthresource to"true". When it's turned on, Unicode variation selectorsVS15andVS16are interpreted, overriding the number of cells for the immediately preceding Emoji character. The default is"false".+emoji_widthโ Resets theemojiWidthresource.-enencoding โ Determines the encoding on which xterm runs. Sets thelocaleresource. Encodings other than UTF-8 are supported by usingluit. The-lcoption should be used instead of-enfor systems with locale support.-fapattern โ Sets the pattern for fonts selected from the FreeType library, if support for that library was compiled into xterm. This corresponds to thefaceNameresource. When a CJK double-width font is specified, you also need to turn on thecjkWidthresource.
If you specify both -fa and the X Toolkit option -fn, the -fa setting overrides the latter.
See also the renderFont resource, which combines with this to determine whether FreeType fonts are initially active.
-fbfont โ Specifies a font to use when displaying bold text. Sets theboldFontresource.
This font must be the same height and width as the normal font, otherwise it's ignored. If only one of the normal or bold fonts is specified, it'll 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.
-fbbโ Says xterm should compare normal and bold fonts' bounding boxes to make sure they're compatible. Sets thefreeBoldBoxresource to"false".+fbbโ Says xterm should not compare normal and bold fonts' bounding boxes to check they're compatible. Sets thefreeBoldBoxresource to"true".-fbxโ Says xterm should not assume the normal and bold fonts have VT100 line-drawing characters. If any are missing, xterm will draw the characters directly. Sets theforceBoxCharsresource to"false".+fbxโ Says xterm should assume the normal and bold fonts have VT100 line-drawing characters. Sets theforceBoxCharsresource to"true".-fcfontchoice โ Specify the initial font chosen from the font menu. The option value corresponds to theinitialFontresource.-fdpattern โ Sets the pattern for double-width fonts selected from the FreeType library, if support for that library was compiled into xterm. This corresponds to thefaceNameDoublesizeresource.-fifont โ Sets the font for active icons, if that feature was compiled into xterm.
See also the discussion of the iconFont resource.
-fssize โ Sets the pointsize for fonts selected from the FreeType library, if support for that library was compiled into xterm. This corresponds to thefaceSizeresource.-fullscreenโ Says xterm should ask the window manager to let it use the full-screen for display, e.g. without window decorations. Sets thefullscreenresource to"true". Main character energy, tbh. ๐+fullscreenโ Says xterm should not ask the window manager to let it use the full-screen for display. Sets thefullscreenresource to"false".-fwfont โ the glow-up font for wide text โจ By default xterm tries to find a font that's literally twice as wide as your normal-text font. If it can't find a double-width baddie, it just improvises and stretches the normal font instead (iykyk, it's giving resourceful). This is thewideFontresource.-fwbfont โ same energy but for bold wide text ๐ Default: it hunts for a font twice as wide as your bold font. No double-width found? It improvises by stretching the bold font. This is thewideBoldFontresource.-fxfont โ the font used to show the preedit string in the โOverTheSpotโ input method ๐ฆ Also go peek at theximFontresource discussion.-hccolor โ (see-selbg). yeah bestie, that's the whole thing ๐-hfโ says HP function key escape codes should be generated for function keys. Sets thehpFunctionKeysresource to โtrueโ ๐+hfโ says those HP function key escape codes should not be generated. SetshpFunctionKeysto โfalseโ ๐-hmโ tells xterm to usehighlightTextColorandhighlightColorto override the reversed foreground/background colors in a selection. SetshighlightColorModeto โtrueโ โจ+hmโ tells xterm not to usehighlightTextColorandhighlightColorto override those reversed foreground/background colors in a selection. SetshighlightColorModeto โfalseโ ๐ธ-holdโ turns theholdresource on, meaning xterm won't immediately destroy its window when the shell command finishes. It just... waits ๐ until you use the window manager to destroy/kill the window, or you hit the menu entries that send a signal, e.g.,HUPorKILL.+holdโ turnsholdoff, so xterm immediately destroys its window once the shell command completes. bye bestie ๐ซถ-ieโ turns on theptyInitialEraseresource, i.e., use the pseudo-terminal's sense of thestty(1)erase value.+ieโ turns offptyInitialErase, i.e., set thesttyerase value using thekbstring from the termcap entry as a reference, if available.-imโ turns on theuseInsertModeresource, which forces insert mode by adding appropriate entries to theTERMCAPenvironment variable. (This option is ignored on most systems, becauseTERMCAPisn't used.) ๐+imโ turns off theuseInsertModeresource.-intowindowId โ you hand it an X window identifier (an integer, which can be hexadecimal, octal or decimal depending on whether it begins with"0x","0"or neither) and xterm reparents its top-level shell widget to that window ๐ This is how you embed xterm inside other applications.
For instance, there are scripts for Tcl/Tk and Gtk that demonstrate the feature. Heads up though: when you're using Gtk, that toolkit has a limitation which requires xterm's allowSendEvents resource to be enabled.
-itcโ sets thevt100resourcecolorITModeto โfalseโ, which disables showing characters with the italic attribute as color.+itcโ sets thevt100resourcecolorITModeto โtrueโ, which enables showing characters with the italic attribute as color rather than as italic โจ-jโ says xterm should do jump scrolling ๐ฆ This is thejumpScrollresource. Normally text scrolls one line at a time; this option lets xterm move multiple lines at once so it doesn't fall as far behind. Its use is strongly recommended, because it makes xterm way faster when you're scanning through huge amounts of text. The VT100 escape sequences for enabling/disabling smooth scroll, plus the VT Options menu, can flip this feature on or off.+jโ says xterm should not do jump scrolling.-jfโ when doing jump-scrolling or related indexing, e.g., carriage returns, xterm will defer flushing screen-updates, to improve speed. This is thefastScrollresource ๐ฅ+jfโ when doing jump-scrolling or related indexing, e.g., carriage returns, xterm will not defer flushing screen-updates, to improve speed. This is thefastScrollresource.-k8โ sets theallowC1Printableresource. WhenallowC1Printableis set, xterm overrides the mapping of C1 control characters (code128โ159) to treat them as printable ๐+k8โ resets theallowC1Printableresource.-ktkeyboardtype โ sets thekeyboardTyperesource. 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:
hpFunctionKeysscoFunctionKeyssunFunctionKeystcapFunctionKeysoldXtermFKeyssunKeyboard
โฆusing the Sun/PC keyboard layout ๐
-lโ turns logging on, unless it's disabled by thelogInhibitresource.
Some versions of xterm may have logging enabled. However, normally logging is not supported, due to security concerns back in the early 1990s. That was a problem in X11R4 xterm (1989) which got 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 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 it's overridden by the -lf option or the logFile resource:
- If the filename is
"-", then logging is sent to the standard output. - Otherwise a filename is generated, and the log file is written to the directory from which xterm is invoked.
- The generated filename is of the form
XtermLog.XXXXXX
or
Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
depending on how xterm was built.
+lโ turns logging off.-lcโ turns on support of various encodings according to the user's locale setting, i.e., theLC_ALL,LC_CTYPE, orLANGenvironment variables ๐ This is achieved by turning on UTF-8 mode and by invokingluitfor conversion between locale encodings and UTF-8. (luitis not invoked in UTF-8 locales.) This corresponds to thelocaleresource.
The actual list of encodings which are supported is determined by luit. Go consult the luit manual page for the deets.
Also see the discussion of the -u8 option, which supports UTF-8 locales.
+lcโ turns off support of automatic selection of locale encodings. Conventional 8bit mode, or โ in UTF-8 locales or with the-u8option โ UTF-8 mode, will be used.-lccpath โ the file name for the encoding converter from/to locale encodings and UTF-8, which is used with the-lcoption or thelocaleresource. This corresponds to thelocaleFilterresource.-leftbarโ forces the scrollbar to the left side of the VT100 screen. This is the default, unless you've set therightScrollBarresource.-lffilename โ specifies the log filename ๐ This sets thelogFileresource. If set to"-", xterm writes its log to the standard output. Go see the-loption.-lsโ says the shell started in the xterm window will be a login shell (i.e., the first character ofargv[0]will be a dash, indicating to the shell that it should read the user's.loginor.profile).
The -ls flag and the loginShell resource are ignored if -e is also given, because xterm doesn't know how to make the shell start the given command after whatever it does when it's 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 weren't ignored, the result of ~/.profile might interfere with that.
If you genuinely 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 wtmp entry (if configured to do so), whereas xterm -e does not. ๐
+lsโ says the shell that's started should not be a login shell (i.e., it'll be a normal โsubshellโ).-maximizedโ says xterm should ask the window manager to maximize its layout on startup ๐ This corresponds to themaximizedresource.
Maximizing is not the reverse of iconifying; it's possible to do both with certain window managers.
+maximizedโ says xterm should ask the window manager to not maximize its layout on startup.-mbโ says xterm should ring a margin bell when the user types near the right end of a line ๐+mbโ says the margin bell should not be rung.-mcmilliseconds โ specifies the maximum time between multi-click selections.-mesgโ turns off themessagesresource, i.e., disallows write access to the terminal. ๐+mesgโ turns on themessagesresource, i.e., allows write access to the terminal.-mk_widthโ sets themkWidthresource to โtrueโ. This makes xterm use a built-in version of the wide-character width calculation. The default is โfalseโ โจ+mk_widthโ resets themkWidthresource.-mscolor โ specifies the color to be used for the pointer cursor. The default is to use the foreground color. This sets thepointerColorresource. ๐-nbnumber โ sets how many characters from the right end of a line the margin bell rings at (if it's enabled, bestie). Default is"10". ๐-nomapโ turns OFF the initial mapping of the terminal window. Mapping an X window makes it visible if it's managed, so like, that's the whole point of mapping. Default is"false"because xterm's window is normally just shown on startup anyway.
After startup, an unmapped xterm window can be mapped by finding its window-id โ using xwininfo(1) or xlsclients(1), for example โ and then using another program like xdotool(1) to ask the window manager to make it visible. ๐ซ
If the xterm window is visible (i.e., mapped), xterm's menus and actions (i.e., set-visibility) let you pick whether the VT100 or Tek4014 windows should be displayed.
+nomapโ turns ON the initial mapping of the terminal window. This is the default behavior, no cap.-nulโ disables the display of underlining.+nulโ enables the display of underlining.-pcโ enables the PC-style use of bold colors (see theboldColorsresource). ๐จ+pcโ disables the PC-style use of bold colors.-pffont โ picks the font used for the pointer. The corresponding resource name ispointerFont. The resource value default iscursor. ๐ฑ๏ธ-pobโ says the window should be raised whenever a Control-G is received.+pobโ says the window should not be raised whenever a Control-G is received.-rcaโ enables cursor position adjustment during resize. When the terminal width shrinks, the cursor is clamped to the new width. With this option (which is the default), cursor movements while shrunk are tracked, and on grow the cursor is adjusted to stay in sync with the shell. ๐+rcaโ disables cursor position adjustment. The cursor stays at its visual position when the terminal grows, but shell commands may misbehave after resize and cursor movement. ๐ฌ-report-charclassโ prints a report to the standard output showing info about the character-classes which can be altered using thecharClassresource.-report-colorsโ prints a report to the standard output showing info about colors as xterm allocates them. This corresponds to thereportColorsresource.-report-fontsโ prints a report to the standard output showing info about fonts which are loaded. This corresponds to thereportFontsresource.-report-iconsโ prints a report to the standard output showing info about pixmap-icons which are loaded. This corresponds to thereportIconsresource.-report-xresโ prints a report to the standard output showing the values of boolean, numeric or string X resources for the VT100 widget when initialization is complete. This corresponds to thereportXResresource.-rightbarโ forces the scrollbar to the right side of the VT100 screen.-rvcโ disables the display of characters with the reverse attribute as color.+rvcโ enables the display of characters with the reverse attribute as color.-rwโ says reverse-wraparound should be allowed. This lets the cursor back up from the leftmost column of one line to the rightmost column of the previous line. It's very useful for editing long shell command lines and it's encouraged, fr fr. This option can be turned on and off from the VT Options menu. โฉ๏ธ+rwโ says reverse-wraparound should not be allowed.-sโ says xterm may scroll asynchronously, meaning the screen doesn't have to be kept completely up to date while scrolling. This lets xterm run faster when network latencies are very high and is typically useful when you're running across a very large internet or many gateways. ๐+sโ says xterm should scroll synchronously.-samenameโ does not send title and icon name change requests when the request would have no effect (the name isn't changed). The advantage: it prevents flicker. The disadvantage: it requires an extra round trip to the server to find out the previous value. In practice this should never be a problem, bestie. โจ+samenameโ always sends title and icon name change requests.-sbโ says some number of lines scrolled off the top of the window should be saved, and a scrollbar should be displayed so you can view those lines. This option may be turned on and off from the VT Options menu. ๐+sbโ says a scrollbar should not be displayed.-selbgcolor โ picks the color for the background of selected text. If not specified, reverse video is used. See the discussion of thehighlightColorresource.-selfgcolor โ picks the color for selected text. If not specified, reverse video is used. See the discussion of thehighlightTextColorresource.-sfโ says Sun function key escape codes should be generated for function keys.+sfโ says the standard escape codes should be generated for function keys.-shnumber โ scales line-height values by the given number. See the discussion of thescaleHeightresource.-siโ says 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โ says output to a window should cause it to scroll to the bottom.-skโ says 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โ says pressing a key while using the scrollbar should not cause the window to be repositioned.-slnumber โ sets the number of lines to save that have been scrolled off the top of the screen. This corresponds to thesaveLinesresource. The default is"1024". ๐พ-smโ this one corresponds to thesessionMgtresource, and it says xterm should set up session manager callbacks.+smโ says xterm should not set up session manager callbacks.-spโ says a Sun/PC keyboard should be assumed, providing mapping for keypad+to,, and CTRL-F1 to F13, CTRL-F2 to F14, etc. โจ๏ธ+spโ says the standard escape codes should be generated for keypad and function keys.-tโ says xterm should start in Tektronix mode, rather than in VTxxx mode. Switching between the two windows is done using theOptionsmenus.
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 variable (and the TERMCAP environment variable, if relevant).
+tโ says xterm should start in VTxxx mode.-tbโ this one corresponds to thetoolBarresource, and it says 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โ says xterm should not set up a toolbar.-titerm_id โ specifies the name xterm uses to select the correct response to terminal ID queries. It also specifies the emulation level, which determines the type of response to a DA control sequence. Valid values includevt52,vt100,vt101,vt102,vt220, andvt240(the"vt"is optional). The default is"vt420". The term_id argument specifies the terminal ID to use. (This is the same as thedecTerminalIDresource.) ๐-tmstring โ specifies a series of terminal setting keywords followed by the characters that should be bound to those functions, similar to thestty(1)program. The keywords and their values are described in detail in thettyModesresource.-tnname โ specifies the name of the terminal type to be set in theTERMenvironment variable. It corresponds to thetermNameresource. This terminal type must exist in the terminal database (termcaporterminfo, depending on how xterm is built) and should haveli#andco#entries. If the terminal type isn't found, xterm uses the built-in list"xterm","vt102", etc.-u8โ sets theutf8resource. Whenutf8is set, xterm interprets incoming data as UTF-8. This sets thewideCharsresource 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-wcoption or the correspondingwideCharsresource instead of the-u8option. ๐
This option and the utf8 resource are overridden by the -lc and -en options and the locale resource. That is, if xterm has been compiled to support luit, and the locale resource isn't "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 the -en UTF-8 option or the "locale: UTF-8" resource when your operating system does not support locale.
+u8โ resets theutf8resource.-ucโ this one corresponds to thecursorUnderLineresource, and it makes the cursor underlined instead of a box. ๐+ucโ okay so this one's tied to thecursorUnderLineresource, and it makes the cursor a box instead of underlined. it's giving โbox eraโ. ๐-ulcโ bestie, this disables showing characters with the underline attribute as color instead of actual underlining.+ulcโ this enables showing characters with the underline attribute as color instead of actual underlining. slay.-ulitโ tied to theitalicULModeresource; this disables showing characters with the underline attribute as italics instead of underlining.+ulitโ tied to theitalicULModeresource; this enables showing characters with the underline attribute as italics instead of underlining. iconic.-utโ says xterm should not write a record into the systemutmplog file. periodt.+utโ says xterm should write a record into the systemutmplog file.-vbโ visual bell preferred over an audible one. Instead of ringing the terminal bell whenever aControl-Gis received, the window will be flashed. no cap, flashing > beeping. โจ+vbโ says a visual bell should not be used.-wcโ sets thewideCharsresource. WhenwideCharsis 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โ resets thewideCharsresource. lowkey handy.-wfโ says 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โ says xterm should not wait before starting the subprocess.-ziconbeeppercent โ same as thezIconBeepresource. If percent is non-zero, xterms that produce output while iconified will cause anXBellsound 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โ says 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 underxdmon 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โ lets xterm be used as an input and output channel for an existing program, and it's 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.
๐ฐ๏ธ Old Options ๐ฐ๏ธ
bestie, these command line arguments are here 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โ specifies the preferred size and position of the Tektronix window. It is shorthand for specifying the โtekGeometryโ resource.#geomโ specifies the preferred position of the icon window. It is shorthand for specifying the โiconGeometryโ resource.-Tstring โ specifies the title for xterm's windows. It is equivalent to-title.-nstring โ 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 X Toolkit option-name. The default icon name is the application name. If no suitable icon is found, xterm provides a compiled-in pixmap. X Toolkit sets theWM_ICON_NAMEproperty using this value. ๐-rโ indicates that reverse video should be simulated by swapping the foreground and background colors. It is equivalent to-rv.-wnumber โ specifies the width in pixels of the border surrounding the window. It is equivalent to-borderwidthor-bw.
๐ ๏ธ X Toolkit Options ๐ ๏ธ
these are the standard X Toolkit command line arguments that are commonly used with xterm:
-bdcolor โ specifies the color to use for the border of the window. The corresponding resource name isborderColor. Xterm uses the X Toolkit default, which is โXtDefaultForegroundโ. Xterm's VT100 window has two borders: the inner borderinternalBorderand the outer borderborderWidth, managed by the X Toolkit. Normally xterm fills the inner border using the VT100 window's background color. If thecolorInnerBorderresource is enabled, then xterm may fill the inner border using theborderColorresource.-bgcolor โ specifies the color to use for the background of the window. The corresponding resource name isbackground. The default is โXtDefaultBackgroundโ. ๐-bwnumber โ specifies the width in pixels of the border surrounding the window. This appears to be a legacy of older X releases. It sets theborderWidthresource 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-boption, which controls the inner border of the xterm window.-displaydisplay โ specifies the X server to contact; seeX(7).-fgcolor โ specifies the color to use for displaying text. The corresponding resource name isforeground. The default is โXtDefaultForegroundโ.-fnfont โ specifies the font to be used for displaying normal text. The corresponding resource name isfont. The resource value default isfixed. Xterm's-fnoption accepts a comma-separated list like-fa, for the VT100 widget, using the first bitmap font (and discarding additional fonts). However, other widgets (such as the toolbar) will be confused by this and give a warning.-fontfont โ this is the same as-fn.-geometrygeometry โ specifies the preferred size and position of the VTxxx window; seeX(7). The normal geometry specification can be suffixed with@followed by a Xinerama screen specification; it can be eithergfor the global screen (default),cfor the current screen or a screen number.-iconicโ indicates that xterm should ask the window manager to start it as an icon rather than as the normal window. The corresponding resource name isiconic.-namename โ 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โ indicates that reverse video should be simulated by swapping the foreground and background colors. The corresponding resource name isreverseVideo.+rvโ disables the simulation of reverse video by swapping foreground and background colors.-titlestring โ specifies the window title string, which may be displayed by window managers if the user so chooses. It is shorthand for specifying the โtitleโ resource. The default title is the command line specified after the-eoption, if any, otherwise the application name. X Toolkit sets theWM_NAMEproperty using this value.-xrmresourcestring โ specifies a resource string to be used. This is especially useful for setting resources that do not have separate command line options.
X Toolkit accepts alternate names for a few of these options, e.g.,
-backgroundโ for โ-bgโ-bordercolorโ for โ-bcโ-borderwidthโ for โ-bwโ-fontโ for โ-fnโ-foregroundโ for โ-fgโ-reverseโ for โ-rvโ
Abbreviated options also are supported, e.g., โ-vโ for โ-version.โ โจ
๐ธ RESOURCE CONVERTERS ๐ธ
Okay bestie, so xterm speaks fluent X Toolkit โ it understands all of the core X Toolkit resource names and classes, and it uses the X Toolkit resource types (booleans, colors, fonts, integers, strings, the whole squad) along with their respective converters. But those resource types are not always sufficient, and xterm is not about to be limited:
โจ Extended Booleans โจ
X Toolkit boolean resources are useful, but having more than two values helps with configurability. Xterm extends a (normally) boolean resource value by checking for additional values in several cases:
activeIconcdXtraScrollcursorBlinkeightBitMetarenderFontshiftEscapetiXtraScrollutf8utf8Fontsutf8Title
๐ Comma-separated Lists ๐
Xterm uses comma-separated lists for certain resources which denote features to enable or disable:
colorEventsdisallowedColorOpsdisallowedFontOpsdisallowedMouseOpsdisallowedPasteControlsdisallowedTcapOpsdisallowedWindowOps
X Toolkit resource types do not include lists. Xterm uses a string for the resource, and parses it.
- The items in these lists are the features to enable or disable.
- List items are names (or decimal integers for
disallowedWindowOps). - List items are matched ignoring case. Xterm also allows wildcards in names, i.e.,
*and i.e.,?as in shell scripts. - Each item can be prefixed with
~(tilde) to indicate that the feature should be disabled rather than enabled.
Xterm also uses comma-separated lists for a few other resources to set up tables. These match names ignoring case, and can be abbreviated but do not support wildcards:
eightBitSelectTypesomitTranslationutf8SelectTypes
Finally, these resources are comma-separated lists of data:
charClassfaceNameDoublesizefaceNamefont
๐ฆ Deferred resources ๐ฆ
Xterm may defer processing a resource until it is needed. For example, font2 through font7 are loaded as needed, to start faster. Again, the actual resource type is a string, parsed and used when needed.
๐ RESOURCES ๐
Application specific resources (e.g., XTerm.NAME) follow.
๐ Application Resources ๐
backarrowKeyIsErase (class BackarrowKeyIsErase)
Tie the VTxxx backarrowKey and ptyInitialErase resources together by setting the DECBKM state according to whether the initial erase character is a backspace (8) or delete (127) character. A false value disables this feature. The default is False.
Here are tables showing how the initial settings for
backarrowKeyIsErase(BKIE),backarrowKey(BK), andptyInitialErase(PIE), along with thesttyerase character (^H for backspace, ^? for delete)
will affect DECBKM. First, xterm obtains the initial erase character:
- xterm's internal value is ^H
- xterm asks the operating system for the value which
stty(1)shows - the
ttyModesresource may override erase - if
ptyInitialEraseis false, xterm will look in the terminal database
Summarizing that as a table:
PIE stty database erase
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
false ^H ^H ^H
false ^H ^? ^?
false ^? ^H ^H
false ^? ^? ^?
true ^H ^H ^H
true ^H ^? ^H
true ^? ^H ^?
true ^? ^? ^?
Using that erase character, xterm allows further choices:
- if
backarrowKeyIsEraseis true, xterm uses the erase character for the initial state of DECBKM - if
backarrowKeyIsEraseis false, xterm sets DECBKM to 2 (internal). This ties togetherbackarrowKeyand the control sequence for DECBKM. - applications can send a control sequence to set/reset DECBKM control set
- the โBackarrow Key (BS/DEL)โ menu entry toggles DECBKM
Summarizing the initialization details:
erase BKIE BK DECBKM result
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
^? false false 2 ^H
^? false true 2 ^?
^? true false 0 ^?
^? true true 1 ^?
^H false false 2 ^H
^H false true 2 ^?
^H true false 0 ^H
^H true true 1 ^H
buffered (class Buffered)
Normally xterm is built with double-buffer support. This resource can be used to turn it on or off. Setting the resource to true turns double-buffering on. The default value is False.
bufferedFPS (class BufferedFPS)
When xterm is built with double-buffer support, this gives the maximum number of frames/second. The default is 40 and is limited to the range 1 through 100.
cursorTheme (class CursorTheme)
The Xcursor(7) library provides a way to change the pointer shape and size. The X11 library uses this library to extend the font- and glyph-cursor calls used by applications such as xterm to substitute external files for the built-in โcoreโ cursors provided by X.
Xterm uses the pointerShape resource to select the X cursor shape. Most of the available sets of cursor themes provide an incomplete set of โcoreโ cursors (while possibly adding other cursors). Because of this limitation, xterm disables the feature by default.
The cursor theme feature can be useful because X cursors are not scalable and on a high-resolution display, the cursors are hard to find. Some of the cursor themes include larger cursors to work around this limitation:
- The default core cursors are 8x8 pixels;
- Some cursor themes include cursors up to the X server limit of 64x64 pixels.
The default value is none. Other values (including default) are passed to the Xcursor library to select a cursor theme, by setting the XCURSOR_THEME environment variable.
fullscreen (class Fullscreen)
Specifies whether or not xterm should ask the window manager to use a fullscreen layout on startup. Xterm accepts either a keyword (ignoring case) or the number shown in parentheses:
false(0) โ Fullscreen layout is not used initially, but may be later via menu-selection or control sequence.true(1) โ Fullscreen layout is used initially, but may be disabled later via menu-selection or control sequence.always(2) โ Fullscreen layout is used initially, and cannot be disabled later via menu-selection or control sequence.never(3) โ Fullscreen layout is not used, and cannot be enabled later via menu-selection or control sequence.
The default is false.
hold (class Hold)
If true, 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. You may scroll back, select text, etc., to perform most graphical operations. Resizing the display will lose data, however, since this involves interaction with the shell which is no longer running.
hpFunctionKeys (class HpFunctionKeys)
Specifies whether or not HP function key escape codes should be generated for function keys. The default is false, i.e., this feature is disabled.
The keyboardType resource is the preferred mechanism for selecting this mode.
iconGeometry (class IconGeometry)
Specifies the preferred size and position of the application when iconified. It is not necessarily obeyed by all window managers.
iconHint (class IconHint)
Specifies an icon which will be added to the window manager hints. Xterm provides no default value.
Set this resource to none to omit the hint entirely, using whatever the window manager may decide.
If the iconHint resource is given (or is set via the -n option) xterm searches for a pixmap file with that name, in the current directory as well as in /usr/share/pixmaps. if the resource does not specify an absolute pathname. In each case, xterm adds _48x48 and/or .xpm to the filename after trying without those suffixes. If it is able to load the file, xterm sets the window manager hint for the icon-pixmap. These pixmaps are distributed with xterm, and can optionally be compiled-in:
mini.xterm_16x16,mini.xterm_32x32,mini.xterm_48x48filled-xterm_16x16,filled-xterm_32x32,filled-xterm_48x48xterm_16x16,xterm_32x32,xterm_48x48xterm-color_16x16,xterm-color_32x32,xterm-color_48x48
In either case, xterm allows for adding a _48x48 to specify the largest of the pixmaps as a default. That is, mini.xterm is the same as mini.xterm_48x48.
If no explicit iconHint resource is given (or if none of the compiled-in names matches), xterm uses mini.xterm (which is always compiled-in).
The iconHint resource has no effect on โdesktopโ files, including โpanelโ and โmenuโ. Those are typically set via a โ.desktopโ file; xterm provides samples for itself (and the uxterm script). The more capable desktop systems allow changing the icon on a per-user basis.
iconName (class IconName)
Specifies a label for xterm when iconified. Xterm provides no default value; some window managers may assume the application name, e.g., xterm.
Setting the iconName resource sets the icon label unless overridden by zIconBeep or the control sequences which change the window and icon labels.
keyboardType(classKeyboardType) โ turns on one of the keyboard-type resources (or none, bestie, no pressure ๐ ). The squad is:hpFunctionKeys,scoFunctionKeys,sunFunctionKeys,tcapFunctionKeys,oldXtermFKeysandsunKeyboard.
The value you give it should be one of the matching strings โ โhpโ, โscoโ, โsunโ, โtcapโ, โlegacyโ or โvt220โ respectively. Yes that's the exact order, don't mix them up ๐.
The individual resources are there for legacy support; this one is just simpler to use. Xterm will only use one keyboard-type, but if you set multiple resources it warns and uses the last one it checks. messy ๐
The default is โunknownโ, i.e., none of the associated resources are set via this resource.
maxBufSize(classMaxBufSize) โ sets the maximum size of the input buffer. Default is โ32768โ. You literally cannot set this to a value less than theminBufSizeresource, and it'll get bumped up as needed to make that value evenly divide this one.
On some systems you may want to increase one or both of the maxBufSize and minBufSize values to get better performance if the operating system prefers larger buffer sizes. ๐
maximized(classMaximized) โ says whether or not xterm should ask the window manager to maximize its layout on startup. Default is โfalseโ.menuHeight(classMenuHeight) โ sets the height of the toolbar, which may get increased by the X Toolkit Layout widget depending on the fontsize in use. Default is โ25โ.menuLocale(classMenuLocale) โ picks the locale used for character-set computations when loading the popup menus. Use this to speed up initialization of the Athena popup menus, which can load unnecessary (and very large) fonts, e.g., in a locale having UTF-8 encoding ๐ฆ. Default is โCโ (POSIX).
If you want the current locale (only useful if you've localized the resource settings for the menu entries), set the resource to an empty string.
messages(classMessages) โ says whether write access to the terminal is allowed initially. Seemesg(1). Default is โtrueโ.minBufSize(classMinBufSize) โ sets the minimum size of the input buffer, i.e., the amount of data that xterm requests on each read. Default is โ4096โ. You cannot set this to a value less than 64. periodt.omitTranslation(classOmitTranslation) โ selectively omits one or more parts of xterm's default translations at startup โจ. The value is a comma-separated list of keywords, and they may be abbreviated:defaultโ ignore (mouse) button-down events which were not handled by other translationsfullscreenโ assigns a key-binding to thefullscreen()action.keypressโ assigns keypresses by default to theinsert-seven-bit()andinsert-eight-bit()actions.pagingโ assigns key bindings to thescroll-back()andscroll-forw()actions.pointerโ assigns pointer motion and button events to thepointer-motion()andpointer-button()actions respectively.popup-menuโ assigns mouse-buttons with the control modifier to the popup-menus.resetโ assigns mouse-button 2 with the meta modifier to theclear-saved-linesaction.scroll-lockโ assigns a key-binding to thescroll-lock()action.block-selectโ an optional (compile-time) feature for supporting rectangular selections. By default, this is bound to Meta button one.selectโ assigns mouse- and keypress-combinations to actions which manipulate the selection.
Xterm also uses these actions to capture mouse button and motion events which can be manipulated with the mouse protocol control sequences. If the select translations are omitted, then the pointer-motion and pointer-button handle these mouse protocol control sequences instead.
shift-fontsโ assigns key-bindings tolarger-vt-font()andsmaller-vt-font()actions.wheel-mouseโ assigns buttons 4 and 5 with different modifiers to thescroll-back()andscroll-forw()actions.
ptyHandshake(classPtyHandshake) โ if โtrueโ, xterm will do handshaking during initialization to make sure the parent and child processes update theutmpandstty(1)state ๐ค.
See also waitForMap which waits for the pseudo-terminal's notion of the screen size, and ptySttySize which resets the screen size after other terminal initialization is complete. Default is โtrueโ.
ptyInitialErase(classPtyInitialErase) โ if โtrueโ, xterm will use the pseudo-terminal's sense of thesttyerase value. If โfalseโ, xterm will set thesttyerase value to match its own configuration, using thekbstring from the termcap entry as a reference, if available.
In either case, the result is applied to the TERMCAP variable which xterm sets, if the system uses TERMCAP.
See also the ttyModes resource, which may override this. Default is โFalseโ.
ptySttySize(classPtySttySize) โ if โtrueโ, xterm will reset the screen size after terminal initialization is complete. This is needed for some systems whose pseudo-terminals cannot propagate terminal characteristics. Where it's not needed, it can interfere with other methods for setting the initial screen size, e.g., via window manager interaction ๐.
See also waitForMap which waits for a handshake-message giving the pseudo-terminal's notion of the screen size. Default is โfalseโ on Linux and macOS systems, โtrueโ otherwise.
reportColors(classReportColors) โ if true, xterm will print to the standard output a summary of colors as it allocates them. Default is โfalseโ.reportFonts(classReportFonts) โ if true, xterm will print to the standard output a summary of each font's metrics (size, number of glyphs, etc.), as it loads them. Default is โfalseโ.reportIcons(classReportIcons) โ if true, xterm will print to the standard output a summary of each pixmap icon as it loads them. Default is โfalseโ.reportXRes(classReportXRes) โ if true, xterm will print to the standard output a list of the boolean, numeric and string X resources for the VT100 widget after initialization. Default is โfalseโ.sameName(classSameName) โ if this resource is โtrueโ, xterm 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 ๐ . Default is โtrueโ.scaleHeight(classScaleHeight) โ scales line-height values by the resource value, which is limited to โ0.9โ to โ1.5โ. Default value is โ1.0โ,
While this resource applies to either bitmap or TrueType fonts, its main purpose is to help work around incompatible changes in the Xft library's font metrics. Xterm checks the font metrics to find what the library claims are the bounding boxes for each glyph (character). However, some of Xft's features (such as the autohinter) can cause the glyphs to be scaled larger than the bounding boxes, and be partly overwritten by the next row ๐ญ.
See useClipping for a related resource.
scoFunctionKeys(classScoFunctionKeys) โ says whether or not SCO function key escape codes should be generated for function keys. Default is โfalseโ, i.e., this feature is disabled.
The keyboardType resource is the preferred mechanism for selecting this mode.
sessionMgt(classSessionMgt) โ if the value is โtrueโ, xterm sets up session manager callbacks forXtNdieCallbackandXtNsaveCallback. Default is โtrueโ.sunFunctionKeys(classSunFunctionKeys) โ says whether or not Sun function key escape codes should be generated for function keys. Default is โfalseโ, i.e., this feature is disabled.
The keyboardType resource is the preferred mechanism for selecting this mode.
sunKeyboard(classSunKeyboard) โ Xterm translates certain key symbols based on its assumptions about your keyboard. This resource specifies whether or not Sun/PC keyboard layout (i.e., the PC keyboard's numeric keypad together with 12 function keys) should be assumed rather than DEC VT220. This causes the keypad โ+โ to be mapped to โ,โ. and CTRL F1-F10 to F11-F20, depending on the setting of thectrlFKeysresource, so xterm emulates a DEC VT220 more accurately ๐. Otherwise (the default, withsunKeyboardset to โfalseโ), xterm uses PC-style bindings for the function keys and keypad.
PC-style bindings use the Shift, Alt, Control and Meta keys as modifiers for function-keys and keypad (see Xterm Control Sequences for details). The PC-style bindings are analogous to PCTerm, but not the same thing. Normally these bindings do not conflict with the use of the Meta key as described for the eightBitInput resource. If they do, note that the PC-style bindings are evaluated first ๐.
See also the keyboardType resource.
tcapFunctionKeys(classTcapFunctionKeys) โ says whether or not function key escape codes read from the termcap/terminfo entry corresponding to theTERMenvironment variable should be generated for function keys instead of those configured usingsunKeyboardandkeyboardType. Default is โfalseโ, i.e., this feature is disabled.
keyboardType resource is the preferred mechanism for selecting this mode. iykyk ๐
๐ธ termName (class TermName)
Specifies the terminal type name to be set in the TERM environment variable. slay, that's your whole identity in env-var form โจ
๐ธ title (class Title)
Specifies a string that may be used by the window manager when displaying this application. it's giving name tag energy ๐
๐ธ toolBar (class ToolBar)
Specifies whether or not the toolbar should be displayed. The default is โtrueโ.
๐ธ ttyModes (class TtyModes)
Specifies a string containing terminal setting keywords. Except where noted, they may be bound to characters. Other keywords set modes. Not all keywords are supported on a given system. Allowable keywords include:
brkโ POSIX? no. CHAR may send an โinterruptโ signal, as well as ending the input-line.dsuspโ POSIX? no. CHAR will send a terminal โstopโ signal after input is flushed.eofโ POSIX? yes. CHAR will terminate input (i.e., an end of file).eolโ POSIX? yes. CHAR will end the line.eol2โ POSIX? no. alternate CHAR for ending the line.eraseโ POSIX? yes. CHAR will erase the last character typed.erase2โ POSIX? no. alternate CHAR for erasing the last input-character.flushโ POSIX? no. CHAR will cause output to be discarded until another flush character is typed.intrโ POSIX? yes. CHAR will send an โinterruptโ signal.killโ POSIX? yes. CHAR will erase the current line.lnextโ POSIX? no. CHAR will enter the next character quoted.quitโ POSIX? yes. CHAR will send a โquitโ signal.rprntโ POSIX? no. CHAR will redraw the current line.startโ POSIX? yes. CHAR will restart the output after stopping it.statusโ POSIX? no. CHAR will cause a system-generated status line to be printed.stopโ POSIX? yes. CHAR will stop the output.suspโ POSIX? yes. CHAR will send a terminal โstopโ signalswtchโ POSIX? no. CHAR will switch to a different shell layer.tabsโ POSIX? yes. Mode disables tab-expansion.-tabsโ POSIX? yes. Mode enables tab-expansion.werasโ POSIX? no. CHAR will erase the last word typed.
Control characters may be specified as ^char (e.g., ^c or ^u) and ^? may be used to indicate delete (127). Use ^- to denote undef. Use \034 to represent ^\, since a literal backslash in an X resource escapes the next character. ๐ yeah, backslash is out here doing double duty, careful bestie.
This is very useful for overriding the default terminal settings without having to run stty(1) every time an xterm is started. Note, however, that the stty program on a given host may use different keywords; xterm's table is built in. The POSIX column in the table indicates which keywords are supported by a standard stty program.
If the ttyModes resource specifies a value for erase, that overrides the ptyInitialErase resource setting, i.e., xterm initializes the terminal to match that value. no cap, erase wins ๐ซถ
๐ธ useInsertMode (class UseInsertMode)
Force use of insert mode by adding appropriate entries to the TERMCAP environment variable. This is useful if the system termcap is broken. (This resource is ignored on most systems, because TERMCAP is not used). The default is โfalseโ.
๐ธ utmpDisplayId (class UtmpDisplayId)
Specifies whether or not xterm should try to record the display identifier (display number and screen number) as well as the hostname in the system utmp log file. The default is โtrueโ.
๐ธ utmpInhibit (class UtmpInhibit)
Specifies whether or not xterm should try to record the user's terminal in the system utmp log file. If true, xterm will not try. The default is โfalseโ.
๐ธ validShells (class ValidShells)
Augment (add to) the system's /etc/shells, when determining whether to set the โSHELLโ environment variable when running a given program.
The resource value is a list of lines (separated by newlines). Each line holds one pathname. Xterm ignores any line beginning with โ#โ after trimming leading/trailing whitespace from each line.
The default is an empty string.
๐ธ waitForMap (class WaitForMap)
Specifies whether or not xterm should wait for the initial window map before starting the subprocess. This is part of the ptyHandshake logic. When xterm is directed to wait in this fashion, it passes the terminal size from the display end of the pseudo-terminal to the terminal I/O connection, e.g., using the size according to the window manager. Otherwise, it uses the size as given in resource values or command-line option -geometry. The default is โfalseโ.
๐ธ zIconBeep (class ZIconBeep)
Same as -ziconbeep command line argument. If the value of this resource 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.) The default is โfalseโ. it's giving notification but make it feral ๐
๐ธ zIconTitleFormat (class ZIconTitleFormat)
Allow customization of the string used in the zIconBeep feature. The default value is โ*** %sโ.
If the resource value contains a โ%sโ, then xterm inserts the icon title at that point rather than prepending the string to the icon title. (Only the first โ%sโ is used).
๐ฆ VT100 Widget Resources ๐ฆ
The following resources are specified as part of the vt100 widget (class VT100). They are specified by patterns such as โXTerm.vt100.NAMEโ.
If your xterm is configured to support the โtoolbarโ, then those patterns need an extra level for the form-widget which holds the toolbar and vt100 widget. A wildcard between the top-level โXTermโ and the โvt100โ widget makes the resource settings work for either, e.g., โXTerm*vt100.NAMEโ. the wildcard is the main character fr โญ
๐ activeIcon (class ActiveIcon)
Specifies whether or not active icon windows are to be used when the xterm window is iconified, if this feature is compiled into xterm. The active icon is a miniature representation of the content of the window and will update as the content changes. Not all window managers necessarily support application icon windows. Some window managers will allow you to enter keystrokes into the active icon window. The default is โdefaultโ.
Xterm accepts either a keyword (ignoring case) or the number shown in parentheses:
false(0) โ No active icon is shown.true(1) โ The active icon is shown. If you are usingtwm, use this setting to enable active-icons.default(2) โ Xterm checks at startup, and shows an active icon only for window managers which it can identify and which are known to support the feature. These arefvwm(full support), andwindow maker(limited). A few other window managers (such astwmandctwm) support active icons, but do not support the extensions which allow xterm to identify the window manager.
๐ allowBoldFonts (class AllowBoldFonts)
When set to โfalseโ, xterm will not use bold fonts. This overrides both the alwaysBoldMode and the boldMode resources.
๐ allowC1Printable (class AllowC1Printable)
If true, overrides the mapping of C1 controls (codes 128โ159), telling xterm to treat as if they were printable characters. Although this corresponds to no particular standard, some users insist it is a VT100. The default is โfalseโ.
Simply marking the C1 controls as printable does not ensure that xterm will display a character. That depends upon the font used. When the font does not provide glyphs for those codes, xterm may instead show a dashed box or a blank, depending on the setting of the forceBoxChars resource.
When xterm uses UTF-8 encoding, it does not interpret the C1 bytes as control characters:
- Xterm stores characters in each cell on the screen (rather than the sequence of bytes which comprise a character). When
allowC1Printableis on, the stored character codes match the byte values. - When
allowC1Printableis off, xterm stores the same bytes as Unicode replacement characters (U+FFFD), because a UTF-8 sequence cannot begin with those bytes.
UTF-8 encoding can produce character codes in the range 128โ159, using two bytes (beginning with 0xC2). Xterm does not interpret those two-byte characters as C1 controls. when allowC1Printable is off. It simply ignores them. lowkey feral behavior but ok ๐
๐ allowColorOps (class AllowColorOps)
Specifies whether control sequences that set/query the dynamic colors should be allowed. ANSI colors are unaffected by this resource setting. The default is โtrueโ.
๐ allowFontOps (class AllowFontOps)
Specifies whether control sequences that set/query the font should be allowed. The default is โtrueโ.
๐ allowMouseOps (class AllowMouseOps)
Specifies whether control sequences that enable xterm to send escape sequences to the host on mouse-clicks and movement. The default is โtrueโ.
allowPasteControls (class AllowPasteControls)
okay so if this is true, you're allowed to paste control characters such as BEL and CAN. ๐
Formatting characters (tab, newline) are normally allowed, unless they get suppressed via the disallowedPasteControls resource. Other C0 control characters are suppressed unless this resource is enabled. The exact set of control characters (C0 and C1) depends upon whether UTF-8 encoding is used, as well as the allowC1Printable and disallowedPasteControls resources. The default is false. โจ
allowScrollLock (class AllowScrollLock)
Specifies whether control sequences that set/query the Scroll Lock key should be allowed, plus whether the Scroll Lock key responds to the user's keypress. The default is false. ๐ซถ
When this feature is enabled, xterm will sense the state of the Scroll Lock key each time it acquires focus. Pressing the Scroll Lock key toggles xterm's internal state, as well as toggling the associated LED. While the Scroll Lock is active, xterm attempts to keep a viewport on the same set of lines. If the current viewport is scrolled past the limit set by the saveLines resource, then Scroll Lock has no further effect.
The reason for setting the default to false is to avoid user surprise. This key is generally unused in keyboard configurations, and has not acquired a standard meaning even when it is used in that manner. Consequently, users have assigned it for ad hoc purposes. ๐
See also the autoScrollLock resource.
allowSendEvents (class 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 they are discarded.
๐จ Note that allowing such events would create a very large security hole, therefore enabling this resource forcefully disables theallowXXXOpsresources. The default isfalse.
allowTcapOps (class AllowTcapOps)
Specifies whether control sequences that query the terminal's notion of its function-key strings, as termcap or terminfo capabilities, should be allowed. The default is true. ๐ธ
A few programs, e.g., vim, use this feature to get an accurate description of the terminal's capabilities, independent of the termcap/terminfo setting:
- Xterm can tell the querying program how many colors it supports. This is a constant, depending on how it is compiled, typically 16. It does not change if you alter resource settings, e.g., the
boldColorsresource. - Xterm can tell the querying program what strings are sent by modified (shift-, control-, alt-) function- and keypad-keys. Reporting control- and alt-modifiers is a feature that relies on the ncurses extended naming. ๐
allowTitleOps (class AllowTitleOps)
Specifies whether control sequences that modify the window title or icon name should be allowed. The default is true. ๐
allowWindowOps (class AllowWindowOps)
Specifies whether extended window control sequences (as used in dtterm) should be allowed. These include several control sequences which manipulate the window size or position, as well as reporting these values and the title or icon name. Each of these can be abused in a script; curiously enough most terminal emulators that implement these restrict only a small part of the repertoire. For fine-tuning, see disallowedWindowOps. The default is false. ๐
altIsNotMeta (class AltIsNotMeta)
If true, treat the Alt-key as if it were the Meta-key. Your keyboard may happen to be configured so they are the same. But if they are not, this allows you to use the same prefix- and shifting operations with the Alt-key as with the Meta-key. See altSendsEscape and metaSendsEscape. The default is false. ๐ฆ
altSendsEscape (class AltSendsEscape)
This is an additional keyboard operation that may be processed after the logic for metaSendsEscape. It is only available if the altIsNotMeta resource is set. ๐
- If
true, Alt characters (a character combined with the modifier associated with left/right Alt-keys) are converted into a two-character sequence with the character itself preceded by ESC. This applies as well to function key control sequences, unless xterm sees that Alt is used in your key translations. - If
false, Alt characters input from the keyboard cause a shift to 8-bit characters (just likemetaSendsEscape). By combining the Alt- and Meta-modifiers, you can create corresponding combinations of ESC-prefix and 8-bit characters.
The default is False. Xterm provides a menu option for toggling this resource. โจ
alternateScroll (class ScrollCond)
If true, the scroll-back and scroll-forw actions send cursor-up and -down keys when xterm is displaying the alternate screen. The default is false. ๐
The alternateScroll state can also be set using a control sequence.
alwaysBoldMode (class AlwaysBoldMode)
Specifies whether xterm should check if the normal and bold fonts are distinct before deciding whether to use overstriking to simulate bold fonts. If this resource is true, xterm does not make the check for distinct fonts when deciding how to handle the boldMode resource. The default is false. ๐
Here's the whole vibe check on how those two play together:
boldModefalse,alwaysBoldModefalse, comparison ignored โ use fontboldModefalse,alwaysBoldModetrue, comparison ignored โ use fontboldModetrue,alwaysBoldModefalse, comparison same โ overstrikeboldModetrue,alwaysBoldModefalse, comparison different โ use fontboldModetrue,alwaysBoldModetrue, comparison ignored โ overstrike
This resource is used only for bitmap fonts: ๐ผ๏ธ
- When using bitmap fonts, it is possible that the font server will approximate the bold font by rescaling it from a different font size than expected. The
alwaysBoldModeresource allows the user to override the (sometimes poor) resulting bold font with overstriking (which is at least consistent). - The problem does not occur with TrueType fonts (though there can be other unnecessary issues such as different coverage of the normal and bold fonts).
As an alternative, setting the allowBoldFonts resource to false overrides both the alwaysBoldMode and the boldMode resources. ๐ซถ
alwaysHighlight (class AlwaysHighlight)
Specifies whether or not xterm should always display a highlighted text cursor. By default (if this resource is false), a hollow text cursor is displayed whenever the pointer moves out of the window or the window loses the input focus. The default is false. ๐
alwaysUseMods (class AlwaysUseMods)
Override the numLock resource, telling xterm to use the Alt and Meta modifiers to construct parameters for function key sequences even if those modifiers appear in the translations resource. Normally xterm checks if Alt or Meta is used in a translation that would conflict with function key modifiers, and will ignore these modifiers in that special case. The default is false. โญ
answerbackString (class AnswerbackString)
Specifies the string that xterm sends in response to an ENQ (control/E) character from the host. The default is a blank string, i.e., "". A hardware VT100 implements this feature as a setup option. ๐
appcursorDefault (class AppcursorDefault)
If true, the cursor keys are initially in application mode. This is the same as the VT102 private DECCKM mode. The default is false. ๐ฆ
appkeypadDefault (class AppkeypadDefault)
If true, the keypad keys are initially in application mode. The default is false. ๐ข
assumeAllChars (class AssumeAllChars)
If true, this enables a special case in bitmap fonts to allow the font server to choose how to display missing glyphs. The default is true. โจ
The reason for this resource is to help with certain quasi-automatically generated fonts (such as the ISO-10646-1 encoding of Terminus) which have incorrect font-metrics. ๐ซ
autoScrollLock (class AutoScrollLock)
If true, xterm will maintain its viewport of displayed lines whenever displaying scrollback, as if allowScrollLock were enabled and the Scroll Lock key had been pressed. The default is false. This feature is only useful if the scrollTtyOutput resource is set to false. ๐
autoWrap (class AutoWrap)
Specifies whether or not auto-wraparound should be enabled. This is the same as the VT102 DECAWM. The default is true. ๐ธ
awaitInput (class AwaitInput)
Specifies whether or not xterm uses a 50 millisecond timeout to await input (i.e., to support the Xaw3d arrow scrollbar). The default is false. โณ
backarrowKey (class BackarrowKey)
Specifies whether the backarrow key transmits a backspace (8) or delete (127) character. This corresponds to the DECBKM control sequence. A true value specifies backspace. The default is False. Pressing the control key toggles this behavior. โซ
background (class Background)
Specifies the color to use for the background of the window. The default is XtDefaultBackground. ๐จ
bellIsUrgent (class BellIsUrgent)
Specifies whether to set the Urgency hint for the window manager when making a bell sound. The default is false. ๐
bellOnReset (class BellOnReset)
Specifies whether to sound a bell when doing a hard reset. The default is true. ๐
bellSuppressTime (class BellSuppressTime) ๐
How many milliseconds after a bell command goes out that extra bells get muted. Default is 200. And if you set it non-zero, extra bells also stay suppressed until the server says the first bell finished processing โ which is extra useful when you're rocking the visible bell. ๐
boldColors (class ColorMode) ๐
Do we combine the bold attribute with colors the way the IBM PC does, i.e. map colors 0 through 7 to colors 8 through 15? Those are normally the brighter versions of the first 8 colors, hence bold. Default is โtrueโ. โจ
boldFont (class BoldFont) ๐
The name of the bold font to use instead of overstriking. There is no default for this resource, bestie.
This font must be the same height and width as the normal font, otherwise it just gets ignored. ๐ And if only one of the normal or bold fonts is specified, it gets used as the normal font, and the bold font gets produced by overstriking it.
Also go read the boldMode and alwaysBoldMode resources, they're connected. ๐ฆ
boldMode (class BoldMode) ๐ฅ
Whether text with the bold attribute should be overstruck to fake a bold font, when the resolved bold font is literally the same as the normal font. Sometimes you wanna disable bold fonts when color is doing the bold job.
Heads up:xtermhas one bold font you can set explicitly. For the other font selections (font1throughfont7),xtermtries to derive a bold font. If it can't find one, it uses the normal font. In every case โ explicit resource or derived โ if the normal and bold fonts are distinct, this resource does nothing at all. Default isโtrueโ.
Check out the alwaysBoldMode resource, it can change how this one behaves. ๐
So even though xterm tries to derive a bold font for the other font selections, the font server may simply not cooperate. Since X11R6, bitmap fonts have been scaled. The font server claims it's providing the bold font xterm asked for, but the result is not always readable. ๐ญ XFree86 introduced a feature that can suppress the scaling. In the X server's configuration file (e.g., โ/etc/X11/xorg.confโ), you can add โ:unscaledโ to the end of the directory specification for the โmiscโ fonts, which are the fixed-pitch fonts xterm uses. Like, this:
FontPath "/usr/share/X11/fonts/misc/"
would become this:
FontPath "/usr/share/X11/fonts/misc/:unscaled"
Depending on your config, the font server might have its own configuration file, and the same โ:unscaledโ can be tacked onto its config file at the end of the directory specification for โmiscโ. ๐ธ
The bitmap scaling feature is also what xterm uses to implement VT102 double-width and double-height characters. โจ
brokenCopyArea (class BrokenCopyArea) ๐ซถ
If true, xterm uses an alternative method to compensate for the removal of hardware acceleration from recent X servers. ๐
brokenLinuxOSC (class BrokenLinuxOSC) ๐
If true, xterm applies a workaround to ignore malformed control sequences that a Linux script might send. Compare the palette control sequences documented in console_codes with ECMA-48. Default is โtrueโ. โจ
brokenSelections (class BrokenSelections) ๐
If true, xterm in 8-bit mode will interpret STRING selections as carrying text in the current locale's encoding. Normally STRING selections carry ISO-8859-1 encoded text. Setting this resource to โtrueโ violates the ICCCM โ it may, however, be useful for interacting with some broken X clients. Default is โfalseโ. ๐
brokenStringTerm (class BrokenStringTerm) ๐
A work-around for some ISDN routers that start an application control string without ever finishing it. Set this to โtrueโ if xterm appears to freeze when connecting. Default is โfalseโ. ๐ญ
Xterm's state parser recognizes several types of control strings that can contain text, e.g.
APC(Application Program Command),DCS(Device Control String),OSC(Operating System Command),PM(Privacy Message), andSOS(Start of String),
Each one should end with a string-terminator (a special character which cannot appear in these strings). Ordinary control characters found inside the string are not ignored; they're processed without interfering with the process of accumulating the control string's content. Xterm recognizes these controls in all modes, although some of the functions may be suppressed after parsing the control. ๐
When enabled, this feature lets you exit from an unterminated control string when any of these ordinary control characters show up:
control/D(used as an end of file in many shells),control/H(backspace),control/I(tab-feed),control/J(line feed aka newline),control/K(vertical tab),control/L(form feed),control/M(carriage return),control/N(shift-out),control/O(shift-in),control/Q(XOFF),control/X(cancel)
c132 (class C132) ๐ฆ
Whether or not the VT102 DECCOLM escape sequence โ the one used to switch between 80 and 132 columns โ should be honored. Default is โfalseโ. ๐ธ
cacheDoublesize (class CacheDoublesize) ๐
Tells whether xterm should cache double-sized fonts. Set this to zero to disable double-sized fonts altogether. ๐
cdXtraScroll (class CdXtraScroll) โญ
Whether xterm should scroll to a new page when clearing the whole screen. Like tiXtraScroll, the intent of this option is to give you a picture of the full-screen application's display in the scrollback before the text gets wiped out. ๐ญ
Xterm accepts either a keyword (case is ignored, bestie) or the number shown in parentheses:
false(0) โ nothing is added to the scrollback.true(1) โ the current screen is added to the scrollback.trim(2) โ the current screen is added to the scrollback, but repeated blank lines are trimmed (reduced to a single blank line).
The default for this resource is โfalseโ. โจ
charClass (class CharClass) ๐ค
Comma-separated lists of character class bindings of the form
low[-high][:value].
These are used to figure out which sets of characters should be treated the same when doing cut and paste. See the CHARACTER CLASSES section. ๐
checksumExtension (class ChecksumExtension) ๐งฎ
DEC VT420 and up support a control sequence DECRQCRA which reports the checksum of the characters in a rectangle. Xterm supports this, with extensions that can be configured with bits of the checksumExtension:
0โ do not negate the result.1โ do not report the VT100 video attributes.2โ do not omit checksum for blanks.3โ omit checksum for cells not explicitly initialized.4โ do not mask cell value to 8 bits or ignore combining characters.5โ do not mask cell value to 7 bits.
With the default value (0), xterm matches the behavior of DEC's terminals. To use all the extensions, set all the bits, โ-1โ for example. ๐ฅ
cjkWidth (class CjkWidth) ๐
Whether xterm should follow the traditional East Asian width convention. When turned on, characters with East Asian Ambiguous (A) category in UTR 11 have a column width of 2. You may have to set this option to โtrueโ if you have some old East Asian terminal based programs that assume line-drawing characters have a column width of 2. If this resource is false, the mkWidth resource controls the choice between the system's wcwidth(3) and xterm's built-in tables. Default is โfalseโ. ๐
color0 (class Color0) ๐จ
color1 (class Color1) ๐จ
color2 (class Color2) ๐จ
color3 (class Color3) ๐จ
color4 (class Color4) ๐จ
color5 (class Color5) ๐จ
color6 (class Color6) ๐จ
color7 (class Color7) ๐จ
These specify the colors for the ISO-6429 extension. The defaults are, respectively, black, red3, green3, yellow3, a customizable dark blue, magenta3, cyan3, and gray90. The default shades of color are chosen so that colors 8โ15 can be used as brighter versions. โจ
color8 (class Color8) ๐
color9 (class Color9) ๐
color10 (class Color10) ๐
color11 (class Color11) ๐
color12 (class Color12) ๐
color13 (class Color13) ๐
color14 (class Color14) ๐
color15 (class Color15) ๐
These specify the colors for the ISO-6429 extension when the bold attribute is also enabled. The default resource values are, respectively, gray50, red, green, yellow, a customized light blue, magenta, cyan, and white. ๐
color16 (class Color16) ๐ฆ
through ๐ฆ
color255 (class Color255) ๐ฆ
These specify the colors for the 256-color extension. The default resource values are for
- colors
16through231to make a 6x6x6 color cube, and - colors
232through255to make a grayscale ramp.
Resources past color15 are available as a compile-time option. Due to a hardcoded limit in the X libraries on the total number of resources (to 400), the resources for 256-colors are omitted when wide-character support and luit are enabled. Besides inconsistent behavior if only part of the resources were allowed, determining the exact cutoff is difficult, and the X libraries tend to crash if the number of resources exceeds the limit. ๐ The color palette is still initialized to the same default values, and can be modified via control sequences. ๐
On the other hand, the resource limit does permit including the entire range for 88-colors. ๐
colorAttrMode (class ColorAttrMode)
Okay bestie, this resource decides whether colorBD, colorBL, colorRV, and colorUL are allowed to override ANSI colors. If they're not allowed, those colors only show up when no ANSI colors have been set for the corresponding position. The default is "false". ๐
colorBD (class ColorBD)
This one sets the color used to display bold characters when the colorBDMode resource is enabled. Default: "XtDefaultForeground". โจ
Also peep the veryBoldColors resource, which lets you combine bold and color. ๐ซถ
colorBDMode (class ColorAttrMode)
Specifies whether characters with the bold attribute should be displayed in color or as bold characters. Note: setting colorMode off disables all colors, including bold. The default is "false". ๐
colorBL (class ColorBL)
This is the color used to display blink characters when the colorBLMode resource is enabled. Default: "XtDefaultForeground". โจ
See also the veryBoldColors resource, which allows combining underline and color. ๐ซถ
colorBLMode (class ColorAttrMode)
Specifies whether characters with the blink attribute should be displayed in color. Note: setting colorMode off disables all colors, including this. The default is "false". ๐
colorEvents (class ColorEvents)
Specifies OSC control codes that can be processed from client messages with the type XTERM_CONTROL. These events may be generated using the X protocol SendEvent request. The resource value is a comma-separated list of codes allowed. The default is the empty string, disallowing all processing. ๐ซ
The names are listed below. Xterm ignores capitalization, but they are shown in mixed-case for clarity. Either a name or a number can be used. ๐
TEXT_FG(10) โ text foregroundTEXT_BG(11) โ text backgroundTEXT_CURSOR(12) โ text cursorMOUSE_FG(13) โ mouse foregroundMOUSE_BG(14) โ mouse backgroundTEK_FG(15) โ tektronix foregroundTEK_BG(16) โ tektronix backgroundHIGHLIGHT_BG(17) โ highlight backgroundTEK_CURSOR(18) โ tektronix cursorHIGHLIGHT_FG(19) โ highlight foreground
For example, if messages for the text color are enabled, e.g., by setting the resource to
text_fg, text_bg
the text foreground color can be set to black by sending a message with this content:
10;#000000
colorIT (class ColorIT)
This specifies the color to use to display italic characters if the colorITMode resource is enabled. The default is "XtDefaultForeground". โจ
See also the veryBoldColors resource, which allows combining attributes and color. ๐ซถ
colorITMode (class ColorAttrMode)
Specifies whether characters with the italic attribute should be displayed in color or as italic characters. The default is "false". ๐
Note:
- Setting
colorModeoff disables all colors, including italic. - The
italicULModeresource overridescolorITMode.
colorInnerBorder (class ColorInnerBorder)
Normally, xterm fills the VT100 window's inner border using the background color. ๐
If the colorInnerBorder resource is enabled, at startup xterm will compare the borderColor and the window's background color. If those are different, xterm will use the borderColor resource to fill the inner border. Otherwise, it will use the window's background color.
The default is "false". ๐
colorMode (class ColorMode)
Specifies whether or not recognition of ANSI (ISO-6429) color change escape sequences should be enabled. The default is "true". ๐
colorRV (class ColorRV)
This specifies the color to use to display reverse characters if the colorRVMode resource is enabled. The default is "XtDefaultForeground". โจ
See also the veryBoldColors resource, which allows combining reverse and color. ๐ซถ
colorRVMode (class ColorAttrMode)
Specifies whether characters with the reverse attribute should be displayed in color. Note: setting colorMode off disables all colors, including this. The default is "false". ๐
colorUL (class ColorUL)
This specifies the color to use to display underlined characters if the colorULMode resource is enabled. The default is "XtDefaultForeground". โจ
See also the veryBoldColors resource, which allows combining underline and color. ๐ซถ
colorULMode (class ColorAttrMode)
Specifies whether characters with the underline attribute should be displayed in color or as underlined characters. Note: setting colorMode off disables all colors, including underlining. The default is "false". ๐
combiningChars (class CombiningChars)
Specifies the number of wide-characters which can be stored in a cell to overstrike (combine) with the base character of the cell. This can be set to values in the range 0 to 5. The default is "2". ๐ฆ
ctrlFKeys (class CtrlFKeys)
In VT220 keyboard mode (see the sunKeyboard resource), specifies the amount by which to shift F1-F12 given a control modifier (CTRL). This allows you to generate key symbols for F10-F20 on a Sun/PC keyboard. The default is "10", which means that CTRL F1 generates the key symbol for F11. โจ๏ธ
curses (class Curses)
Specifies whether or not the last column bug in more(1) should be worked around. See the -cu option for details. The default is "false". ๐
cursorBar (class CursorBar)
Specifies whether to make the cursor a left-bar or a box, unless the cursorUnderLine resource is set. The default is "false". ๐
cursorBlink (class CursorBlink)
Specifies whether to make the cursor blink. Xterm accepts either a keyword (ignoring case) or the number shown in parentheses: ๐
false(0) โ The cursor will not blink, but may be combined with escape sequences according to thecursorBlinkXORresource.true(1) โ The cursor will blink, but may be combined with escape sequences according to thecursorBlinkXORresource.always(2) โ The cursor will always blink, ignoring escape sequences. The menu entry will be disabled.never(3) โ The cursor will never blink, ignoring escape sequences. The menu entry will be disabled.
The default is "false". ๐
cursorBlinkXOR (class CursorBlinkXOR)
Xterm uses two inputs to determine whether the cursor blinks:
- The
cursorBlinkresource (which can be altered with a menu entry). - Control sequences (private mode
12andDECSCUSR).
The cursorBlinkXOR resource determines how those inputs are combined:
falseโ Xterm uses the logical-OR of the two variables. If either is set, xterm makes the cursor blink.trueโ Xterm uses the logical-XOR of the two variables. If only one is set, xterm makes the cursor blink.
The default is "true". ๐ฅ
cursorColor (class CursorColor)
Specifies the color to use for the text cursor. The default is "XtDefaultForeground". By default, xterm attempts to keep this color from being the same as the background color, since it draws the cursor by filling the background of a text cell. The same restriction applies to control sequences which may change this color. ๐
Setting this resource overrides most of xterm's adjustments to cursor color. It will still use reverse-video to disallow some cases, such as a black cursor on a black background. ๐
cursorOffTime (class CursorOffTime)
Specifies the duration of the โoffโ part of the cursor blink cycle-time in milliseconds. The same timer is used for text blinking. The default is "300". โฑ๏ธ
cursorOnTime (class CursorOnTime)
Specifies the duration of the โonโ part of the cursor blink cycle-time, in milliseconds. The same timer is used for text blinking. The default is "600". โฑ๏ธ
cursorUnderLine (class CursorUnderLine)
Specifies whether to make the cursor underlined or a box. If unset (false), the cursorBar resource may set the cursor shape. The default is "false". ๐
cutNewline (class CutNewline)
If "false", triple clicking to select a line does not include the newline at the end of the line. If "true", the Newline is selected. The default is "true". โ๏ธ
cutToBeginningOfLine (class CutToBeginningOfLine)
If "false", triple clicking to select a line selects only from the current word forward. If "true", the entire line is selected. The default is "true". โ๏ธ
decGraphicsID (class DecGraphicsID)
Allows a way to combine the graphics feature from certain DEC terminals (125, 240, 241, 330, 340 or 382) with other emulation levels which did not provide the graphics feature. As in decTerminalID, leading non-digit characters are ignored, e.g., "vt340" and "340" are the same. ๐ฆ
If the resource value is nonzero, xterm uses that emulation level when initializing the drawing region and decoding control sequences to draw graphics.
The default is "0". ๐
decTerminalID (class DecTerminalID)
Specifies the emulation level (100=VT100, 220=VT220, etc.), used to determine the type of response to a DA control sequence. Leading non-digit characters are ignored, e.g., "vt100" and "100" are the same. The default is "420". ๐
defaultString (class DefaultString)
Specifies the character (or string) that xterm swaps in when pasted text contains a character it literally cannot represent in the current encoding. Example bestie: paste UTF-8 text into a display showing ISO-8859-1 characters and it can only cope with codes 0โ255, meanwhile UTF-8 text can absolutely include Unicode values above 255. The default is โ#โ (a single pound sign).
If the undisplayable text would be double-width, xterm adds a space after the โ#โ character, so the layout on screen stays roughly the same as the original text. thoughtful king behavior fr ๐
deleteIsDEL (class DeleteIsDEL)
Specifies what the Delete key on the editing keypad should send when it gets pressed. The resource value is a string, evaluated as a boolean after startup. Xterm uses it together with the keyboardType resource:
- If the keyboard type is
โdefaultโ, orโvt220โand the resource is eitherโtrueโorโmaybeโโ send the VT220-style Remove escape sequence. Otherwise, send DEL (127). - If the keyboard type is
โlegacyโ, and the resource isโtrueโโ send DEL. Otherwise, send the Remove sequence. - Otherwise, if the keyboard type is none of these special cases โ send DEL (127).
The default is โMaybeโ. And yes the resource is allowed to be a non-boolean โmaybeโ on purpose, so that the popup menu's Delete is DEL entry does not override the keyboard type. it's giving nuance ๐
directColor (class DirectColor)
Specifies whether to handle direct-color control sequences using the X server's available colors, or to approximate those using a color map with 256 entries. A โtrueโ value enables the former. The default is โtrueโ.
disallowedColorOps (class DisallowedColorOps)
Specify which features will be disabled if allowColorOps is false. This is a comma-separated list of names. The default value is
SetColor,GetColor,GetAnsiColor
The names are listed below. Xterm ignores capitalization, but they are shown in mixed-case for clarity. ๐
SetColorโ set a specific dynamic color.GetColorโ report the current setting of a given dynamic color.GetAnsiColorโ report the current setting of a given ANSI color (actually any of the colors set via ANSI-style controls).
disallowedFontOps (class DisallowedFontOps)
Specify which features will be disabled if allowFontOps is false. This is a comma-separated list of names. The default value is
SetFont,GetFont
The names are listed below. Xterm ignores capitalization, but they are shown in mixed-case for clarity.
SetFontโ set the specified font.GetFontโ report the specified font.
disallowedMouseOps (class DisallowedMouseOps)
Specify which features will be disabled if allowMouseOps is false. This is a comma-separated list of names. The default value is โ*โ which matches all names. The names are listed below. Xterm ignores capitalization, but they are shown in mixed-case for clarity.
X10โ the original X10 mouse protocol.Locatorโ DEC locator modeVT200Clickโ X11 mouse-clicks only.VT200Hiliteโ X11 mouse-clicks and highlighting.AnyButtonโ XFree86 xterm any-button mode sends button-clicks as well as motion events while the button is pressed.AnyEventโ XFree86 xterm any-event mode sends button-clicks as well as motion events whether or not a button is pressed.FocusEventโ send FocusIn/FocusOut events.Extendedโ the first extension beyond X11 mouse protocol, this encodes the coordinates in UTF-8. It is deprecated in favor of SGR, but provided for compatibility.SGRโ this is the recommended extension for mouse-coordinatesURXVTโ like Extended, this is provided for compatibility.AlternateScrollโ this overrides thealternateScrollresource.
deprecated = it still works but it's giving old news, the SGR one is the moment โจ
disallowedPasteControls (class DisallowedPasteControls)
Use this resource to disallow pasting specific C0 control characters when the allowPasteControls resource is false (i.e., the default). This resource defines the set of control characters which cannot be pasted, converting each into a space. Other C0 controls are pasted without change.
The resource value is a comma-separated list of names. Xterm ignores capitalization. The default value is
BS,DEL,ENQ,EOT,ESC,NUL,STTY
The names are listed below:
C0โ all ASCII control characters.- Individual C0 characters โ
NUL,SOH,STX,ETX,EOT,ENQ,ACK,BEL,BS,HT,LF,VT,FF,CR,SO,SI,DLE,DC1,DC2,DC3,DC4,NAK,SYN,ETB,CAN,EM,SUB,ESC,FS,GS,RS,US DELโ ASCII deleteNLโ ASCII line-feed, i.e.,โnewlineโis the same asLF.STTYโ special characters which are set withstty(1).
disallowedTcapOps (class DisallowedTcapOps)
Specify which features will be disabled if allowTcapOps is false. This is a comma-separated list of names. The default value is
SetTcap,GetTcap
The names are listed below. Xterm ignores capitalization, but they are shown in mixed-case for clarity.
SetTcapโ (not implemented)GetTcapโ report specified function- and other special keys.
bestie SetTcap is literally not implemented, do not come for me ๐
disallowedWindowOps (class DisallowedWindowOps)
Specify which features will be disabled if allowWindowOps is false. This is a comma-separated list of names, or (for the controls adapted from dtterm) the operation number. The default value is
GetChecksum,GetIconTitle,GetSelection,GetWinTitle,SetSelection,SetXprop
(i.e., all except a few โdangerousโ operations are allowed).
The names are listed below. Xterm ignores capitalization, but they are shown in mixed-case for clarity. Where a number can be used as an alternative, it is given in parentheses after the name.
ColumnModeโ enable (or disable) switching between 80 and 132 columns. This is in addition to thec132resource.GetChecksumโ report checksum of characters in a rectangular region.GetIconTitle(20) โ report xterm window's icon label as a string.GetScreenSizeChars(19) โ report the size of the screen in characters as numbers.GetSelectionโ report selection data as a base64 string.GetWinPosition(13) โ report xterm window position as numbers.GetWinSizeChars(18) โ report the size of the text area in characters as numbers.GetWinSizePixels(14) โ report xterm window in pixels as numbers.GetWinState(11) โ report xterm window state as a number.GetWinTitle(21) โ report xterm window's title as a string.LowerWin(6) โ lower the xterm window to the bottom of the stacking order.MaximizeWin(9) โ maximize window (i.e., resize to screen size).FullscreenWin(10) โ use full screen (i.e., resize to screen size, without window decorations).MinimizeWin(2) โ iconify window.PopTitle(23) โ pop title from internal stack.PushTitle(22) โ push title to internal stack.RaiseWin(5) โ raise the xterm window to the front of the stacking order.RefreshWin(7) โ refresh the xterm window.RestoreWin(1) โ de-iconify window.SetChecksumโ modify algorithm for reporting checksum of characters in a rectangular region.SetSelectionโ set selection data.SetWinLinesโ resize to a given number of lines, at least 24.SetWinPosition(3) โ move window to given coordinates.SetWinSizeChars(8) โ resize the text area to given size in characters.SetWinSizePixels(4) โ resize the xterm window to given size in pixels.SetXpropโ set X property on top-level window.StatusLineโ resize window to provide a VT320-style status line.
dynamicColors (class DynamicColors)
Specifies whether or not escape sequences to change colors assigned to different attributes are recognized.
eightBitControl (class EightBitControl)
Specifies whether or not control sequences sent by the terminal should be eight-bit characters or escape sequences. The default is โfalseโ.
eightBitInput (class EightBitInput)
If โtrueโ, Meta characters (a single-byte character combined with the Meta modifier key) input from the keyboard are presented as a single character, modified according to the eightBitMeta resource. If โfalseโ, Meta characters are converted into a two-character sequence with the character itself preceded by ESC. The default is โtrueโ.
The metaSendsEscape and altSendsEscape resources may override this feature. Generally keyboards do not have a key labeled โMetaโ, but โAltโ keys are common, and they are conventionally used for โMetaโ. If they were synonymous, it would have been reasonable to name this resource โaltSendsEscapeโ, reversing its sense. For more background on this, see the meta(3x) function in curses.
the Meta/Alt lore is deep, iykyk ๐ฆ
okay so real talk bestie โ the Alt key is not necessarily the same thing as the Meta modifier, and this trips people up <em>constantly</em>. ๐
The xmodmap utility lists your key modifiers, and X defines modifiers for shift, (caps) lock and control, plus 5 additional modifiers that are generally used to configure key modifiers. Xterm inspects that exact same info to find the modifier associated with either Meta key (left or right) and uses that key as the Meta modifier. It also goes looking for the NumLock key, so it can recognize the modifier associated with that. ๐
If your xmodmap configuration uses the same keycodes for Alt- and Meta-keys, xterm will only see the Alt-key definitions, since those are tested before Meta-keys. And NumLock is tested first of all. ๐ฅ It is important to keep these keys distinct โ otherwise some of xterm's functionality is literally just not available to you. ๐ญ
The eightBitInput resource is tested at startup time. If โtrueโ, xterm tries to put the terminal into 8-bit mode. If โfalseโ, on startup, xterm tries to put the terminal into 7-bit mode. For some configurations this is unsuccessful; and failure is just ignored, no drama. After startup, xterm does not change the terminal between 8-bit and 7-bit mode. Periodt.
As originally implemented in X11, the resource value did not change after startup. However (since patch #216 in 2006 โจ) xterm can modify eightBitInput after startup via a control sequence. The corresponding terminfo capabilities smm (set meta mode) and rmm (reset meta mode) have been recognized by bash for some time. And here's the fun part โ interestingly enough, bash's notion of โmeta modeโ differs from the standard definition (in the terminfo manual), which describes the change to the eighth bit of a character. It happens that bash views โmeta modeโ as the ESC character that xterm puts before a character when a special meta key is pressed. bash's early documentation talks about the ESC character and straight-up ignores the eighth bit. ๐
โจ eightBitMeta (class EightBitMeta)
This one controls the way xterm modifies the eighth bit of a single-byte key when the eightBitInput resource is set. The default is โlocaleโ. ๐ฆ
The resource value is a string, evaluated as a boolean after startup.
falseโ the key is sent unmodified.localeโ the key is modified only if the locale uses eight-bit encoding.trueโ the key is sent modified.neverโ the key is always sent unmodified.
Except for the never choice, xterm honors the terminfo capabilities smm (set meta mode) and rmm (reset meta mode), which lets the feature be turned on or off dynamically. ๐ฅ
If eightBitMeta is enabled when the locale uses UTF-8, xterm encodes the value as UTF-8 (since patch #183 in 2003).
๐ eightBitOutput (class EightBitOutput)
Specifies whether or not eight-bit characters sent from the host should be accepted as-is or stripped when printed. The default is โtrueโ, which means they are accepted as-is. ๐
๐ธ eightBitSelectTypes (class EightBitSelectTypes)
Override xterm's default selection target list (see SELECT/PASTE) for selections in normal (ISO-8859-1) mode. The default is an empty string, i.e., โโ, which does not override anything.
๐ emojiWidth (class EmojiWidth)
Specifies whether to interpret Unicode variation selectors VS15 and VS16. Those override the character width of the immediately preceding character, if it is an Emoji, to one or two cells, respectively. The default is โfalseโ. ๐ง
โญ eraseSavedLines (class EraseSavedLines)
Specifies whether or not to allow xterm extended ED/DECSED control sequences to erase the saved-line buffer. The default is โtrueโ.
๐ faceName (class FaceName)
Specify the pattern for scalable fonts selected from the FreeType library, if support for that library was compiled into xterm. There is no default value.
One or more fonts can be specified, separated by commas. If prefixed with โx:โ or โx11:โ the specification applies to the XLFD font resource. A โxft:โ prefix is accepted but unnecessary, since a missing prefix for faceName means that it will be used for TrueType. For example,
XTerm*faceName: x:fixed,xft:Bitstream Vera Sans Mono
Two TrueType fonts can be specified in this way. The first is the primary font; the second acts as a manual override to the fontconfig fontset. ๐
If no faceName resource is specified, or if there is no match for both TrueType normal and bold fonts, xterm uses the XLFD (bitmap) font and related resources.
It is possible to select suitable bitmap fonts using a script such as this:
#!/bin/sh
FONT=`xfontsel -print`
test -n "$FONT" && xfd -fn "$FONT"
However (even though xfd accepts a โ-faโ option to denote FreeType fonts), xfontsel has not been similarly extended. As a workaround, you may try
fc-list :scalable=true:spacing=mono: family
to find a list of scalable fixed-pitch fonts which may be used for the faceName resource value. ๐
๐ฆ faceNameDoublesize (class FaceNameDoublesize)
Specify a double-width scalable font for cases where an application requires this, e.g., in CJK applications. There is no default value.
Like the faceName resource, this allows one or more comma-separated font specifications to be applied to the wide TrueType or XLFD fonts.
If the application uses double-wide characters and this resource is not given, xterm will use a scaled version of the font given by faceName.
๐ faceSize (class FaceSize)
Specify the pointsize for fonts selected from the FreeType library, if support for that library was compiled into xterm. The default is โ8.0โ. On the VT Fonts menu, this corresponds to the Default entry. โจ
Although the default is โ8.0โ, this may not be the same as the pointsize for the default bitmap font, i.e., that assigned with the -fn option, or the font resource. The default value of faceSize is chosen to match the size of the โfixedโ font, making switching between bitmap and TrueType fonts via the font menu give comparable sizes for the window. If your -fn option uses a different pointsize, you might want to adjust the faceSize resource to match. ๐
You can specify the pointsize for TrueType fonts selected with the other size-related menu entries such as Medium, Huge, etc., by using one of the following resource values. If you do not specify a value, they default to โ0.0โ, which causes xterm to use the ratio of font sizes from the corresponding bitmap font resources to obtain a TrueType pointsize.
If all of the faceSize resources are set, then xterm will use this information to determine the next smaller/larger TrueType font for the larger-vt-font() and smaller-vt-font() actions. If any are not set, xterm will use only the areas of the bitmap fonts.
๐ faceSize1 (class FaceSize1)
Specifies the pointsize of the first alternative font.
๐ faceSize2 (class FaceSize2)
Specifies the pointsize of the second alternative font.
๐ faceSize3 (class FaceSize3)
Specifies the pointsize of the third alternative font.
๐ faceSize4 (class FaceSize4)
Specifies the pointsize of the fourth alternative font.
๐ faceSize5 (class FaceSize5)
Specifies the pointsize of the fifth alternative font.
๐ faceSize6 (class FaceSize6)
Specifies the pointsize of the sixth alternative font.
๐ faceSize7 (class FaceSize7)
Specifies the pointsize of the seventh alternative font.
๐ธ faintIsRelative (class FaintIsRelative)
Faint colors are derived from the current text color, e.g., the ANSI colors, by scaling the red, green and blue components. Use this resource to specify whether that is done relative to the current background color, or as an absolute value. The default is โfalseโ.
๐ฅ fastScroll (class FastScroll)
Modifies the effect of jump scroll (jumpScroll) by suppressing screen refreshes for the special case when output to the screen has completely shifted the contents off-screen. Likewise, screen refreshes for related actions, e.g., carriage returns, are suppressed. ๐
For instance, cat'ing a large file to the screen normally results in a large number of screen refreshes. By suppressing the corresponding refreshes, scrolling speed improves. ๐๏ธ
The default is โtrueโ.
๐ font (class Font)
Specifies the name of the normal font. The default is โfixedโ.
See the discussion of the locale resource, which describes how this font may be overridden.
NOTE: some resource files use patterns such as
*font: fixed
which are overly broad, affecting both
xterm.vt100.font
and
xterm.vt100.utf8Fonts.font
which is probably not what you intended. ๐
๐ font1 (class Font1)
Specifies the name of the first alternative font, corresponding to โUnreadableโ in the standard menu.
๐ font2 (class Font2)
Specifies the name of the second alternative font, corresponding to โTinyโ in the standard menu.
๐ font3 (class Font3)
Specifies the name of the third alternative font, corresponding to โSmallโ in the standard menu.
๐ font4 (class Font4)
Specifies the name of the fourth alternative font, corresponding to โMediumโ in the standard menu.
๐ font5 (class Font5)
Specifies the name of the fifth alternative font, corresponding to โLargeโ in the standard menu.
๐ font6 (class Font6)
Specifies the name of the sixth alternative font, corresponding to โHugeโ in the standard menu.
๐ font7 (class Font7)
Specifies the name of the seventh alternative font, corresponding to โEnormousโ in the standard menu. ๐
fontDoublesize(classFontDoublesize) โ do we let xterm use font scaling to draw double-sized characters? ๐ Some of the older font servers straight up cannot do this properly and will hand back misleading font metrics (rude). Default istrue. If you disable it, xterm fakes the double-sized look by drawing normal characters with spaces in between them โ DIY era โจfontWarnings(classFontWarnings) โ should xterm yell at you when a font fails to load? Options are:0โ never report an error (though the X libraries themselves might, that's on them ๐).1โ report an error if the font name was given as a resource setting.2โ always report an error on failure to load a font.
Default is 1.
forceBoxChars(classForceBoxChars) โ should xterm just assume the normal and bold fonts have VT100 line-drawing characters? Here's the tea ๐:- The fixed-pitch ISO-8859-*-encoded fonts that xterm uses normally have the VT100 line-drawing glyphs sitting in cells 1โ31. Other fixed-pitch fonts might be way prettier, but they lack these glyphs.
- When you're using an ISO-10646-1 font and the
wideCharsresource is true, xterm uses the Unicode glyphs that match the VT100 line-drawing glyphs.
Default is false, and here's what that means:
- If
false, xterm checks for missing glyphs in the font and makes line-drawing characters directly as needed. Also, whenfalse, xterm shows a blank where otherwise printable glyphs are missing from the current font. - If
true, xterm assumes the font does not contain the line-drawing characters, and draws them directly. Also, whentrue, xterm shows a dashed box outline where otherwise printable glyphs are missing from the current font.
The VT100 line-drawing character set (also known as the DEC Special Character and Line Drawing Set) is this whole vibe โ it even includes a few special characters that are not used for drawing lines, iykyk:
- cell
0โU+25AEโ black vertical rectangle - cell
1โU+25C6โ black diamond - cell
2โU+2592โ medium shade - cell
3โU+2409โ symbol for horizontal tabulation - cell
4โU+240Cโ symbol for form feed - cell
5โU+240Dโ symbol for carriage return - cell
6โU+240Aโ symbol for line feed - cell
7โU+00B0โ degree sign - cell
8โU+00B1โ plus-minus sign - cell
9โU+2424โ symbol for newline - cell
10โU+240Bโ symbol for vertical tabulation - cell
11โU+2518โ box drawings light up and left - cell
12โU+2510โ box drawings light down and left - cell
13โU+250Cโ box drawings light down and right - cell
14โU+2514โ box drawings light up and right - cell
15โU+253Cโ box drawings light vertical and horizontal - cell
16โU+23BAโ box drawings scan 1 - cell
17โU+23BBโ box drawings scan 3 - cell
18โU+2500โ box drawings light horizontal - cell
19โU+23BCโ box drawings scan 7 - cell
20โU+23BDโ box drawings scan 9 - cell
21โU+251Cโ box drawings light vertical and right - cell
22โU+2524โ box drawings light vertical and left - cell
23โU+2534โ box drawings light up and horizontal - cell
24โU+252Cโ box drawings light down and horizontal - cell
25โU+2502โ box drawings light vertical - cell
26โU+2264โ less-than or equal to - cell
27โU+2265โ greater-than or equal to - cell
28โU+03C0โ greek small letter pi - cell
29โU+2260โ not equal to - cell
30โU+00A3โ pound sign - cell
31โU+00B7โ middle dot
forcePackedFont(classForcePackedFont) โ when we're displaying with a bitmap font, should xterm use the maximum or the minimum glyph width? Use the maximum width to help out with proportional fonts. Default istrue, and yes bestie, that denotes the minimum width ๐ (the flag really said "true means minimum," iconic behaviour, we don't question it).forceXftHeight(classForceXftHeight) โ should xterm use the given font metrics for TrueType fonts, or amend the ascent/descent so they total no more than the given font-height? This optional feature exists to work around inconsistencies in FreeType's rounding computation ๐ซถ. Default isfalse, denoting the given metrics.foreground(classForeground) โ the color used to display text in the window. Setting the class name instead of the instance name is the easy little hack to make everything that would normally appear in the text color change color ๐. Default isXtDefaultForeground.formatCursorKeys(classFormatCursorKeys) โ whenmodifyCursorKeysis4or greater, use the modified form as informatOtherKeysfor cursor-keys instead of the conventional form. Default is0.formatFunctionKeys(classFormatFunctionKeys) โ whenmodifyFunctionKeysis4or greater, use the modified form as informatOtherKeysfor function-keys instead of the conventional form. Default is0.formatKeypadKeys(classFormatKeypadKeys) โ whenmodifyKeypadKeysis4or greater, use the modified form as informatOtherKeysfor numeric keypad-keys instead of the conventional form. Default is0.formatModifierKeys(classFormatModifierKeys) โ whenmodifyModifierKeysis4or greater, use the modified form as informatOtherKeysfor modifier-keys instead of the conventional form. Default is0.formatOtherKeys(classFormatOtherKeys) โ overrides the format of the escape sequence used to report modified keys with themodifyOtherKeysresource. Your choices:0โ send modified keys as parameters for function-key27(this is the default โจ).1โ send modified keys as parameters forCSI u.
formatSpecialKeys(classFormatSpecialKeys) โ whenmodifySpecialKeysis4or greater, use the modified form as informatOtherKeysfor special keys instead of the conventional form. Default is0.freeBoldBox(classFreeBoldBox) โ should xterm assume the bounding boxes for the normal and bold fonts are compatible? Iffalse, xterm compares them and will reject choices of bold fonts that don't match the size of the normal font (no mismatched fonts on this campus ๐ซ). Default isfalse, which means the comparison is performed.geometry(classGeometry) โ the preferred size and position of the VTxxx window. There is no default for this resource, you gotta set it yourself bestie ๐ .highlightColor(classHighlightColor) โ the color used for the background of selected (highlighted) text. If it's not specified (i.e., it matches the default foreground), reverse video is used instead. Default isXtDefaultForeground.highlightColorMode(classHighlightColorMode) โ should xterm usehighlightTextColorandhighlightColorto override the reversed foreground/background colors in a selection? The default is unspecified: at startup, xterm checks whether those resources are set to something other than the default foreground and background colors. Setting this resource disables that check ๐.
Now, the interaction of the highlighting resources, with abbreviations so it all fits on the page:
HCM=highlightColorModeHR=highlightReverseHBG=highlightColorHFG=highlightTextColor
The combos, and what your highlight ends up being:
HCM=falseHRfalse,HBGdefault,HFGdefaultโbg/fgHRfalse,HBGdefault,HFGsetโbg/fgHRfalse,HBGset,HFGdefaultโfg/HBGHRfalse,HBGset,HFGsetโfg/HBGHRtrue,HBGdefault,HFGdefaultโbg/fgHRtrue,HBGdefault,HFGsetโbg/fgHRtrue,HBGset,HFGdefaultโfg/HBGHRtrue,HBGset,HFGsetโfg/HBG
HCM=trueHRfalse,HBGdefault,HFGdefaultโbg/fgHRfalse,HBGdefault,HFGsetโHFG/fgHRfalse,HBGset,HFGdefaultโbg/HBGHRfalse,HBGset,HFGsetโHFG/HBGHRtrue,HBGdefault,HFGdefaultโbg/fgHRtrue,HBGdefault,HFGsetโHFG/fgHRtrue,HBGset,HFGdefaultโfg/HBGHRtrue,HBGset,HFGsetโHFG/HBG
HCM=defaultHRfalse,HBGdefault,HFGdefaultโbg/fgHRfalse,HBGdefault,HFGsetโbg/fgHRfalse,HBGset,HFGdefaultโfg/HBGHRfalse,HBGset,HFGsetโHFG/HBGHRtrue,HBGdefault,HFGdefaultโbg/fgHRtrue,HBGdefault,HFGsetโbg/fgHRtrue,HBGset,HFGdefaultโfg/HBGHRtrue,HBGset,HFGsetโHFG/HBG
highlightReverse(classHighlightReverse) โ okay so when you're selecting text that has the reverse-video attribute, should xterm flip the foreground and background colors of the selection? That's the whole question. This only touches thehighlightColorandhighlightTextColorresources, like when you're trying to match the color scheme ofxwsh. If it'strue, xterm reverses the colors. If it'sfalse, xterm does not reverse colors. The default istrue. ๐highlightSelection(classHighlightSelection) โ this one tells xterm whether to highlight all of the selected positions or only the text that's actually selected. Two vibes:- If
false, selecting with the mouse highlights all positions on the screen between the beginning of the selection and the current position. - If
true, xterm highlights only the positions that contain text that can be selected.
- If
The default is false.
Depending on the way your applications write to the screen, there may be trailing blanks on a line. Xterm stores data as it is shown on the screen. Erasing the display changes the internal state of each cell so it is not considered a blank for the purpose of selection. Blanks written since the last erase are selectable. If you do not wish to have trailing blanks in a selection, use the trimSelection resource. ๐ซถ
highlightTextColor(classHighlightTextColor) โ the color for the foreground of selected (highlighted) text, periodt. If it's not specified (i.e., matching the default background), reverse video is used. The default isXtDefaultBackground. ๐hpLowerleftBugCompat(classHpLowerleftBugCompat) โ bestie, this is a workaround for a bug in HP'sxdb, which ignores termcap and always sendsESC Fto move to the lower left corner. ๐ญ Settingtruecauses xterm to interpretESC Fas a request to move to the lower left corner of the screen. The default isfalse.i18nSelections(classI18nSelections) โ if false, xterm will not request the targetsCOMPOUND_TEXTorTEXT. The default istrue. You might set it to false in order to work around ICCCM violations by other X clients. lowkey a compatibility hack, and that's on that. ๐iconBorderColor(classBorderColor) โ specifies the border color for the active icon window if this feature is compiled into xterm. Not all window managers will make the icon border visible. ๐iconBorderWidth(classBorderWidth) โ specifies the border width for the active icon window, again only if this feature is compiled into xterm. The default is2. And again: not all window managers will make the border visible.iconFont(classIconFont) โ specifies the font for the miniature active icon window, if this feature is compiled into xterm. The default isnil2. ๐ฆincrementalGraphics(classIncrementalGraphics) โ when displaying SIXEL graphics, refresh the screen after processing each cell. The default isfalse.indicatorFormat(classIndicatorFormat) โ when displaying the status line using the indicator mode (i.e., selecting DECSSDT line type 1), format the status using this resource.
The default value of the resource displays the version of xterm, the cursor position and the time/date:
"%{version%} %{position%} %{unixtime%}"
If a % marker does not match any of the three special tokens used in the default resource setting, xterm uses strftime(3) to interpret it. โจ
initialFont(classInitialFont) โ which of the VT100 fonts to use initially. Values are the same as for the set-vt-font action. The default isd, i.e.,default. ๐inputMethod(classInputMethod) โ tells xterm which type of input method to use. There is no default method. fr fr, none.internalBorder(classBorderWidth) โ the number of pixels between the characters and the window border. The default is2.italicULMode(classColorAttrMode) โ specifies whether characters with the underline attribute should be displayed in an italic font or as underlined characters. It is implemented only for TrueType fonts.jumpScroll(classJumpScroll) โ whether or not jump scroll should be used. This corresponds to the VT102DECSCLMprivate mode. The default istrue. SeefastScrollfor a variation. ๐ซkeepClipboard(classKeepClipboard) โ should xterm reuse the selection data which it copied to the clipboard rather than asking the clipboard for its current contents when told to provide the selection? The default isfalse.
If compiled into xterm, the menu entry Keep Clipboard allows you to change this at runtime. ๐
keepSelection(classKeepSelection) โ should xterm keep the selection even after the selected area was touched by some output to the terminal? The default istrue.
The menu entry Keep Selection allows you to change this at runtime.
keyboardDialect(classKeyboardDialect) โ specifies the initial keyboard dialect, as well as the default value when the terminal is reset. The value given is the same as the final character in the control sequences which change character sets. The default isB, which corresponds to US ASCII.limitFontsets(classLimitFontsets) โ caps the number of TrueType fallback fonts (i.e., fontset) which can be tested. The default is50. No more than255will be scanned.
This limits the number of fallback fonts which xterm uses to display characters. Because TrueType fonts typically are small, xterm may open several fonts for good coverage, and may open additional fonts to obtain information. You can see which font-files xterm opens by setting the environment variable XFT_DEBUG to 3. The Xft library and xterm write this debugging trace to the standard output. ๐
Set this to 0 to disable fallbacks entirely.
limitFontHeight(classLimitFontHeight) โ when scaling a TrueType font to provide the parts for a double-high character, xterm compares the scaled font with the original to ensure that it is taller.
The default is 10 (percent).
limitFontWidth(classLimitFontWidth) โ when looking for fallback fonts, xterm checks to see that the character to be displayed is the same width as the primary font. If a character extends outside the font's bounding box, xterm will clip it, to fit.
This resource controls the amount by which the character can extend outside its bounding box before xterm looks further for a better font.
This resource is also used in scaling TrueType fonts for double-wide characters, like limitFontHeight for double-wide characters.
The default is 10 (percent).
limitResize(classLimitResize) โ limits resizing of the screen via control sequence to a given multiple of the display dimensions. The default is1.limitResponse(classLimitResponse) โ limits the buffer-size used when xterm replies to various control sequences. The default is1024. The minimum value is256.locale(classLocale) โ specifies how to useluit(1), an encoding converter between UTF-8 and locale encodings. The resource value (ignoring case) may be:trueโ Xterm will use the encoding specified by the users'LC_CTYPElocale (i.e.,LC_ALL,LC_CTYPE, orLANGvariables) as far as possible. This is realized by always enabling UTF-8 mode and invokingluitin non-UTF-8 locales.mediumโ Xterm will follow users'LC_CTYPElocale only for UTF-8, east Asian, and Thai locales, where the encodings were not supported by conventional 8bit mode with changing fonts. For other locales, xterm will use conventional 8bit mode.checkfontโ If mini-luit is compiled-in, xterm will check if a Unicode font has been specified. If so, it checks if the character encoding for the current locale is POSIX, Latin-1 or Latin-9, uses the appropriate mapping to support those with the Unicode font. For other encodings, xterm assumes that UTF-8 encoding is required.falseโ Xterm will use conventional 8bit mode or UTF-8 mode according toutf8resource or-u8option.
Any other value, e.g., UTF-8 or ISO8859-2, is assumed to be an encoding name; luit will be invoked to support the encoding. The actual list of supported encodings depends on luit. The default is medium.
Regardless of your locale and encoding, you need an ISO-10646-1 font to display the result. Your configuration may not include this font, or locale-support by xterm may not be needed. ๐ญ
At startup, xterm uses a mechanism equivalent to the load-vt-fonts(utf8Fonts,Utf8Fonts) action to load font name subresources of the VT100 widget. That is, resource patterns such as *vt100.utf8Fonts.font will be loaded, and (if this resource is enabled), override the normal fonts. If no subresources are found, the normal fonts such as *vt100.font, etc., are used.
For instance, you could have this in your resource file:
*VT100.font: 12x24
*VT100.utf8Fonts.font:9x15
When started with a UTF-8 locale, xterm would use 9x15, but allow you to switch to the 12x24 font using the menu entry UTF-8 Fonts. โจ
The resource files distributed with xterm use ISO-10646-1 fonts, but do not rely on them unless you are using the locale mechanism.
localeFilter(classLocaleFilter) โ specifies the file name for the encoding converter from/to locale encodings and UTF-8 which is used with the-lcoption orlocaleresource. The help message shown byxterm -helplists the default value, which depends on your system configuration. ๐ซถ
If the encoding converter needs command-line parameters, bestie, you just tack them on right after the command, like:
*localeFilter: xterm-filter -p
Or โ equally valid โ you can tuck those parameters inside a shell script that runs the converter, and point this resource at the shell script instead. Whatever vibes with your setup. ๐ซถ
When a locale-filter is in play โ say, with the -e option, or with the shell โ xterm first tries to pass control through that filter. If that flops, xterm will retry without the locale-filter. And it warns you about the failure before it retries, so no sneaky silent behavior. ๐
๐ธ logFile (class Logfile) ๐ธ
Sets the name for xterm's log file. If you don't give it a name, xterm will generate one itself when logging gets enabled โ the whole deal is described under the -l option. โจ
๐ logInhibit (class LogInhibit) ๐
If it's "true", the logging feature is straight-up blocked from being enabled โ whether someone tries via the command-line option -l, or the menu entry Log to File. The default is "false". ๐
๐ฆ logging (class Logging) ๐ฆ
If it's "true" (and logInhibit isn't set, obviously), the logging feature gets enabled. This resource gets set and updated by the -l option and by the menu entry Log to File. The default is "false". ๐
โญ loginShell (class LoginShell) โญ
Tells you whether or not the shell running in the window should be started as a login shell. The default is "false".
๐ marginBell (class MarginBell) ๐
Whether or not the bell should ring when you type near the right margin. The default is "false".
๐ผ๏ธ maxGraphicSize (class MaxGraphicSize) ๐ผ๏ธ
If xterm is configured to support ReGIS or SIXEL graphics, this resource controls the maximum size of a graph that can be displayed.
The default is "1000x1000" (given as width by height).
If the resource is "auto", then xterm will use the decGraphicsID resource instead (or decTerminalID if that one isn't set):
Result decGraphicsID
โโโโโโโโโโโโโโโโโโโโโโโโ
768x400 125
800x460 240
800x460 241
800x480 330
800x480 340
860x750 382
800x480 other
๐งต maxStringParse (class MaxStringParse) ๐งต
xterm's state parser recognizes several types of control strings that can contain text, like:
- APC (Application Program Command),
- DCS (Device Control String),
- OSC (Operating System Command),
- PM (Privacy Message), and
- SOS (Start of String),
xterm reads these strings, piling them up into a buffer until they're properly terminated. Once they're terminated, xterm interprets them. And here's the thing โ if they happen to be DCS commands to draw ReGIS images, those strings can be big, like hundreds of kilobytes big. A few OSC commands might be as large as 10 kilobytes.
This resource sets a limit on how big that buffer for these strings can get. The default is "600000", based on the features configured for xterm. Control strings that need a bigger buffer than that just get ignored. ๐
โจ metaSendsEscape (class MetaSendsEscape) โจ
Tells xterm what to do with input-characters modified by Meta:
- If
"true", Meta characters (a character combined with the Meta modifier key) get converted into a two-character sequence, with the character itself preceded by ESC. This applies to function key control sequences too, unlessxtermsees that Meta is used in your key translations. - If
"false", Meta characters coming in from the keyboard are handled according to theeightBitInputresource.
The default is "True".
๐ฏ mkSamplePass (class MkSamplePass) ๐ฏ
If mkSampleSize is nonzero, and mkWidth (and cjkWidth) are false, then on startup xterm compares its built-in tables against the system's wide character width data to decide whether it'll use the system's data. It tests the first mkSampleSize character values, and allows up to mkSamplePass mismatches before the test fails. The default (for the allowed number of mismatches) is 655 โ that's one percent of the default value for mkSampleSize. ๐งฎ
๐ mkSampleSize (class MkSampleSize) ๐
Working together with mkSamplePass, this specifies a startup test used for initializing wide character width calculations. The default (number of characters to check) is 65536.
๐ mkWidth (class MkWidth) ๐
Specifies whether xterm should use a built-in version of the wide character width calculation. Also check out the cjkWidth resource, which can override this. The default is "false".
Here's the whole summary of the resources that control the choice of wide character width calculation:
cjkWidth mkWidth Action
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
false false use system tables subject to mkSamplePass
false true use built-in tables
true false use built-in CJK tables
true true use built-in CJK tables
To disable mkWidth and use the system's tables instead, set both mkSampleSize and mkSamplePass to "0". Doing that may make xterm more consistent with applications running inside xterm, but heads up โ it may omit some font glyphs whose width correctly differs from the system's character tables. โ ๏ธ
๐ modifyCursorKeys (class ModifyCursorKeys) ๐
Tells xterm how to handle the special case where Control-, Shift-, Alt- or Meta-modifiers are used to add a parameter to the escape sequence returned by a cursor-key. The X11 cursor keys are the four keys with arrow symbols:
Left Right Up Down
plus some that are commonly found on an "editing keypad":
Home Prior Page_Up Next Page_Down End Begin
The default is "2":
-1โ disables the feature.0โ uses the old/obsolete behavior, i.e., the modifier is the first parameter.1โ prefixes modified sequences with CSI.2โ forces the modifier to be the second parameter if it would otherwise be the first.3โ marks the sequence with a">"to hint that it is private.4โ changes the format to matchmodifyOtherKeys3, sending an escape sequence according toformatCursorKeys.
๐ซ modifyFunctionKeys (class ModifyFunctionKeys) ๐ซ
Tells xterm how to handle the special case where Control-, Shift-, Alt- or Meta-modifiers are used to add a parameter to the escape sequence returned by a (numbered) function-key. The default is "2". The resource values are similar to modifyCursorKeys:
-1โ permits you to use shift- and control-modifiers to construct function-key strings using the normal encoding scheme.0โ uses the old/obsolete behavior, i.e., the modifier is the first parameter.1โ prefixes modified sequences with CSI.2โ forces the modifier to be the second parameter if it would otherwise be the first.3โ marks the sequence with a">"to hint that it is private.4โ changes the format to matchmodifyOtherKeys3, sending an escape sequence according toformatFunctionKeys.
If modifyFunctionKeys is zero, xterm uses Control- and Shift-modifiers to let you construct numbered function-keys beyond the set your keyboard actually provides:
- Control โ adds the value given by the
ctrlFKeysresource. - Shift โ adds twice the value given by the
ctrlFKeysresource. - Control/Shift โ adds three times the value given by the
ctrlFKeysresource.
๐ง modifyKeyboard (class ModifyKeyboard) ๐ง
Normally xterm makes a special case for modifiers (shift, control, etc.) to handle special keyboard layouts (legacy and vt220). It does this to provide compatible keyboards for DEC VT220 and related terminals that implement user-defined keys (UDK).
The bits of the resource value selectively enable modification of a given category when those keyboards are selected. The default is "0":
0โ the legacy/vt220 keyboards interpret only the Control-modifier when constructing numbered function-keys. Other special keys are not modified.1โ allows modification of the numeric keypad.2โ allows modification of the editing keypad.4โ allows modification of function-keys, overrides use of the Shift-modifier for UDK.8โ allows modification of other special keys.
๐ modifyKeypadKeys (class ModifyKeypadKeys) ๐
Like modifyCursorKeys "4", this tells xterm to construct an escape sequence for numeric keypad keys. The default is "0".
๐ modifyModifierKeys (class ModifyModifierKeys) ๐
Like modifyCursorKeys "4", this tells xterm to construct an escape sequence for modifier (e.g., "shift") keys. The default is "0".
๐ฅ modifyOtherKeys (class ModifyOtherKeys) ๐ฅ
Like modifyCursorKeys "4", this tells xterm to construct an escape sequence for ordinary (i.e., "other") keys (such as "2") when they get modified by Shift-, Control-, Alt- or Meta-modifiers. This feature does not apply to special keys โ that means cursor-, keypad-, function- or control-keys that are labeled on your keyboard. Those have key symbols which XKB identifies uniquely, no cap. ๐
The default is "0":
0โ disables this feature.1โ enables this feature for keys except for those with well-known behavior, e.g., Tab, Backarrow, and some special control character cases that are built into the X11 library, e.g., Control-Space to make a NUL, or Control-3 to make an Escape character.
Except for those special cases built into the X11 library, the Shift- and Control- modifiers are treated normally. The Alt- and Meta- modifiers do not cause xterm to send escape sequences. Those modifier keys get interpreted according to other resources, e.g., the metaSendsEscape resource.
- enables this feature for keys including the exceptions listed. Xterm ignores the special cases built into the X11 library. Any shifted (modified) ordinary key sends an escape sequence. The Alt- and Meta- modifiers cause xterm to send escape sequences.
- extends the feature to send unmodified keys as escape sequences.
The Xterm FAQ has an extended discussion of this feature, with examples:
https://invisible-island.net/xterm/modified-keys.html
modifySpecialKeys (class ModifySpecialKeys)
Like modifyCursorKeys โ4โ, tells xterm to construct an escape sequence for special keys (e.g., โescapeโ not in the other categories). The default is โ0โ.
multiClickTime (class MultiClickTime)
Specifies the maximum time in milliseconds between multi-click select events. The default is โ250โ milliseconds.
multiScroll (class MultiScroll)
Specifies whether or not scrolling should be done asynchronously. 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 by the marginBell resource. The default is โ10โ.
nameKeymap (class NameKeymap)
See the discussion of the keymap() action.
nextEventDelay (class NextEventDelay)
Specifies a delay time in milliseconds before checking for new X events. The default is โ1โ.
numColorRegisters (class NumColorRegisters)
If xterm is configured to support ReGIS or SIXEL graphics, this specifies the number of color-registers which are available.
If this resource is not specified, xterm uses a value determined by the decTerminalID resource:
- Result
4โ decTerminalID125 - Result
4โ decTerminalID240 - Result
4โ decTerminalID241 - Result
4โ decTerminalID330 - Result
16โ decTerminalID340 - Result
2โ decTerminalID382 - Result
1024โ decTerminalIDother
numLock (class NumLock)
If โtrueโ, xterm checks if NumLock is used as a modifier (see xmodmap(1)). If so, this modifier is used to simplify the logic when implementing special NumLock for the sunKeyboard resource. Also (when sunKeyboard is false), similar logic is used to find the modifier associated with the left and right Alt keys. The default is โtrueโ.
oldXtermFKeys (class OldXtermFKeys)
If โtrueโ, xterm will use old-style (X11R5) escape sequences for function keys F1 to F4, for compatibility with X Consortium xterm. Otherwise, it uses the VT100 codes for PF1 to PF4. The default is โfalseโ.
Setting this resource has the same effect as setting the keyboardType to legacy. The keyboardType resource is the preferred mechanism for selecting this mode.
The old-style escape sequences resemble VT220 keys, but appear to have been invented for xterm in X11R4.
on2Clicks (class On2Clicks)
on3Clicks (class On3Clicks)
on4Clicks (class On4Clicks)
on5Clicks (class On5Clicks)
Specify selection behavior in response to multiple mouse clicks. A single mouse click is always interpreted as described in the Selection Functions section (see POINTER USAGE). Multiple mouse clicks (using the button which activates the select-start action) are interpreted according to the resource values of on2Clicks, etc. The resource value can be one of these:
- word โ Select a โwordโ as determined by the
charClassresource. See the CHARACTER CLASSES section.
If the pointer is on a โwordโ then xterm searches back to the beginning of the word, and then to the end.
If the pointer is not on a โwordโ then the result depends on whether it is on whitespace (including a newline), or past the end of the line. In the latter case xterm may select a โwordโ beginning after the newline, if there is no additional whitespace.
- line โ Select a line (counting wrapping).
- group โ Select a group of adjacent lines (counting wrapping). The selection stops on a blank line, and does not extend outside the current page.
- page โ Select all visible lines, i.e., the page.
- all โ Select all lines, i.e., including the saved lines.
- regex โ Select the best match for the POSIX extended regular expression (ERE) which follows in the resource value:
- Xterm matches the regular expression against a byte array for the entire (possibly wrapped) line. That byte array may be UTF-8 or ISO-8859-1, depending on the mode in which xterm is running.
- Xterm steps through each byte-offset in this array, keeping track of the best (longest) match. If more than one match ties for the longest length, the first is used.
Xterm does this to make it convenient to click anywhere in the area of interest and cause the regular expression to match the entire word, etc.
- The โ^โ and โ$โ anchors in a regular expression denote the ends of the entire line.
- If the regular expression contains backslashes โ\โ those should be escaped โ\โ because the X libraries interpret backslashes in resource strings.
- none โ No selection action is associated with this resource. Xterm interprets it as the end of the list. For example, you may use it to disable triple (and higher) clicking by setting
on3Clicksto โnoneโ.
The default values for on2Clicks and on3Clicks are โwordโ and โlineโ, respectively. There is no default value for on4Clicks or on5Clicks, making those inactive. On startup, xterm determines the maximum number of clicks by the onXClicks resource values which are set.
openIm (class OpenIm)
Tells xterm whether to open the input method at startup. The default is โtrueโ.
pointerColor (class PointerColor)
Specifies the foreground color of the pointer. The default is โXtDefaultForegroundโ.
pointerColorBackground (class PointerColorBackground)
Specifies the background color of the pointer. The default is โXtDefaultBackgroundโ.
pointerFont (class PointerFont)
Specifies the font to be used for the pointer. The shapes specified by pointerShape are glyphs in this font. The resource value default is cursor.
pointerMode (class PointerMode)
Specifies when the pointer may be hidden as the user types. It will be redisplayed if the user moves the mouse, or clicks one of its buttons.
0โ never1โ the application running in xterm has not activated mouse mode. This is the default.2โ always.
pointerShape (class Cursor)
Specifies the name of the shape of the pointer. The default is โxtermโ.
Other shapes can be selected. Here is a list of the โcoreโ (i.e., standard) names extracted from <X11/cursorfont.h>:
X_cursor, arrow, based_arrow_down, based_arrow_up, boat,
bogosity, bottom_left_corner, bottom_right_corner,
bottom_side, bottom_tee, box_spiral, center_ptr, circle,
clock, coffee_mug, cross, cross_reverse, crosshair,
diamond_cross, dot, dotbox, double_arrow, draft_large,
draft_small, draped_box, exchange, fleur, gobbler, gumby,
hand1, hand2, heart, icon, iron_cross, left_ptr, left_side,
left_tee, leftbutton, ll_angle, lr_angle, man, middlebutton,
mouse, pencil, pirate, plus, question_arrow, right_ptr,
right_side, right_tee, rightbutton, rtl_logo, sailboat,
sb_down_arrow, sb_h_double_arrow, sb_left_arrow,
sb_right_arrow, sb_up_arrow, sb_v_double_arrow, shuttle,
sizing, spider, spraycan, star, target, tcross,
top_left_arrow, top_left_corner, top_right_corner, top_side,
top_tee, trek, ul_angle, umbrella, ur_angle, watch, xterm
If you are using a cursor theme, expect it to provide about a third of those names, while adding others.
popOnBell (class PopOnBell)
Specifies whether the window would be raised when Control-G is received. The default is โfalseโ.
If the window is iconified, this has no effect. However, the zIconBeep resource provides you with the ability to see which iconified windows have sounded a bell.
precompose (class Precompose)
Tells xterm whether to precompose UTF-8 data into Normalization Form C, which combines commonly-used accents onto base characters. If it does not do this, accents are left as separate characters. The default is โtrueโ.
preeditType (class PreeditType)
Tells xterm which types of preedit (preconversion) string to display. The default is โOverTheSpot,Rootโ.
preferLatin1 (class PreferLatin1)
Tells xterm whether to use DEC Supplemental Graphic, or ISO Latin-1 for the user-preferred supplemental set (UPSS) when initializing character sets. The former is the documented setting for hardware terminals, but the latter is expected by most users. The default is โtrueโ (ISO Latin-1).
printAttributes (class PrintAttributes)
Specifies whether to print graphic attributes along with the text. A real DEC VTxxx terminal will print the underline, highlighting codes but your printer may not handle these.
- โ0โ disables the attributes.
- โ1โ prints the normal set of attributes (bold, underline, inverse and blink) as VT100-style control sequences. ๐
- โ2โ prints ANSI color attributes as well. ๐
The default is โ1โ.
printFileImmediate(classPrintFileImmediate) โ so when the print-immediate action gets invoked, xterm dumps the screen contents straight into a file, no middleman. Set this resource to the prefix of the filename and a timestamp gets appended to the actual name, bestie. โฐ
The default is an empty string, i.e., โโ. However, when the print-immediate action is invoked and the string is empty, then โXTermโ is used instead. She improvises. ๐
printFileOnXError(classPrintFileOnXError) โ if xterm exits with an X error (like, your connection is broken when the server crashes ๐), you can tell it to write the contents of the screen to a file. To enable the feature, set this resource to the prefix of the filename (timestamp appended to the actual name, same deal).
The default is an empty string, i.e., โโ, which disables this feature. But when the print-on-error action is invoked and the string is empty, then โXTermErrorโ is used.
These error codes are handled: ERROR_XERROR, ERROR_XIOERROR and ERROR_ICEERROR. ๐ซถ
printModeImmediate(classPrintModeImmediate) โ when the print-immediate action is invoked, xterm prints the screen contents directly to a file. You can use theprintModeImmediateresource to tell it to use escape sequences to reconstruct the video attributes and colors. It uses the same values as theprintAttributesresource. The default is โ0โ.printModeOnXError(classPrintModeOnXError) โ xterm implements theprintFileOnXErrorfeature using the printer feature, even though the output is written directly to a file. You can use theprintModeOnXErrorresource to tell it to use escape sequences to reconstruct the video attributes and colors. Same values as theprintAttributesresource. The default is โ0โ.printOptsImmediate(classPrintOptsImmediate) โ specify the range of text which is printed to a file when the print-immediate action is invoked. โจ- If zero (
0), then this selects the current (visible screen) plus the saved lines, except if the alternate screen is being used. In that case, only the alternate screen is selected. - If nonzero, the bits of this resource value (checked in descending order) select the range:
8selects the saved lines.4selects the alternate screen.2selects the normal screen.1selects the current screen, which can be either the normal or alternate screen.
- If zero (
The default is โ9โ, which selects the current visible screen plus saved lines, with no special case for the alternated screen. ๐
printOptsOnXError(classPrintOptsOnXError) โ specify the range of text which is printed to a file when the print-on-error action is invoked. The resource value is interpreted the same as inprintOptsImmediate.
The default is โ9โ, which selects the current visible screen plus saved lines, with no special case for the alternated screen.
printRawChars(classPrintRawChars) โ if โtrueโ, xterm allows Unicode non-characters to be printed. let them cook ๐ฅprinterAutoClose(classPrinterAutoClose) โ if โtrueโ, xterm will close the printer (a pipe) when the application switches the printer offline with a Media Copy command. The default is โfalseโ.printerCommand(classPrinterCommand) โ specifies a shell command to which xterm will open a pipe when the first MC (Media Copy) command is initiated. The default is an empty string, i.e., โโ. If the resource value is given as an empty string, the printer is disabled. ๐ซprinterControlMode(classPrinterControlMode) โ specifies the printer control mode. A โ1โ selects autoprint mode, which causes xterm to print a line from the screen when- you move the cursor off that line with a line feed, form feed or vertical tab character, or
- an autowrap occurs.
Autoprint mode is overridden by printer controller mode (a โ2โ), which causes all of the output to be directed to the printer. The default is โ0โ.
printerExtent(classPrinterExtent) โ controls whether a print page function will print the entire page (true), or only the portion within the scrolling margins (false). The default is โfalseโ.printerFormFeed(classPrinterFormFeed) โ controls whether a form feed is sent to the printer at the end of a print page function. The default is โfalseโ.printerNewLine(classPrinterNewLine) โ controls whether a newline is sent to the printer at the end of a print page function. The default is โtrueโ.privateColorRegisters(classPrivateColorRegisters) โ if xterm is configured to support ReGIS or SIXEL graphics, this controls whether xterm allocates separate color registers for each sixel device control string, e.g., forDECGCI. If not true, color registers are allocated only once, when the terminal is reset, and color changes in any graphic affect all graphics. The default is โtrueโ. ๐privateWidth(classPrivateWidth) โ tells xterm whether to assume that codes in the Unicode PUA (private use area) are single-width, or neutral (matching thecjkWidthsetting). The default is โtrueโ to assume single-width.quietGrab(classQuietGrab) โ controls whether the cursor is repainted whenNotifyGrabandNotifyUngrabevent types are received during change of focus. The default is โfalseโ.regisDefaultFont(classRegisDefaultFont) โ if xterm is configured to support ReGIS graphics, this resource tells xterm which font to use if the ReGIS data does not specify one. No default value is specified; xterm accepts a TrueType font specification as in thefaceNameresource. ๐
If no value is specified, xterm draws a bitmap indicating a missing character. ๐ญ
regisScreenSize(classRegisScreenSize) โ if xterm is configured to support ReGIS graphics, this resource tells xterm the default size (in pixels) for these graphics, which also sets the default coordinate space to[0,0](upper-left) and[width,height](lower-right).
The application using ReGIS may use the โAโ option of the โSโ command to adjust the coordinate space or change the addressable portion of the screen.
Xterm accepts a special resource value โautoโ, which tells xterm to use the decGraphicsID and decTerminalID resources to set the default size based on the hardware terminal's limits. Those limits are the same as for the maxGraphicSize resource.
The default is โautoโ. โจ
renderFont(classRenderFont) โ if xterm is built with the Xft library, this controls whether thefaceNameresource is used. The default is โdefaultโ.
The resource values are strings, evaluated as booleans after startup.
falseโ disable the feature and use the normal (bitmap) font.trueโ startup using the TrueType font specified by thefaceNameandfaceSizeresource settings. If there is no value forfaceName, disable the feature and use the normal (bitmap) font.
After startup, you can still switch to/from the bitmap font using the โTrueType Fontsโ menu entry. ๐
defaultโ enable the โTrueType Fontsโ menu entry to allow runtime switching to/from TrueType fonts. The initial font used depends upon whether thefaceNameresource is set:- If the
faceNameresource is not set, start by using the normal (bitmap) font. Xterm has a separate compiled-in value forfaceNamefor this special case. That is normally โmonoโ. - If the
faceNameresource is set, then start by using the TrueType font rather than the bitmap font.
- If the
defaultOffโ enable the โTrueType Fontsโ menu entry to allow runtime switching to/from TrueType fonts, but allow it to be initially unselected if nofaceNameresource was given.
resizeByPixel(classResizeByPixel) โ set this โtrueโ to disable hints to the window manager that request resizing by character rather than pixels.
Most window managers provide visual feedback showing the size of a window as you resize it, using these hints. When you maximize xterm, it disables those hints to allow the window manager to make better use of fractional rows or columns. Setting this resource disables the hints all the time. The default is โfalseโ.
resizeCursorAdjust(classResizeCursorAdjust) โ controls cursor position tracking when the terminal width changes. When the terminal shrinks and the cursor would be beyond the new width, xterm clamps the cursor to the rightmost column. This resource controls what happens when you move the cursor while shrunk, then grow the terminal back:trueโ adjust the saved cursor position by cursor movement delta. This keeps xterm's cursor in sync with the shell's idea of cursor position. Shell commands likeCtrl+A(go to beginning of line) will work correctly. However, the cursor may visually โjumpโ when the terminal grows. This is the default. ๐ซถfalseโ clear the saved cursor position on any cursor movement. The cursor stays at its visual position when the terminal grows. Shell commands may behave unexpectedly after resize and cursor movement. ๐
resizeGravity(classResizeGravity) โ affects the behavior when the window is resized to be taller or shorter.NorthWestโ the top line of text on the screen stays put, no cap. Window gets shorter? Lines drop from the bottom. Window gets taller? Blank lines get added at the bottom. This is compatible with the behavior in X11R4. โจSouthWestโ the bottom line of text on the screen stays put (this is the default, bestie). Window gets taller? Extra saved lines scroll down onto the screen. Window gets shorter? Lines scroll off the top, and the top saved lines get dropped. ๐retryInputMethod(classRetryInputMethod) โ tells xterm how many times to retry when the input-method server is not responding. This is a different issue than unsupported preedit type, etc. You may encounter retries if your X configuration (and its libraries) are missing pieces. Setting this resource to zero0will cancel the retrying. The default is3. ๐ญreverseVideo(classReverseVideo) โ specifies whether or not reverse video should be simulated. The default isfalse. ๐
There are several aspects to reverse video in xterm:
- The command-line
-rvoption tells the X libraries to reverse the foreground and background colors. Xterm's command-line options set resource values. In particular, the X Toolkit sets thereverseVideoresource when the-rvoption is used. - If the user has also used command-line options
-fgor-bgto set the foreground and background colors, xterm does not see these options directly. Instead, it examines the resource values to reconstruct the command-line options, and determine which of the colors is the user's intended foreground, etc. Their actual values are irrelevant to the reverse video function; some users prefer the X defaults (black text on a white background), others prefer white text on a black background. - After startup, the user can toggle the โEnable Reverse Videoโ menu entry. This exchanges the current foreground and background colors of the VT100 widget, and repaints the screen. Because of the X resource hierarchy, the
reverseVideoresource applies to more than the VT100 widget.
Programs running in an xterm can also use control sequences to enable the VT100 reverse video mode. These are independent of the reverseVideo resource and the menu entry. Xterm exchanges the current foreground and background colors when drawing text affected by these control sequences.
Other control sequences can alter the foreground and background colors which are used:
- Programs can also use the ANSI color control sequences to set the foreground and background colors.
- Extensions to the ANSI color controls (such as 16-, 88- or 256-colors) are treated similarly to the ANSI control.
- Using other control sequences (the โdynamic colorsโ feature), a program can change the foreground and background colors.
reverseWrap(classReverseWrap) โ specifies whether or not reverse-wraparound should be enabled. This corresponds to xterm's private mode 45. The default isfalse. ๐rightScrollBar(classRightScrollBar) โ specifies whether or not the scrollbar should be displayed on the right rather than the left. The default isfalse. ๐saveLines(classSaveLines) โ specifies the number of lines to save beyond the top of the screen when a scrollbar is turned on. The default is1024. ๐พscrollBar(classScrollBar) โ specifies whether or not the scrollbar should be displayed. The default isfalse. ๐scrollBarBorder(classScrollBarBorder) โ specifies the width of the scrollbar border. Note that this is drawn to overlap the border of the xterm window. Modifying the scrollbar's border affects only the line between the VT100 widget and the scrollbar. The default value is 1. ๐scrollKey(classScrollCond) โ specifies whether or not pressing a key should automatically cause the scrollbar to go to the bottom of the scrolling region. This corresponds to xterm's private mode 1011. The default isfalse. โจ๏ธscrollLines(classScrollLines) โ specifies the number of lines that the scroll-back and scroll-forw actions should use as a default. The default value is 1. ๐scrollTtyOutput(classScrollCond) โ specifies whether or not output to the terminal should automatically cause the scrollbar to go to the bottom of the scrolling region. The default istrue. ๐บselectToClipboard(classSelectToClipboard) โ tells xterm whether to use the PRIMARY or CLIPBOARD for SELECT tokens in the selection mechanism. The set-select action can change this at runtime, allowing the user to work with programs that handle only one of these mechanisms. The default isfalse, which tells it to use PRIMARY. ๐shiftEscape(classShiftEscape) โ Xterm uses the translations resource to determine how to invoke actions for selecting and copying text using the pointer (e.g., a mouse). It also provides a mouse protocol which can be used by applications running in an xterm to detect mouse button clicks. ๐ฑ๏ธ
The mouse protocol causes xterm to send special escape sequences which allow an application to determine if modifiers (i.e., one or more of shift, control, alt, and meta) were used.
Xterm provides this mouse protocol by interpreting button- and motion-events in the functions which the translations resource calls for selecting and copying text:
insert-selection
select-end
select-extend
select-start
start-extend
While the mouse protocol is active, xterm reserves most of the mouse button events for sending special escape sequences to the application. Xterm normally allows you to use the shift-key to temporarily override this mouse protocol, permitting the selection and copying actions to be used.
The shiftEscape resource setting allows you to tell xterm whether to use the shift-key in this way (i.e., overriding the mouse protocol). Xterm accepts either a keyword (ignoring case) or the number shown in parentheses:
false(0) โ mouse protocol does not send special escapes when shift-key is used.true(1) โ mouse protocol may send special escapes when shift-key is used.
At startup, xterm analyzes the translations to see which buttons are used in the (mouse) button-related bindings for selection and copying text. If the shift-key is not mentioned explicitly in a button's binding, xterm allows that button with shift-key for overriding the mouse protocol.
always(2) โ mouse protocol can always send special escapes when shift-key is used.never(3) โ mouse protocol will never send special escapes when shift-key is used.
Xterm interprets a control sequence which can change this setting between true and false. The default is false. ๐
shiftFonts(classShiftFonts) โ specifies whether to enable the actionslarger-vt-font()andsmaller-vt-font(), which are normally bound to the shiftedKP_AddandKP_Subtract. The default istrue. ๐showBlinkAsBold(classShowBlinkAsBold) โ tells xterm whether to display text with blink-attribute the same as bold. If xterm has not been configured to support blinking text, the default istrue, which corresponds to older versions of xterm, otherwise the default isfalse. ๐showMissingGlyphs(classShowMissingGlyphs) โ tells xterm whether to display a box outlining places where a character has been used that the font does not represent. The default istrue. ๐ฒshowWrapMarks(classShowWrapMarks) โ for debugging xterm and applications that may manipulate the wrapped-line flag by writing text at the right margin, show a mark on the right inner-border of the window. The mark shows which lines have the flag set. ๐ท๏ธsignalInhibit(classSignalInhibit) โ specifies whether or not the entries in the Main Options menu for sending signals to xterm should be disallowed. The default isfalse. ๐ซsixelScrolling(classSixelScrolling) โ if xterm is configured to support SIXEL graphics, this resource tells it whether to scroll up one line at a time when sixels would be written past the bottom line on the window. The default istruewhich enables scrolling. Sixel scrolling is the opposite of DEC Sixel Display Mode (DECSDM): when one is on, the other is off. ๐sixelScrollsRight(classSixelScrollsRight) โ if xterm is configured to support SIXEL graphics, this resource tells it whether to scroll to the right as needed to keep the current position visible rather than truncate the plot on the on the right. The default isfalsewhich disables scrolling. โก๏ธtekGeometry(classGeometry) โ specifies the preferred size and position of the Tektronix window. There is no default for this resource. ๐tekInhibit(classTekInhibit) โ specifies whether or not the escape sequence to enter Tektronix mode should be ignored. The default isfalse. ๐ซtekSmall(classTekSmall) โ specifies whether or not 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 isfalse. ๐ฑtekStartup(classTekStartup) โ specifies whether or not xterm should start up in Tektronix mode. The default isfalse. ๐
๐ฉน tiXtraScroll (class TiXtraScroll)
Okay bestie, this one decides whether xterm scrolls to a whole new page when it's chewing on the ti or te termcap strings โ aka the private modes 47, 1047 or 1049. And it's only in effect if titeInhibit is โtrueโ, because the whole point of this option is to give you a pic of the full-screen app's display sitting pretty in the scrollback without nuking the text that was there before the app even initialized. ๐
Xterm accepts either a keyword (case? ignored, we don't care) or the number shown in parentheses:
false(0) โ nothing is added to the scrollback. nada. zip. ๐ซฅtrue(1) โ the current screen is added to the scrollback.trim(2) โ the current screen is added to the scrollback, but repeated blank lines get trimmed (reduced to a single blank line). so satisfying โจ
The default for this resource is โfalseโ.
๐ซ titeInhibit (class TiteInhibit)
Originally this specified whether or not xterm should remove ti and te termcap entries (those are the ones used to switch between alternate screens on startup of many screen-oriented programs) from the TERMCAP string.
TERMCAP is used rarely now, but xterm still supports the feature on modern systems:
- If set,
xtermalso ignores the escape sequence to switch to the alternate screen. - Xterm supports terminfo in a different way, supporting composite control sequences (also known as private modes)
1047,1048and1049which have the same effect as the original47control sequence.
The default for this resource is โfalseโ.
๐ท๏ธ titleModes (class TitleModes)
Tells xterm whether to accept or return window- and icon-labels in ISO-8859-1 (that's the default) or UTF-8. Either one can be encoded in hexadecimal:
- UTF-8 titles require special treatment, because they may contain bytes which can be mistaken for control characters. Hexadecimal-encoding is supported to eliminate that possibility. ๐
- As an alternative, you could use the
allowC1Printableresource, which suppressesxterm's parsing of the relevant control characters (and as a result, treats those bytes as data).
The default for this resource is โ0โ.
Each bit (bit โ0โ is 1, bit โ1โ is 2, etc.) corresponds to one of the parameters set by the title modes control sequence:
- 0 โ Set window/icon labels using hexadecimal
- 1 โ Query window/icon labels using hexadecimal
- 2 โ Set window/icon labels using UTF-8 (gives the same effect as the
utf8Titleresource). - 3 โ Query window/icon labels using UTF-8
โจ๏ธ translations (class Translations)
Specifies the key and button bindings for menus, selections, โprogrammed stringsโ, etc. The translations resource, which provides much of xterm's configurability, is a feature of the X Toolkit Intrinsics library (Xt). See the Actions section. ๐
โ๏ธ trimSelection (class TrimSelection)
If you set highlightSelection, you can see the text which is selected, including any trailing spaces. Clearing the screen (or a line) resets it to a state containing no spaces. Some lines may contain trailing spaces when an application writes them to the screen. However, you may not wish to paste lines with trailing spaces. If this resource is true, xterm will trim trailing spaces from text which is selected. It does not affect spaces which result in a wrapped line, nor will it trim the trailing newline from your selection. The default is โfalseโ.
๐ underLine (class UnderLine)
This specifies whether or not text with the underline attribute should be underlined. It may be desirable to disable underlining when color is being used for the underline attribute. The default is โtrueโ.
๐ผ๏ธ useBorderClipping (class UseBorderClipping)
Tell xterm whether to apply clipping when useClipping is false. Unlike useClipping, this simply limits text to keep it within the window borders, e.g., as a refinement to the scaleHeight workaround. The default is โfalseโ.
โ๏ธ useClipping (class UseClipping)
Tell xterm whether to use clipping to keep from producing dots outside the text drawing area. Originally used to work around for overstriking effects, this is also needed to work with some incorrectly-sized fonts. The default is โtrueโ. ๐
๐ utf8 (class Utf8)
This specifies whether xterm will run in UTF-8 mode. If you set this resource, xterm also sets the wideChars resource as a side-effect. The resource can be set via the menu entry โUTF-8 Encodingโ. The default is โdefaultโ.
Xterm accepts either a keyword (ignoring case) or the number shown in parentheses:
false(0) โ UTF-8 mode is initially off. The command-line option+u8sets the resource to this value. Escape sequences for turning UTF-8 mode on/off are allowed.true(1) โ UTF-8 mode is initially on. Escape sequences for turning UTF-8 mode on/off are allowed.always(2) โ The command-line option-u8sets the resource to this value. Escape sequences for turning UTF-8 mode on/off are ignored.default(3) โ This is the default value of the resource. It is changed during initialization depending on whether thelocaleresource was set, tofalse(0) oralways(2). See thelocaleresource for additional discussion of non-UTF-8 locales.
If you want to set the value of utf8, it should be in this range. Other nonzero values are treated the same as โ1โ, i.e., UTF-8 mode is initially on, and escape sequences for turning UTF-8 mode on/off are allowed. ๐
๐ค utf8Fonts (class Utf8Fonts)
See the discussion of the locale resource. This specifies whether xterm will use UTF-8 fonts specified via resource patterns such as โ*vt100.utf8Fonts.fontโ or normal (ISO-8859-1) fonts via patterns such as โ*vt100.fontโ. The resource can be set via the menu entry โUTF-8 Fontsโ. The default is โdefaultโ.
Xterm accepts either a keyword (ignoring case) or the number shown in parentheses:
false(0) โ Use the ISO-8859-1 fonts. The menu entry is enabled, allowing the choice of fonts to be changed at runtime.true(1) โ Use the UTF-8 fonts. The menu entry is enabled, allowing the choice of fonts to be changed at runtime.always(2) โ Always use the UTF-8 fonts. This also disables the menu entry. ๐default(3) โ At startup, the resource is set totrueorfalse, according to the effective value of theutf8resource.
๐ก utf8Latin1 (class Utf8Latin1)
If true, allow an ISO-8859-1 normal font to be combined with an ISO-10646-1 font if the latter is given via the -fw option or its corresponding resource value. The default is โfalseโ.
๐ฏ utf8SelectTypes (class Utf8SelectTypes)
Override xterm's default selection target list (see SELECT/PASTE) for selections in wide-character (UTF-8) mode. The default is an empty string, i.e., โโ, which does not override anything.
๐ช utf8Title (class Utf8Title)
Applications can set xterm's title by writing a control sequence. Normally this control sequence follows the VT220 convention, which encodes the string in ISO-8859-1 and allows for an 8-bit string terminator. If xterm is started in a UTF-8 locale, it translates the ISO-8859-1 string to UTF-8 to work with the X libraries which assume the string is UTF-8.
However, some users may wish to write a title string encoded in UTF-8. The window manager is responsible for drawing window titles. Some window managers (not all, ok? don't come for me) support UTF-8 encoding of window titles. Set this resource to โtrueโ to also set UTF-8 encoded title strings using the EWMH properties.
This feature is available as a menu entry, since it is related to the particular applications you are running within xterm. You can also use a control sequence (see the discussion of โTitle Modesโ in Xterm Control Sequences), to set an equivalent flag (which can also be set using the titleModes resource).
Xterm accepts either a keyword (ignoring case) or the number shown in parentheses:
false(0) โ Set only ISO-8859-1 title strings, e.g., using the ICCCMWM_NAMESTRINGproperty. The menu entry is enabled, allowing the choice of title-strings to be changed at runtime.true(1) โ Set both the EWMH (UTF-8 strings) and the ICCCMWM_NAME, etc. The menu entry is enabled, allowing the choice to be changed at runtime.always(2) โ Always set both the EWMH (UTF-8 strings) and the ICCCMWM_NAME, etc. This also disables the menu entry.default(3) โ At startup, the resource is set totrueorfalse, according to the effective value of theutf8resource.
The default is โdefaultโ. โจ
๐ utf8Weblike (class Utf8Weblike)
Provide an alternate error-handling scheme for ill-formed UTF-8 as recommended in a W3C document. The Unicode standard does not require this for conformance. Some additional information can be found here:
https://invisible-island.net/xterm/bad-utf8/
The default is โfalseโ.
๐ช veryBoldColors (class VeryBoldColors)
Specifies whether to combine video attributes with colors specified by colorBD, colorBL, colorIT, colorRV, and colorUL. The resource value is the sum of values for each attribute:
- 1 for reverse,
- 2 for underline,
- 4 for bold,
- 8 for blink, and
- 512 for italic
The default is โ0โ. ๐ซถ
visualBell(classVisualBell) โ do you want a visible bell (aka the screen doing a lil flash ๐ฅ) instead of an audible one whenControl-Gshows up? Yes/no. Default is"false", which means xterm keeps it audible, bestie.visualBellDelay(classVisualBellDelay) โ how many milliseconds to stall while showing that visual bell. Default is100. Set it to zero and no visual bell appears at all. Lowkey useful for super slow displays, like the LCD on a laptop ๐.visualBellLine(classVisualBellLine) โ flash only the current line for the visual bell instead of the whole entire screen? Default is"false", so xterm flashes the whole screen, periodt.vt100Graphics(classVT100Graphics) โ should xterm interpret VT100 graphic character escape sequences while it's in UTF-8 mode? This also applies to code-pages (like for VT320 and VT520) and National Replacement Character Sets (VT220 and up) โ but not US-ASCII (the character set that's selected at the start), because that would beef with UTF-8. Default is"true", all for the sake of legacy apps ๐.wideBoldFont(classWideBoldFont) โ the font for showing bold wide text. By default it tries to grab a font twice as wide as whatever's drawing bold text. If no double-width font turns up, it improvises by stretching the bold font ๐ญ.wideChars(classWideChars) โ should xterm respond to control sequences that process 16-bit characters? Default is"false".wideFont(classWideFont) โ the font for showing wide text. By default it tries to use a font twice as wide as whatever's drawing normal text. No double-width font? It improvises again, stretching the normal font ๐.xftMaxGlyphMemory(classXftMaxGlyphMemory) โ sets the Xft library's limit on glyph memory (typically 4Mb). Once it hits that limit it tosses out "randomly chosen" glyphs to make room for new ones. Default is"0", which tells it to just use Xft's own default value.xftMaxUnrefFonts(classXftMaxUnrefFonts) โ sets the Xft library's limit on fonts that got loaded (typically 16) โ like, matching patterns for fallback searches โ but aren't actually being used. Default is"0"to use Xft's default value.xftTrackMemUsage(classXftTrackMemUsage) โ turns on glyph memory tracking (introduced in Xft 2.3.5), which lets Xft efficiently yeet obsolete data when it's running short on memory. Default is"false".ximFont(classXimFont) โ the font used to display the preedit string in the"OverTheSpot"input method.
In the "OverTheSpot" preedit type, that preedit (preconversion) string shows up right at the cursor position. It's the XIM server's job to display the preedit string, and the XIM client has to tell the XIM server where the cursor is. For the best results the preedit string needs a proper font, so xterm informs the XIM server of the proper font. That font comes from a "fontset" whose default value is "*" โ which matches every font, and the X library automatically picks fonts with the proper charsets. The ximFont resource exists so you can override that default font setting ๐
.
Tek4014 Widget Resources
These resources live in the tek4014 widget (class Tek4014), and you target them with patterns like "XTerm.tek4014.NAME" โจ:
font2(classFont) โ font number 2 to use in the Tektronix window.font3(classFont) โ font number 3 to use in the Tektronix window.fontLarge(classFont) โ the large font for the Tektronix window.fontSmall(classFont) โ the small font for the Tektronix window.ginTerminator(classGinTerminator) โ what character(s) follow a GIN report or a status report? Your options are"none"(sends no terminating characters),"CRonly"(sends CR), and"CR&EOT"(sends both CR and EOT). Default is"none".height(classHeight) โ height of the Tektronix window, in pixels.initialFont(classInitialFont) โ which of the four Tektronix fonts to use first. Values are the same as for theset-tek-textaction. Default is"large".width(classWidth) โ width of the Tektronix window, in pixels.
Menu Resources
The resources you can set for the various menus are described in the docs for the Athena SimpleMenu widget. Below are the names and classes of the entries in each menu. Resources named "lineN" โ where N is a number โ are separators with class SmeLine.
And fr, like with all X resource-based widgets, the labels mentioned are just the customary defaults for the application ๐.
The Main Options menu (widget name mainMenu) has these entries:
toolbar(classSmeBSB) โ invokes theset-toolbar(toggle)action.securekbd(classSmeBSB) โ invokes thesecure()action.allowsends(classSmeBSB) โ invokes theallow-send-events(toggle)action.redraw(classSmeBSB) โ invokes theredraw()action.logging(classSmeBSB) โ invokes thelogging(toggle)action.print-immediate(classSmeBSB) โ invokes theprint-immediate()action.print-on-error(classSmeBSB) โ invokes theprint-on-error()action.print(classSmeBSB) โ invokes theprint()action.print-redir(classSmeBSB) โ invokes theprint-redir()action.dump-html(classSmeBSB) โ invokes thedump-html()action.dump-svg(classSmeBSB) โ invokes thedump-svg()action.8-bit-control(classSmeBSB) โ invokes theset-8-bit-control(toggle)action.backarrow key(classSmeBSB) โ invokes theset-backarrow(toggle)action.num-lock(classSmeBSB) โ invokes theset-num-lock(toggle)action.alt-esc(classSmeBSB) โ invokes thealt-sends-escape(toggle)action.meta-esc(classSmeBSB) โ invokes themeta-sends-escape(toggle)action.delete-is-del(classSmeBSB) โ invokes thedelete-is-del(toggle)action.oldFunctionKeys(classSmeBSB) โ invokes theset-old-function-keys(toggle)action.hpFunctionKeys(classSmeBSB) โ invokes theset-hp-function-keys(toggle)action.scoFunctionKeys(classSmeBSB) โ invokes theset-sco-function-keys(toggle)action.sunFunctionKeys(classSmeBSB) โ invokes theset-sun-function-keys(toggle)action.sunKeyboard(classSmeBSB) โ invokes thesunKeyboard(toggle)action.suspend(classSmeBSB) โ invokes thesend-signal(tstp)action, on systems that support job control.continue(classSmeBSB) โ invokes thesend-signal(cont)action, on systems that support job control.interrupt(classSmeBSB) โ invokes thesend-signal(int)action.hangup(classSmeBSB) โ invokes thesend-signal(hup)action.terminate(classSmeBSB) โ invokes thesend-signal(term)action.kill(classSmeBSB) โ invokes thesend-signal(kill)action.quit(classSmeBSB) โ invokes thequit()action.
The VT Options menu (widget name vtMenu) has these entries:
scrollbar(classSmeBSB) โ invokes theset-scrollbar(toggle)action.jumpscroll(classSmeBSB) โ invokes theset-jumpscroll(toggle)action.reversevideo(classSmeBSB) โ invokes theset-reverse-video(toggle)action.autowrap(classSmeBSB) โ invokes theset-autowrap(toggle)action.reversewrap(classSmeBSB) โ invokes theset-reversewrap(toggle)action.autolinefeed(classSmeBSB) โ invokes theset-autolinefeed(toggle)action.appcursor(classSmeBSB) โ invokes theset-appcursor(toggle)action.appkeypad(classSmeBSB) โ invokes theset-appkeypad(toggle)action.scrollkey(classSmeBSB) โ invokes theset-scroll-on-key(toggle)action.scrollttyoutput(classSmeBSB) โ invokes theset-scroll-on-tty-output(toggle)action.allow132(classSmeBSB) โ invokes theset-allow132(toggle)action.cursesemul(classSmeBSB) โ invokes theset-cursesemul(toggle)action.keepSelection(classSmeBSB) โ invokes theset-keep-selection(toggle)action.selectToClipboard(classSmeBSB) โ invokes theset-keep-clipboard(toggle)action.visualbell(classSmeBSB) โ invokes theset-visual-bell(toggle)action.bellIsUrgent(classSmeBSB) โ invokes theset-bellIsUrgent(toggle)action.poponbell(classSmeBSB) โ invokes theset-pop-on-bell(toggle)action.cursorblink(classSmeBSB) โ invokes theset-cursorblink(toggle)action.titeInhibit(classSmeBSB) โ invokes theset-titeInhibit(toggle)action.activeicon(classSmeBSB) โ this one toggles active icons on and off, if that feature was compiled into xterm. It's only enabled when xterm was started with the command line option+ai, or when theactiveIconresource is set to"true".softreset(classSmeBSB) โ invokes thesoft-reset()action.hardreset(classSmeBSB) โ invokes thehard-reset()action.clearsavedlines(classSmeBSB) โ invokes theclear-saved-lines()action.tekshow(classSmeBSB) โ invokes theset-visibility(tek,toggle)action.tekmode(classSmeBSB) โ invokes theset-terminal-type(tek)action.vthide(classSmeBSB) โ this one fires off theset-visibility(vt,off)action. bye bye VT window ๐altscreen(classSmeBSB) โ this one invokes theset-altscreen(toggle)action.sixelScrolling(classSmeBSB) โ this one invokes theset-sixel-scrolling(toggle)action.privateColorRegisters(classSmeBSB) โ this one invokes theset-private-colors(toggle)action.
The VT Fonts menu (widget name fontMenu) has the following entries:
fontdefault(classSmeBSB) โ invokes theset-vt-font(d)action, so it sets the font using thefont (default)resource, a.k.a.Defaultin the menu.font1(classSmeBSB) โ invokes theset-vt-font(1)action, setting the font using thefont1resource, a.k.a.Unreadablein the menu.font2(classSmeBSB) โ invokes theset-vt-font(2)action, setting the font using thefont2resource, a.k.a.Tinyin the menu.font3(classSmeBSB) โ invokes theset-vt-font(3)action, setting the font using thefont3resource, a.k.a.Smallin the menu.font4(classSmeBSB) โ invokes theset-vt-font(4)action, letting the font use thefont4resource, a.k.a.Mediumin the menu.font5(classSmeBSB) โ invokes theset-vt-font(5)action, letting the font use thefont5resource, a.k.a.Largein the menu.font6(classSmeBSB) โ invokes theset-vt-font(6)action, letting the font use thefont6resource, a.k.a.Hugein the menu.font7(classSmeBSB) โ invokes theset-vt-font(7)action, letting the font use thefont7resource, a.k.a.Enormousin the menu.fontescape(classSmeBSB) โ invokes theset-vt-font(e)action.fontsel(classSmeBSB) โ invokes theset-vt-font(s)action.allow-bold-fonts(classSmeBSB) โ invokes theallow-bold-fonts(toggle)action.font-linedrawing(classSmeBSB) โ invokes theset-font-linedrawing(s)action.font-packed(classSmeBSB) โ invokes theset-font-packed(s)action.font-doublesize(classSmeBSB) โ invokes theset-font-doublesize(s)action.render-font(classSmeBSB) โ invokes theset-render-font(s)action.utf8-fonts(classSmeBSB) โ invokes theset-utf8-fonts(s)action.utf8-mode(classSmeBSB) โ invokes theset-utf8-mode(s)action.utf8-title(classSmeBSB) โ invokes theset-utf8-title(s)action.allow-color-ops(classSmeBSB) โ invokes theallow-color-ops(toggle)action.allow-font-ops(classSmeBSB) โ invokes theallow-font-ops(toggle)action.allow-mouse-ops(classSmeBSB) โ invokes theallow-mouse-ops(toggle)action.allow-tcap-ops(classSmeBSB) โ invokes theallow-tcap-ops(toggle)action.allow-title-ops(classSmeBSB) โ invokes theallow-title-ops(toggle)action.allow-window-ops(classSmeBSB) โ invokes theallow-window-ops(toggle)action.
The Tek Options menu (widget name tekMenu) has the following entries:
tektextlarge(classSmeBSB) โ invokes theset-tek-text(large)action.tektext2(classSmeBSB) โ invokes theset-tek-text(2)action.tektext3(classSmeBSB) โ invokes theset-tek-text(3)action.tektextsmall(classSmeBSB) โ invokes theset-tek-text(small)action.tekpage(classSmeBSB) โ invokes thetek-page()action.tekreset(classSmeBSB) โ invokes thetek-reset()action.tekcopy(classSmeBSB) โ invokes thetek-copy()action.vtshow(classSmeBSB) โ invokes theset-visibility(vt,toggle)action.vtmode(classSmeBSB) โ invokes theset-terminal-type(vt)action.tekhide(classSmeBSB) โ invokes theset-visibility(tek,toggle)action.
Scrollbar Resources ๐
These resources are the moment when you're specifying them for the Athena Scrollbar widget:
background(classBackground) โ tells it the color to use for the background of the scrollbar. ๐จforeground(classForeground) โ tells it the color to use for the foreground of the scrollbar.thickness(classThickness) โ the width in pixels of the scrollbar (default:14). ๐
Heads up bestie: this may be overridden by the width resource.
thumb(classThumb) โ the defaultthumbpixmap used for the scrollbar is literally just a simple checkerboard pattern alternating pixels for foreground and background color. no cap ๐width(classWidth) โ the width in pixels of the scrollbar (default:0).
The widget checks the width resource first, and uses the thickness value if the width is zero. iykyk โจ
POINTER USAGE ๐ฑ๏ธ๐
So once the VTxxx window exists, xterm lets you select text and copy it within the same window or other windows, using the pointer or the keyboard. slay.
A "pointer" could be a mouse, a touchpad, or similar device. X applications generally do not care, because all they actually see are button events that have
- position and
- button up/down state
xterm can see these events as long as it has focus. ๐
The keyboard also supplies events, but it's less flexible than the pointer for selecting/copying text. sorry keyboard, love u tho ๐ญ
Events get applied to actions using the translations resource. Go look at Actions for a complete list, and Default Key Bindings for the built-in set of translations resources.
Selection Functions ๐ฆ
By default, the selection functions get invoked when the pointer buttons are used with no modifiers, and also when they're used with the "shift" key. The "shift" key is special because xterm uses it to make sure selection functions are still available even when it's programmed to send escape sequences in one of the mouse modes (see Xterm Control Sequences, and also the resource disallowedMouseOps).
At startup, xterm inspects the translations resource to figure out which pointer buttons may be used this way, and it remembers those buttons when deciding whether to send escape sequences or perform selection when those buttons are used with the "shift" modifier. Other pointer buttons โ like, typically the ones sent for wheel mouse events โ are not affected.
The assignment of the functions described below to keys and buttons can be changed through the resource database; see Actions below.
Pointer button one (usually left) ๐
is used to save text into the cut buffer:
~Meta <Btn1Down>:select-start()
Move the cursor to the beginning of the text, then hold the button down while you move the cursor to the end of the region and release the button. The selected text is highlighted and is saved into the global cut buffer and made the selection when the button is released:
<BtnUp>:select-end(SELECT, CUT_BUFFER0) \n
Normally (but see the discussion of on2Clicks, etc):
- Double-clicking selects by words.
- Triple-clicking selects by lines.
- Quadruple-clicking goes back to characters, etc.
Multiple-click is determined by the time from button up to button down, so you can switch up the selection unit in the middle of a selection. Logical words and lines selected by double- or triple-clicking may wrap across more than one screen line if the lines were wrapped by xterm itself rather than by the application running in the window. And if the key/button bindings specify that an X selection is to be made, xterm will leave the selected text highlighted for as long as it is the selection owner. ๐
Pointer button two (usually middle) ๐
"types" (pastes) the text from the given selection, if there is any, otherwise from the cut buffer, inserting it as keyboard input:
~Ctrl ~Meta <Btn2Up>:insert-selection(SELECT, CUT_BUFFER0)
Pointer button three (usually right) ๐
extends the current selection.
~Ctrl ~Meta <Btn3Down>:start-extend()
(Without loss of generality, you can swap "right" and "left" everywhere in the rest of this paragraph.) If it's pressed while closer to the right edge of the selection than the left, it extends/contracts the right edge of the selection. If you contract the selection past the left edge of the selection, xterm assumes you actually meant the left edge, restores the original selection, then extends/contracts the left edge of the selection. 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. Since cut buffers are globally shared among different applications, you may regard each as a "file" whose contents you know. The terminal emulator and other text programs should be treating it as if it were a text file, i.e., the text is delimited by new lines.
Scrolling ๐
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 decreases.
- Clicking button one with the pointer in the scroll region moves the adjacent line to the top of the display window.
- Clicking button three moves the top line of the display window down to the pointer position.
- Clicking button two moves the display to a position in the saved text that corresponds to the pointer's position in the scrollbar.
Tektronix Pointer ๐ง
Unlike the VTxxx window, the Tektronix window does not allow copying of text. It does allow Tektronix GIN mode, and in this mode the cursor will change from an arrow to a cross. Pressing any key will send that key and the current coordinate of the cross cursor. Pressing button one, two, or three will return the letters l, m, and r, respectively. If the "shift" key is pressed when a pointer button is pressed, the corresponding upper case letter is sent. To distinguish a pointer button 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(4) for details).
๐ธ SELECT/PASTE ๐ธ
Okay bestie, so here's the tea on how copy-paste actually works in X. X clients give you select-and-paste powers by answering requests that the X server carries back and forth for them. The X server keeps its data in what are called โatomsโ โ one for each flavor of selection (PRIMARY, SECONDARY, CLIPBOARD) โ plus that whole similar cut-buffer situation (CUT_BUFFER0 through CUT_BUFFER7). All of that is written down in the ICCCM, iykyk.
The ICCCM handles the low-level select/paste machinery. What it does not talk about is highlighting. And here's the thing โ a selection is not the same as highlighting. Xterm (like a ton of other apps) uses highlighting just to show you what text you've currently got selected. An X application may own a selection, which is what lets it be the source of data copied through a given selection atom. And yes, xterm can keep owning a selection even after it stops highlighting it โ go peek at keepSelection for that one.
Xterm hands out selection data using the cells of the characters it's displaying. It fills those cells with sequences of bytes and control sequences:
- By default, xterm uses UTF-8 encoding if your locale uses that encoding. The
utf8andlocaleresources are the ones steering that behavior.
When it's decoding UTF-8, xterm may compose certain base- and combining-characters together. Flip this on or off with the precompose resource.
Xterm has other resources for specialized encoding needs too, including allowC1Printable, showMissingGlyphs, and utf8Weblike. ๐
- Xterm stores base- and combining characters for each cell in its window. It does not store the sequence of bytes that composed those characters. Selection uses the characters which xterm stores in each cell.
If the selection target accepts UTF-8, xterm copies all of the base- and combining characters over to the target. If the selection target does not accept UTF-8 โ like when you're going to a cut buffer โ xterm copies only what the target can actually take, using the defaultString resource to fill in cells that just can't be represented in the target. ๐
- All of the cells in xterm's window start out uninitialized. Erasing the screen makes the cells uninitialized again. And uninitialized cells? They get displayed as spaces.
By default, selecting rows on xterm's window will highlight all of the cells that the pointer travels over while you're selecting. If the highlightSelection resource is set, though, xterm won't highlight trailing uninitialized cells on the selected rows.
The trimSelection resource lets you throw away trailing blanks from each selected row โ both from uninitialized cells and from the ones an application actually wrote.
- As xterm writes characters into its window and wraps text at the right margin, it remembers that the text was wrapped. Want to actually see that? Use the
showWrapMarksresource. โจ
PRIMARY
When it's configured to use the primary selection (which is the default, bestie), xterm can provide the selection data in ways that help keep your character encoding info intact as it gets pasted.
PRIMARY is a standard X feature, documented in the ICCCM (Inter-Client Communication Conventions Manual), and it says:
The selection named by the atom PRIMARY is used for all commands that take only a single argument and is the principal means of communication between clients that use the selection mechanism.
A user โselectsโ text on xterm, which highlights that selected text. A later โpasteโ to another client forwards a request to whichever client owns the selection. If xterm owns the primary selection, it makes the data available in the form of one or more โselection targetsโ. If it does not own the primary selection โ say it released it, or another client has asserted ownership โ then it leans on cut-buffers to pass the data along. But cut-buffers only handle ISO-8859-1 data (officially, anyway โ some clients straight up ignore the rules ๐).
CLIPBOARD
When it's configured to use the clipboard (via the selectToClipboard resource), that whole persistence-of-ownership problem gets bypassed entirely. Other than that? No difference at all in terms of the data that can be passed via selection.
The selectToClipboard resource is a compromise โ it lets CLIPBOARD be treated almost like PRIMARY, which is not how the ICCCM rolls, since the ICCCM describes CLIPBOARD in different terms than PRIMARY or SECONDARY. Its lengthy explanation opens with the essential points:
The selection named by the atom CLIPBOARD is used to hold data that is being transferred between clients, that is, data that usually is being cut and then pasted or copied and then pasted. Whenever a client wants to transfer data to the clipboard: - It should assert ownership of the CLIPBOARD. - If it succeeds in acquiring ownership, it should be prepared to respond to a request for the contents of the CLIPBOARD in the usual way (retaining the data to be able to return it). The request may be generated by the clipboard client described below.
SELECT
But here's the plot twist โ a lot of applications use CLIPBOARD in imitation of other windowing systems. So the selectToClipboard resource (and its matching menu entry, Select to Clipboard) introduce the SELECT token (known only to xterm, it's our little secret ๐คซ) which picks between the PRIMARY and CLIPBOARD tokens.
And if you don't wanna use this feature at all, you can always do workarounds like using the xclip program to show the contents of the X clipboard inside an xterm window.
SECONDARY
This one gets used way less often than PRIMARY or CLIPBOARD. According to the ICCCM, it's used:
- As the second argument to commands that take two arguments (for example, โexchange primary and secondary selectionsโ)
- As a way of getting data when there's a primary selection and the user doesn't want to disturb it ๐ธ
Selection Targets
The different types of data that get passed depend on what the receiving client asks for. These are what we call selection targets.
When it's asking for the selection data, xterm tries the following types in this exact order:
UTF8_STRING : This is an XFree86 extension, which denotes that the data is encoded in UTF-8. When xterm is built with wide-character support, it both accepts and provides this type.
TEXT : the text is in the encoding which corresponds to your current locale.
COMPOUND_TEXT : this is a format for multiple character set data, such as multi-lingual text. It can store UTF-8 data as a special case.
STRING : This is Latin 1 (ISO-8859-1) data.
The middle two (TEXT and COMPOUND_TEXT) get added if xterm is configured with the i18nSelections resource set to โtrueโ.
UTF8_STRING is preferred (which is why it's first in the list) since xterm stores text as Unicode data when it's running in wide-character mode, so no translation is needed. TEXT and COMPOUND_TEXT, on the other hand, may require translation. And if that translation is incomplete, they'll insert X's โdefaultStringโ โ whose value cannot be set, and may just be empty. Xterm's defaultString resource specifies the string to use for incomplete translations of the UTF8_STRING.
You can change up the types xterm tries using the eightBitSelectTypes or utf8SelectTypes resources. Say you've got some specific locale setting that doesn't use UTF-8 encoding โ yeah, this is for that. The resource value is a comma-separated list of the selection targets, made up of the names shown above. And you can use the special name I18N to denote the optional inclusion of TEXT and COMPOUND_TEXT. The names get matched ignoring case, and they can be abbreviated. The default list can be expressed several different ways, e.g.,
UTF8_STRING,I18N,STRING
utf8,i18n,string
u,i,s
Mouse Protocol
Applications can send escape sequences to xterm to make it send escape sequences back to the computer when you press a pointer button โ or even (depending on which escape sequence) send escape sequences back to the computer as you move the pointer. ๐ฑ๏ธโจ
These escape sequences and the responses, called the mouse protocol, are documented in XTerm Control Sequences. They don't show up in the actions invoked by the translations resource, because that resource doesn't change while you're running xterm โ whereas applications can change the mouse protocol (enable it, disable it, use different modes, the whole vibe).
That said, the mouse protocol is interpreted within the actions that are usually associated with the pointer buttons. Xterm ignores the mouse protocol in the insert-selection action if the shift-key is being held down at the same time. It also modifies a few other actions when the shift-key is pressed, e.g., suppressing the response with the pointer position โ though it doesn't eliminate changes to the selected text.
๐ MENUS ๐
Xterm has four menus, named mainMenu, vtMenu, fontMenu, and tekMenu. Each menu pops up under the correct combinations of key and button presses. Each menu is divided into sections, separated by a horizontal line. Some menu entries correspond to modes you can alter โ and a check mark shows up next to whichever mode is currently active. Selecting one of those modes toggles its state. Other menu entries are commands; selecting one of those performs the indicated function.
All of the menu entries correspond to X actions. In the list below, the menu label is shown first, followed by the action's name in parenthesis.
Main Options
The xterm mainMenu pops up when the โcontrolโ key and pointer button one are pressed inside a window. This menu contains items that apply to both the VTxxx and Tektronix windows. It's got several sections:
Commands for managing X events:
- Toolbar (resource
toolbar) โ Clicking on the โToolbarโ menu entry hides the toolbar if it's visible, and shows it if it's not. - Secure Keyboard (resource
securekbd) โ Secure Keyboard mode is helpful when you're typing in passwords or other sensitive data in an unsecure environment (see SECURITY below, but read the limitations carefully bestie, fr fr). - Allow SendEvents (resource
allowsends) โ Specifies whether or not synthetic key and button events generated using the X protocolSendEventrequest should be interpreted or discarded. This corresponds to theallowSendEventsresource. - Redraw Window (resource
redraw) โ Forces the X display to repaint; useful in some environments.
Commands for capturing output:
- Log to File (resource
logging) โ Captures text sent to the screen in a log file, as in the-llogging option. - Print-All Immediately (resource
print-immediate) โ fires theprint-immediateaction, which yeets the text of the current window straight into a file, exactly as specified by theprintFileImmediate,printModeImmediateandprintOptsImmediateresources. ๐ - Print-All on Error (resource
print-on-error) โ fires theprint-on-erroraction, which toggles a flag that tells xterm: if you exit with an X error, dump the text of the current window straight to a file, per theprintFileOnXError,printModeOnXErrorandprintOptsOnXErrorresources. - Print Window (resource
print) โ sends the text of the current window to the program named in theprinterCommandresource. - Redirect to Printer (resource
print-redir) โ this one setsprinterControlModeto0or2. Use it to turn the printer on like an application had sent the right control sequence, and it's also lowkey perfect for switching the printer off when an app turned it on and then forgot to reset the print control mode. messy of them, honestly. - XHTML Screen Dump (resource
dump-html) โ only available when compiled with screen dump support. Invokes thedump-htmlaction, which creates an XHTML file matching what's on your current screen right now: border, internal border, colors and most attributes โ bold, italic, underline, faint, strikeout, reverse. Blink gets rendered as white-on-red, and double underline renders the same as underline because there's genuinely no portable equivalent in CSS 2.2. ๐ญ
The font is whatever your browser uses for preformatted (<pre>) elements. The XHTML file references a cascading style sheet (CSS) named xterm.css that you can create yourself to pick a font or override properties.
These are the CSS selectors it uses, with the expected default behavior in the XHTML file:
.ulfor underline,.bdfor bold,.itfor italic,.stfor strikeout,.lufor strikeout combined with underline.
On top of that, you can also use
.evto affect even numbered lines and.odto affect odd numbered lines.
The attributes faint, reverse and blink are implemented as style attributes setting color properties. All colors are specified as RGB percentages so that displays with 10 bits per RGB are supported. โจ
The name of the file will be
xterm.yyyy.MM.dd.hh.mm.ss.xhtml
where yyyy, MM, dd, hh, mm and ss are the year, month, day, hour, minute and second when the screen dump was performed โ and heads up, the file gets created in the directory xterm was started in, or the home directory for a login xterm.
You can also trigger the dump-html action with the Media Copy control sequence CSI 1 0 i, like from a shell script with
printf '\033[10i'
Only the UTF-8 encoding is supported. no exceptions bestie.
- SVG Screen Dump (resource
dump-svg) โ only available when compiled with screen dump support. Invokes thedump-svgaction, which creates a Scalable Vector Graphics (SVG) file matching the contents of the current screen: border, internal border, colors and most attributes โ bold, italic, underline, double underline, faint, strikeout, reverse. Blink is rendered as white-on-red. The font is whatever your renderer uses for themonospacefont-family. All colors are specified as RGB percentages so displays with 10 bits per RGB are supported. ๐
The name of the file will be
xterm.yyyy.MM.dd.hh.mm.ss.svg
where yyyy, MM, dd, hh, mm and ss are the year, month, day, hour, minute and second when the screen dump was performed โ same deal as before, the file lands in the directory xterm was started in, or the home directory for a login xterm.
You can also trigger the dump-svg action with the Media Copy control sequence CSI 1 1 i, for example from a shell script with
printf '\033[11i'
Only the UTF-8 encoding is supported. ๐
Modes for setting keyboard style:
- 8-Bit Controls (resource
8-bit-control) โ enabled for VT220 emulation, this controls whether xterm sends 8-bit control sequences instead of 7-bit (ASCII) controls, i.e. sending a byte in the range 128โ159 rather than the escape character followed by a second byte. Xterm always interprets both 8-bit and 7-bit control sequences (check Xterm Control Sequences for the receipts). This corresponds to theeightBitControlresource. - Backarrow Key (BS/DEL) (resource
backarrow key) โ changes how the backarrow key behaves, making it transmit either a backspace (8) or delete (127) character. This corresponds to thebackarrowKeyresource. - Alt/NumLock Modifiers (resource
num-lock) โ controls how Alt- and NumLock-key modifiers get treated. This corresponds to thenumLockresource. - Meta Sends Escape (resource
meta-esc) โ controls whether Meta keys get converted into a two-character sequence where the character itself is preceded by ESC. This corresponds to themetaSendsEscaperesource. - Delete is DEL (resource
delete-is-del) โ controls whether the Delete key on the editing keypad sends DEL (127) or the VT220-style Remove escape sequence. This corresponds to thedeleteIsDELresource. - Old Function-Keys (resource
oldFunctionKeys) - HP Function-Keys (resource
hpFunctionKeys) - SCO Function-Keys (resource
scoFunctionKeys) - Sun Function-Keys (resource
sunFunctionKeys) - VT220 Keyboard (resource
sunKeyboard)
These last five act as a radio-button โ pick one style for the keyboard layout, periodt. The layout corresponds to more than one resource setting: sunKeyboard, sunFunctionKeys, scoFunctionKeys and hpFunctionKeys. ๐
Commands for process signalling:
- Send STOP Signal (resource
suspend) - Send CONT Signal (resource
continue) - Send INT Signal (resource
interrupt) - Send HUP Signal (resource
hangup) - Send TERM Signal (resource
terminate) - Send KILL Signal (resource
kill)
These send the SIGTSTP, SIGCONT, SIGINT, SIGHUP, SIGTERM and SIGKILL signals respectively, to the process group of the process running under xterm (usually the shell). The SIGCONT function is especially useful when the user has accidentally typed CTRL-Z and suspended the process โ we've all been there bestie, it's giving panic, but it's fine. ๐
- Quit (resource
quit) โ stops processing X events except to support the-holdoption, and then sends aSIGHUPsignal to the process group of the process running under xterm (usually the shell).
๐ธ VT OPTIONS ๐ธ
The xterm vtMenu sets various modes in the VTxxx emulation, and pops up when you press the โcontrolโ key plus pointer button two inside the VTxxx window. ๐ซถ
VTxxx Modes:
- Enable Scrollbar (resource
scrollbar) โ enable (or disable) the scrollbar. This corresponds to the-sboption and thescrollBarresource. - Enable Jump Scroll (resource
jumpscroll) โ enable (or disable) jump scrolling. This corresponds to the-joption and thejumpScrollresource. - Enable Reverse Video (resource
reversevideo) โ enable (or disable) reverse-video. This corresponds to the-rvoption and thereverseVideoresource. - Enable Auto Wraparound (resource
autowrap) โ enable (or disable) auto-wraparound. This corresponds to the-awoption and theautoWrapresource. - Enable Reverse Wraparound (resource
reversewrap) โ enable (or disable) reverse wraparound. This corresponds to the-rwoption and thereverseWrapresource. - Enable Auto Linefeed (resource
autolinefeed) โ enable (or disable) auto-linefeed. This is the VT102 NEL function, which makes the emulator emit a line feed after each carriage return. There is no corresponding command-line option or resource setting, ngl. - Enable Application Cursor Keys (resource
appcursor) โ enable (or disable) application cursor keys. This corresponds to theappcursorDefaultresource. There is no corresponding command-line option. - Enable Application Keypad (resource
appkeypad) โ enable (or disable) application keypad keys. This corresponds to theappkeypadDefaultresource. There is no corresponding command-line option. - Scroll to Bottom on Key Press (resource
scrollkey) โ enable (or disable) scrolling to the bottom of the scrolling region on a keypress. This corresponds to the-skoption and thescrollKeyresource.
Special case alert: the XON / XOFF keys (control/S and control/Q) are ignored. ๐ซ
- Scroll to Bottom on Tty Output (resource
scrollttyoutput) โ enable (or disable) scrolling to the bottom of the scrolling region when there's output to the terminal. This corresponds to the-sioption and thescrollTtyOutputresource. - Allow 80/132 Column Switching (resource
allow132) โ enable (or disable) switching between 80 and 132 columns. This corresponds to the-132option and thec132resource. iconic. ๐
Keep Selection (resource keepSelection)
Bestie, this one is about โจownershipโจ โ specifically, do you want xterm to disown the selection the second it stops highlighting it? Like when an app goes and changes the display so the highlighted text no longer matches what's on screen? Because as long as xterm keeps owning the selection for a given atom, it can still hand that text over to other clients that request the selection using that atom. ๐
This is the keepSelection resource, and ngl there's no corresponding command-line option for it.
Okay but real talk โ telling xterm not to disown the selection does not stop other applications from taking ownership of the selection. And when that happens, xterm gets notified that it happened, and it removes its highlighting. No cap, that part's out of its hands. ๐ญ
See SELECT/PASTE for more info. ๐ซถ
Select to Clipboard (resource selectToClipboard)
This tells xterm whether to use PRIMARY or CLIPBOARD for the SELECT tokens in the translations resource โ you know, the thing that maps your keyboard and mouse actions to select/paste actions. ๐
Corresponds to the selectToClipboard resource. No corresponding command-line option.
The keepSelection resource setting applies to CLIPBOARD selections just like it does for PRIMARY selections. But some window managers treat the clipboard all special and extra. For instance, XQuartz's synchronization between the OSX pasteboard and the X11 clipboard causes applications to lose the selection ownership for that atom when a selection is copied to the clipboard. ๐ฆ
See SELECT/PASTE for more. โจ
Enable Visual Bell (resource visualbell)
Turns on (or off) the visible bell โ that's the flashing instead of an audible bell. This one corresponds to the -vb option and the visualBell resource. ๐
Enable Bell Urgency (resource bellIsUrgent)
Turns the Urgency window manager hint on (or off) when Control-G is received. This corresponds to the bellIsUrgent resource. ๐
Enable Pop on Bell (resource poponbell)
Turns on (or off) the raising of the window when Control-G is received. This corresponds to the -pop option and the popOnBell resource. ๐ฅ
Enable Blinking Cursor (resource cursorblink)
Turns on (or off) the blinking-cursor feature. This corresponds to the -bc option and the cursorBlink resource. There are also escape sequences (see Xterm Control Sequences) and the way they interact is giving chaos in the best way:
- If the
cursorBlinkXORresource is set, the menu entry and the escape sequence states will be XOR'd: if both are enabled, the cursor will not blink; if only one is enabled, the cursor will blink. ๐ - If the
cursorBlinkXORis not set; if either the menu entry or the escape sequence states are set, the cursor will blink.
In either case, the checkbox for the menu shows the state of the cursorBlink resource, which may not correspond to what the cursor is actually doing. ๐ Iconic honestly.
Enable Alternate Screen Switching (resource titeInhibit)
Turns on (or off) switching between the normal and alternate screens. This corresponds to the titeInhibit resource. There is no corresponding command-line option. ๐
Enable Active Icon (resource activeicon)
Turns on (or off) the active-icon feature. This corresponds to the -ai option and the activeIcon resource. โจ
Enable XCopyArea Icon (resource brokenCopyArea)
Turns on (or off) a workaround for removal of hardware acceleration from recent X servers. ๐ซ
Sixel Scrolling (resource sixelScrolling)
This corresponds to the sixelScrolling resource. It can also be turned off and on using the private mode DECSDM (Sixel Display Mode). ๐
- When enabled, xterm draws sixel graphics at the current text cursor location, scrolling the image vertically if it is larger than the screen, and leaving the text cursor at the same column in the next complete line after the image when returning to text mode.
This is the default, which corresponds to the reset state of DECSDM. ๐
- When disabled, xterm draws sixel graphics starting at the upper left of the screen, cropping to fit the screen, and does not alter the text cursor location.
This corresponds to the set state of DECSDM.
There is no corresponding command-line option. ๐
Private Color Registers (resource privateColorRegisters)
If xterm is configured to support ReGIS graphics, this controls whether a private color palette can be used. ๐
When enabled, each graphic image uses a separate set of color registers, so that it essentially has a private palette (this is the default). If it is not set, all graphics images share a common set of registers โ which is how sixel and ReGIS graphics worked on actual hardware. The default is likely a more useful mode on modern TrueColor hardware. โจ
This corresponds to the privateColorRegisters resource. There is no corresponding command-line option.
VTxxx Commands:
Do Soft Reset (resource softreset)
This corresponds to the VT220 DECSTR control sequence. A soft reset leaves the contents of the window intact, but resets modes which affect subsequent updates. ๐ง
Soft reset differs from full reset in a minor detail:
- Set the saved cursor position to the upper-left corner of the window.
- Exit from the status-line without erasing it.
Both soft/full resets do the following:
- Make the cursor visible, with shape reset according to the
cursorUnderLineandcursorBarresources. - Enable or disable the cursor-blinking state according to the
cursorBlinkresource, and set the Enable Blinking Cursor menu checkmark to match. - Reset video attributes, e.g., bold, italic, underline, blink.
- Reset the ANSI color mode to the xterm default foreground and background.
- Reset the 256-color palette to its initial state.
- Reset the selected character set, e.g., ASCII, alternate character set. The UTF-8 modes are not changed.
- Reset ECMA-48
KAM. - Reset
DECCKMandDECKPAMper resourcesappcursorDefaultandappkeypadDefault. - Reset key-format and key-modifier modes to the values set by resources, i.e.,
formatCursorKeys, formatFunctionKeys,
formatKeypadKeys, formatModifierKeys,
formatOtherKeys, and formatSpecialKeys.
as well as
modifyCursorKeys, modifyFunctionKeys,
modifyKeyboard, modifyKeypadKeys,
modifyModifierKeys, modifyOtherKeys, and
modifySpecialKeys.
- Reset origin mode (
DECOM). - Reset all margins (i.e., top/bottom and left/right). This can be convenient when some program has left the scroll regions set incorrectly.
- Set autowrap and reverse wrapping according to the resource values
autoWrapandreverseWrap. - Reset checksum extension to the
checksumExtensionresource.
Do Full Reset (resource hardreset)
A full reset does this in addition to a soft reset: ๐ฅ
- Clear the window.
- Reset tab stops to every eight columns.
- Reset the screen to match the
reverseVideoresource. - Resize the screen to 80 columns if 132-column mode was initially enabled with the
c132resource. - Reset scrolling (jump versus smooth) per the
jumpScrollresource. - Enable linefeed mode (ECMA-48
LNM) and send/receive mode (ECMA-48SRM). - Reset DEC user-defined keys (
DECUDK). - Disable application mode for cursor- and keypad-keys (
DECCKM,DECKPAM). - Reset menu entry 8-bit Controls, per resource
eightBitControl. - Reset interpretation of the backarrow key, per initial resource settings.
- Set the keyboard type according to the resources
keyboardType,hpFunctionKeys,scoFunctionKeys,sunFunctionKeys,tcapFunctionKeys,oldXtermFKeysandsunKeyboard. - Turn mouse tracking off.
- Reset title and pointer modes per resources
titleModesandpointerMode. - Reset the readline and bracketed paste modes.
- Discard all SIXEL and ReGIS graphics data from memory.
- Reset
sixelScrollingandprivateColorRegistersfrom initial resource values. - Set
DECSDMif thesixelScrollingresource is true. Otherwise, resetDECSDM.
A full reset does this, unlike a soft reset: ๐
- Move the cursor to the upper-left corner of the window, and then save that position.
- Hide the status-line, setting its display-type to
none.
Reset and Clear Saved Lines (resource clearsavedlines)
Perform a full reset, and also clear the saved lines. Clean slate era. โจ
okay so this is literally the VT102 RIS control sequence, but with a few obvious differences. like, for example, your session is not disconnected like a real VT102 would do, bestie. ๐
๐ฅ๏ธ Commands for setting the current screen ๐ฅ๏ธ
- Show Tek Window (resource
tekshow) โ When it's enabled, it pops the Tektronix 4014 window up (makes it visible). When it's disabled, it hides the Tektronix 4014 window. ๐ - Switch to Tek Mode (resource
tekmode) โ When it's enabled, it pops the Tektronix 4014 window up if it's not already visible, and switches the input stream to that window. When it's disabled, it hides the Tektronix 4014 window and switches input back to the VTxxx window. ๐ - Hide VT Window (resource
vthide) โ When it's enabled, it hides the VTxxx window, shows the Tektronix 4014 window if it wasn't already visible, and switches the input stream to that window. When it's disabled, it shows the VTxxx window, and switches the input stream to that window. ๐ - Show Alternate Screen (resource
altscreen) โ When it's enabled, it shows the alternate screen. When it's disabled, it shows the normal screen. Note that the normal screen may have saved lines; the alternate screen does not. ๐บ
๐ธ VT Fonts ๐ธ
The xterm fontMenu pops up when the โcontrolโ key and pointer button three are pressed in a window. It sets the font used in the VTxxx window, or modifies the way the font is specified or displayed. There are several sections. โจ
The first section allows you to select the font from a set of alternatives:
- Default (resource
fontdefault) โ Set the font to the default, i.e., that given by the*VT100.fontresource. ๐ - Unreadable (resource
font1) โ Set the font to that given by the*VT100.font1resource. ๐ต - Tiny (resource
font2) โ Set the font to that given by the*VT100.font2resource. ๐ - Small (resource
font3) โ Set the font to that given by the*VT100.font3resource. ๐ฃ - Medium (resource
font4) โ Set the font to that given by the*VT100.font4resource. ๐ฅ - Large (resource
font5) โ Set the font to that given by the*VT100.font5resource. ๐ฆ - Huge (resource
font6) โ Set the font to that given by the*VT100.font6resource. ๐ - Enormous (resource
font7) โ Set the font to that given by the*VT100.font7resource. ๐ณ - Escape Sequence (resource
fontescape) โ This allows you to set the font last specified by the Set Font escape sequence (seeXterm Control Sequences). ๐ค - Selection (resource
fontsel) โ This allows you to set the font specified the current selection as a font name (if the PRIMARY selection is owned). ๐ฑ๏ธ
The second section allows you to modify the way it is displayed:
- Bold Fonts (resource
allow-bold-fonts) โ This is normally checked (enabled). When unchecked,xtermwill not use bold fonts. The menu selection modifies theallowBoldFontsresource. ๐ช - Line-Drawing Characters (resource
font-linedrawing) โ When set, tellsxtermto draw its own line-drawing characters. Otherwise it relies on the font containing these. The menu selection modifies theforceBoxCharsresource. ๐ - Packed Font (resource
font-packed) โ When set, tellsxtermto use the minimum glyph-width from a font when displaying characters. Use the maximum width (unchecked) to help display proportional fonts. The menu selection modifies theforcePackedFontresource. ๐ฆ - Doublesized Characters (resource
font-doublesize) โ When set,xtermmay ask the font server to produce scaled versions of the normal font, for VT102 double-size characters. ๐
The third section allows you to modify the way it is specified:
- TrueType Fonts (resource
render-font) โ If therenderFontand corresponding resources were set, this is a further control whetherxtermwill actually use the Xft library calls to obtain a font. ๐ ฐ๏ธ - UTF-8 Encoding (resource
utf8-mode) โ This controls whetherxtermuses UTF-8 encoding of input/output. It is useful for temporarily switchingxtermto display text from an application which does not follow the locale settings. It corresponds to theutf8resource. ๐ - UTF-8 Fonts (resource
utf8-fonts) โ This controls whetherxtermuses UTF-8 fonts for display. It is useful for temporarily switchingxtermto display text from an application which does not follow the locale settings. It combines theutf8andutf8Fontsresources, subject to thelocaleresource. ๐ค - UTF-8 Titles (resource
utf8-title) โ This controls whetherxtermaccepts UTF-8 encoding for title control sequences. It corresponds to theutf8Fontsresource.
Initially the checkmark is set according to both the utf8 and utf8Fonts resource values. If the latter is set to โalwaysโ, the checkmark is disabled. Likewise, if there are no fonts given in the utf8Fonts subresources, then the checkmark also is disabled.
The standard XTerm app-defaults file defines both sets of fonts, while the UXTerm app-defaults file defines only one set. Assuming the standard app-defaults files, this command will launch xterm able to switch between UTF-8 and ISO-8859-1 encoded fonts:
uxterm -class XTerm
The fourth section allows you to enable or disable special operations which can be controlled by writing escape sequences to the terminal. These are disabled if the SendEvents feature is enabled:
- Allow Color Ops (resource
allow-color-ops) โ This corresponds to theallowColorOpsresource. Enable or disable control sequences that set/query the colors. ๐จ - Allow Font Ops (resource
allow-font-ops) โ This corresponds to theallowFontOpsresource. Enable or disable control sequences that set/query the font. ๐ค - Allow Mouse Ops (resource
allow-mouse-ops) โ Enable or disable control sequences that cause the terminal to send escape sequences on pointer-clicks and movement. This corresponds to theallowMouseOpsresource. ๐ฑ๏ธ - Allow Tcap Ops (resource
allow-tcap-ops) โ Enable or disable control sequences that query the terminal's notion of its function-key strings, as termcap or terminfo capabilities. This corresponds to theallowTcapOpsresource. ๐ - Allow Title Ops (resource
allow-title-ops) โ Enable or disable control sequences that modify the window title or icon name. This corresponds to theallowTitleOpsresource. ๐ท๏ธ - Allow Window Ops (resource
allow-window-ops) โ Enable or disable extended window control sequences (as used indtterm). This corresponds to theallowWindowOpsresource. ๐ช
๐ฎ Tek Options ๐ฎ
The xterm tekMenu sets various modes in the Tektronix emulation, and is popped up when the โcontrolโ key and pointer button two are pressed in the Tektronix window. The current font size is checked in the modes section of the menu. ๐น๏ธ
- Large Characters (resource
tektextlarge) - #2 Size Characters (resource
tektext2) - #3 Size Characters (resource
tektext3) - Small Characters (resource
tektextsmall)
Commands:
- PAGE (resource
tekpage) โ Simulates the Tektronix โPAGEโ button by:- clearing the window,
- cancelling the graphics input-mode, and
- moving the cursor to the home position.
- RESET (resource
tekreset) โ Unlike the similarly-named Tektronix โRESETโ button, this does everything thatPAGEdoes as well as resetting the line-type and font-size to their default values. ๐ - COPY (resource
tekcopy) โ Simulates the Tektronix โCOPYโ button (which makes a hard-copy of the screen) by writing the information to a text file. ๐
Windows:
- Show VT Window (resource
vtshow) - Switch to VT Mode (resource
vtmode) - Hide Tek Window (resource
tekhide)
๐ SECURITY ๐
okay bestie, listen up, because this part is important and it's giving serious energy. X environments differ in their security consciousness. periodt.
- Most servers, run under
xdm, are capable of using a โmagic cookieโ authorization scheme that can provide a reasonable level of security for many people. If your server is only using a host-based mechanism to control access to the server (seexhost(1)), then if you enable access for a host and other users are also permitted to run clients on that same host, it is possible that someone can run an application which uses the basic services of the X protocol to snoop on your activities, potentially capturing a transcript of everything you type at the keyboard. ๐ not the keylogging jump scare - Any process which has access to your X display can manipulate it in ways that you might not anticipate, even redirecting your keyboard to itself and sending events to your application's windows. This is true even with the โmagic cookieโ authorization scheme. While the
allowSendEventsprovides some protection against rogue applications tampering with your programs, guarding against a snooper is harder. - The X input extension for instance allows an application to bypass all of the other (limited) authorization and security features, including the
GrabKeyboardprotocol. - The possibility of an application spying on your keystrokes is of particular concern when you want to type in a password or other sensitive data. The best solution to this problem is to use a better authorization mechanism than is provided by X.
Subject to all of these caveats, a simple mechanism exists for protecting keyboard input in xterm. ๐ซถ
The xterm menu (see MENUS above) contains a Secure Keyboard entry which, when enabled, attempts to ensure that all keyboard input is directed only to xterm (using the GrabKeyboard protocol request). When an application prompts you for a password (or other sensitive data), you can enable Secure Keyboard using the menu, type in the data, and then disable Secure Keyboard using the menu again.
- This ensures that you know which window is accepting your keystrokes. โจ
- It cannot ensure that there are no processes which have access to your X display that might be observing the keystrokes as well. ๐ญ
Only one X client at a time can grab the keyboard, so when you attempt to enable Secure Keyboard it may fail. In this case, the bell will sound. If the Secure Keyboard succeeds, the foreground and background colors will be exchanged (as if you selected the Enable Reverse Video entry in the Modes menu); they will be exchanged again when you exit secure mode. If the colors do not switch, then you should be very 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 mode before the prompt gets displayed, and to make sure that the prompt gets 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 check mark appears next to the entry.
Secure Keyboard mode will be disabled automatically if your xterm window becomes iconified (or otherwise unmapped), or if you start up a reparenting window manager (that places a title bar or other decoration around the window) while in Secure Keyboard mode. (This is a feature of the X protocol not easily overcome.) When this happens, the foreground and background colors will be switched back and the bell will sound in warning. ๐
๐ค CHARACTER CLASSES ๐ค
Clicking the left pointer button twice in rapid succession (double-clicking) causes all characters of the same class (e.g., letters, white space, punctuation) to be selected as a โwordโ. Since different people have different preferences for what should be selected (for example, should filenames be selected as a whole or only the separate subnames), the default mapping can be overridden through the use of the charClass (class CharClass) resource. ๐ฆ
This resource is a series of comma-separated range:value pairs.
- The
rangeis either a single number orlow-highin the range of 0 to 65535, corresponding to the code for the character or characters to be set. - The
valueis arbitrary. For example, the default table uses the character number of the first character occurring in the set. When not in UTF-8 mode, only the first 256 entries of this table will be used.
The default table starts as follows -
static int charClass[256] = {
/* 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 */
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,
/* x80 x81 x82 x83 IND NEL SSA ESA */
1, 1, 1, 1, 1, 1, 1, 1,
/* HTS HTJ VTS PLD PLU RI SS2 SS3 */
1, 1, 1, 1, 1, 1, 1, 1,
/* DCS PU1 PU2 STS CCH MW SPA EPA */
1, 1, 1, 1, 1, 1, 1, 1,
/* x98 x99 x9A CSI ST OSC PM APC */
1, 1, 1, 1, 1, 1, 1, 1,
/* - i c/ L ox Y- | So */
160, 161, 162, 163, 164, 165, 166, 167,
/* .. c0 ip << _ R0 - */
168, 169, 170, 171, 172, 173, 174, 175,
/* o +- 2 3 ' u q| . */
176, 177, 178, 179, 180, 181, 182, 183,
/* , 1 2 >> 1/4 1/2 3/4 ? */
184, 185, 186, 187, 188, 189, 190, 191,
/* A` A' A^ A~ A: Ao AE C, */
48, 48, 48, 48, 48, 48, 48, 48,
/* E` E' E^ E: I` I' I^ I: */
48, 48, 48, 48, 48, 48, 48, 48,
/* D- N~ O` O' O^ O~ O: X */
48, 48, 48, 48, 48, 48, 48, 215,
/* O/ U` U' U^ U: Y' P B */
48, 48, 48, 48, 48, 48, 48, 48,
/* a` a' a^ a~ a: ao ae c, */
48, 48, 48, 48, 48, 48, 48, 48,
/* e` e' e^ e: i` i' i^ i: */
48, 48, 48, 48, 48, 48, 48, 48,
/* d n~ o` o' o^ o~ o: -: */
48, 48, 48, 48, 48, 48, 48, 247,
/* o/ u` u' u^ u: y' P y: */
48, 48, 48, 48, 48, 48, 48, 48};
For example, the string โ33:48,37:48,45-47:48,38:48โ indicates that the exclamation mark, percent sign, dash, period, slash, and ampersand characters should be treated the same way as characters and numbers. This is useful for cutting and pasting electronic mailing addresses and filenames. ๐ง lowkey so handy
โจ๏ธ KEY BINDINGS โจ๏ธ
It is possible to rebind keys (or sequences of keys) to arbitrary strings for input, by changing the translations resources for the vt100 or tek4014 widgets. Changing the translations resource for events other than key and button events is not expected, and will cause unpredictable behavior. ๐ don't do it bestie, that's the chaos path
๐ฌ Actions
The following actions are provided for use within the vt100 or tek4014 translations resources:
allow-bold-fonts(on/off/toggle)โ This action sets, unsets or toggles theallowBoldFontsresource and is also invoked by theallow-bold-fontsentry infontMenu.allow-color-ops(on/off/toggle)โ This action sets, unsets or toggles theallowColorOpsresource and is also invoked by theallow-color-opsentry infontMenu.allow-font-ops(on/off/toggle)โ This action sets, unsets or toggles theallowFontOpsresource and is also invoked by theallow-font-opsentry infontMenu.allow-mouse-ops(on/off/toggle)โ This action sets, unsets or toggles theallowMouseOpsresource and is also invoked by theallow-mouse-opsentry infontMenu.allow-send-events(on/off/toggle)โ This action sets, unsets or toggles theallowSendEventsresource and is also invoked by theallowsendsentry inmainMenu.allow-tcap-ops(on/off/toggle)โ This action sets, unsets or toggles theallowTcapOpsresource and is also invoked by theallow-tcap-opsentry infontMenu.allow-title-ops(on/off/toggle)โ This action sets, unsets or toggles theallowTitleOpsresource and is also invoked by theallow-title-opsentry infontMenu.allow-window-ops(on/off/toggle)โ This action sets, unsets or toggles theallowWindowOpsresource and is also invoked by theallow-window-opsentry infontMenu.alt-sends-escape()โ This action toggles the state of thealtSendsEscaperesource.bell([percent])โ This action rings the keyboard bell at the specified percentage above or below the base volume. ๐clear-saved-lines()โ This action doeshard-reset()and also clears the history of lines saved off the top of the screen. It is also invoked from theclearsavedlinesentry invtMenu. The effect is identical to a hardware reset (RIS) control sequence.copy-selection(destname [, ...])โ This action puts the currently selected text into all of the selections or cutbuffers specified bydestname. Unlikeselect-end, it does not send a mouse position or otherwise modify the internal selection state. ๐
create-menu(m/v/f/t)
okay so this action creates one of the menus xterm uses, but only if it hasn't already been created. โจ The parameter values are the menu names, in this order: mainMenu, vtMenu, fontMenu, tekMenu โ matching m, v, f, t respectively. ๐
dabbrev-expand()
Expands the word sitting right before the cursor by digging through the preceding text on the screen and the scrollback buffer for words that start with that abbreviation. ๐ Run dabbrev-expand() over and over and it keeps looking farther back for a different expansion. When there's nothing left to match, you get a bell โ that's the signal, bestie. ๐
Try to expand an empty word (i.e., when the cursor is preceded by a space) and it just hands you all the previous words, one after another. Consecutive identical expansions get ignored. And "word" here means a sequence of non-whitespace characters, no cap.
This feature partially emulates the behavior of โdynamic abbreviationโ expansion in Emacs (where it's bound to M-/). ๐ง Here's a resource setting for xterm that does the exact same thing:
*VT100*translations: #override \n\
Meta <KeyPress> /:dabbrev-expand()
deiconify()
Changes the window state back to normal, if it was iconified. ๐ธ
delete-is-del()
This action toggles the state of the deleteIsDEL resource. ๐
dired-button()
Handles a button event (other than press and release) by echoing the event's position โ that's the character line and column โ in this format:
^X ESC G <line+โ โ> <col+โ โ>
dump-html()
Invokes the XHTML Screen Dump feature. ๐ธ
dump-svg()
Invokes the SVG Screen Dump feature. ๐
exec-formatted(format, sourcename [, ...])
Executes an external command, using the current selection for part of the command's parameters. The first parameter, format, gives the basic command. The parameters that follow specify the selection source, same as in insert-selection. ๐ซถ
The format parameter lets you drop in these substitutions:
%%โ inserts a%.%Pโ the screen-position at the beginning of the highlighted region, as a semicolon-separated pair of integers using the values that theCUPcontrol sequence would use.%pโ the screen-position after the beginning of the highlighted region, using the same convention as โ%Pโ.%Sโ the length of the string that โ%sโ would insert.%sโ the content of the selection, unmodified.%Tโ the length of the string that โ%tโ would insert.%tโ the selection, trimmed of leading/trailing whitespace. Embedded spaces (and newlines) are copied as is.%Rโ the length of the string that โ%rโ would insert.%rโ the selection, trimmed of trailing whitespace.%Vโ the video attributes at the beginning of the highlighted region, as a semicolon-separated list of integers using the values that theSGRcontrol sequence would use.%vโ the video attributes after the end of the highlighted region, using the same convention as โ%Vโ.
Once it's built the command-string, xterm forks a subprocess and runs the command, which completes independently of xterm. ๐
So like, for example, this translation would spin up a new xterm process to view a file whose name is selected while you're holding the shift key down. The new process kicks off when the mouse button is released:
*VT100*translations: #override Shift \
<Btn1Up>:exec-formatted("xterm -e view '%t'", SELECT)
exec-selectable(format, onClicks)
Executes an external command, using data copied from the screen for part of the command's parameters. The first parameter, format, gives the basic command just like in exec-formatted. The second parameter specifies the method for copying the data, just like in the on2Clicks resource. ๐ซ
fullscreen(on/off/toggle)
This action sets, unsets or toggles the fullscreen resource. ๐ฅ๏ธ
hard-reset()
This action resets the scrolling region, tabs, window size, and cursor keys and clears the screen. It's also invoked from the hardreset entry in vtMenu. โ ๏ธ (yes it nukes a lot, that's the whole vibe)
iconify()
Iconifies the window. ๐ซฅ
ignore()
This action ignores the event but checks for special pointer position escape sequences. ๐
insert()
This action inserts the character or string associated with the key that was pressed. โจ๏ธ
insert-eight-bit()
This action inserts an eight-bit (Meta) version of the character or string associated with the key that was pressed. Only single-byte values are treated specially. The exact action depends on the value of the altSendsEscape and the metaSendsEscape and the eightBitInput resources. The metaSendsEscape resource is tested first. See the eightBitInput resource for a full discussion. ๐
The term โeight-bitโ is misleading: xterm checks if the key is in the range 128 to 255 (the eighth bit is set). If the value is in that range, depending on the resource values, xterm may then do one of the following:
- add 128 to the value, setting its eighth bit,
- send an
ESCbyte before the key, or - send the key unaltered.
insert-formatted(format, sourcename [, ...])
Insert the current selection, or data related to it, formatted. The first parameter, format, gives the template for the data just like in exec-formatted. The parameters that follow specify the selection source, same as in insert-selection. โจ
insert-selectable(format, onClicks)
Insert data copied from the screen, formatted. The first parameter, format, gives the template for the data just like in exec-formatted. The second parameter specifies the method for copying the data, just like in the on2Clicks resource. ๐
insert-selection(sourcename [, ...])
This action inserts the string found in the selection or cutbuffer indicated by sourcename. 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()
This action is a synonym for insert(). The term โseven-bitโ is misleading: it only implies that xterm does not try to add 128 to the key's value as in insert-eight-bit(). ๐
interpret(control-sequence)
Interpret the given control sequence locally, i.e., without passing it to the host. This works by inserting the control sequence at the front of the input buffer. Use โ\โ to escape octal digits in the string. Xt does not allow you to put a null character (i.e., โ\000โ) in the string. โ ๏ธ
keymap(name)
This action dynamically defines a new translation table whose resource name is name with the suffix โKeymapโ (i.e., nameKeymap, where case is significant). The name None restores the original translation table. ๐
larger-vt-font()
Set the font to the next larger one, based on the font dimensions. See also set-vt-font(). ๐
load-vt-fonts(name[,class])
Load fontnames from the given subresource name and class. That is, load the โ*VT100.name.fontโ resource as โ*VT100.fontโ etc. If no name is given, the original set of fontnames is restored. ๐
Unlike set-vt-font(), this does not affect the escape- and select-fonts, since those are not based on resource values. It does affect the fonts loosely organized under the โDefaultโ menu entry, including font, boldFont, wideFont and wideBoldFont. ๐
maximize()
Resizes the window to fill the screen. ๐ฅ๏ธโจ
meta-sends-escape()
This action toggles the state of the metaSendsEscape resource. ๐
pointer-button()
Use this action as a fall-back to handle button press- and release-events for the mouse control sequence protocol when the selection-related translations are suppressed with the omitTranslation resource. ๐ฑ๏ธ
pointer-motion()
Use this action as a fall-back to handle motion-events for the mouse control sequence protocol when the selection-related translations are suppressed with the omitTranslation resource. ๐ฑ๏ธ๐ซ
popup-menu(menuname)
This action displays the specified popup menu. Valid names (case is significant) include: mainMenu, vtMenu, fontMenu, and tekMenu. ๐๐
print(printer-flags)
This action prints the window. It's also invoked by the print entry in mainMenu. ๐จ๏ธ
The action accepts optional parameters, which temporarily override resource settings. The parameter values are matched ignoring case:
noFormFeedโ no form feed will be sent at the end of the last line printed (i.e.,printerFormFeedis โfalseโ).FormFeedโ a form feed will be sent at the end of the last line printed (i.e.,printerFormFeedis โtrueโ).noNewLineโ no newline will be sent at the end of the last line printed, and wrapped lines will be combined into long lines (i.e.,printerNewLineis โfalseโ).NewLineโ a newline will be sent at the end of the last line printed, and each line will be limited (by adding a newline) to the screen width (i.e.,printerNewLineis โtrueโ).noAttrsโ the page is printed without attributes (i.e.,printAttributesis โ0โ).monoAttrsโ the page is printed with monochrome (vt220) attributes (i.e.,printAttributesis โ1โ).colorAttrsโ the page is printed with ANSI color attributes (i.e.,printAttributesis โ2โ).
print-everything(printer-flags)
This action sends the entire text history, in addition to the text currently visible, to the program given in the printerCommand resource. It allows the same optional parameters as the print action. With a suitable printer command, the action can be used to load the text history in an editor. ๐๐จ๏ธ
print-immediate()โ yeets the text of the current window straight into a file, and which file / how is all decided by theprintFileImmediate,printModeImmediateandprintOptsImmediateresources โจprint-on-error()โ toggles a lil flag that tells xterm: if you exit with an X error, dump the text of the current window directly into a file, per theprintFileOnXError,printModeOnXErrorandprintOptsOnXErrorresources ๐พprint-redir()โ flipsprinterControlModebetween0and2. the matching popup menu entry is genuinely a lifesaver for switching the printer off when you realize, mid-regret, that you decided to print random binary files on the terminal ๐ญ iconic damage controlquit()โ sends aSIGHUPto the subprogram and exits. also gets called by thequitentry inmainMenu๐readline-button()โ supports the optional readline feature by echoing repeated cursor forward or backward control sequences on button release event, so the host application updates its idea of where the cursor is to match the button event. bestie behavior fr ๐ซถredraw()โ redraws the window. also invoked by theredrawentry inmainMenu๐จrestore()โ puts the window back to the size it had before it was last maximized ๐ชscroll-back(count [,units [,mouse] ])โ scrolls the text window backward so text that had already scrolled off the top of the screen is visible again โฌ๏ธcountsays how many units to scroll, and units can bepage,halfpage,pixel, orline. if you don't pass a count, xterm uses the number of lines from thescrollLinesresource.- for the
pageorhalfpageunits you can tack on an adjustment: a+or-sign followed by a number โ e.g.page-2means 2 lines less than a full page. - if the second parameter is omitted,
linesis used. - if the third parameter
mouseis given, the action is ignored while mouse reporting is enabled.
scroll-forw(count [,units [,mouse] ])โ same energy asscroll-backexcept it scrolls the other way โฌ๏ธscroll-lock(on/off/toggle)โ sets, unsets or toggles the internal state that tells xterm whether Scroll Lock is active โ and it's subject to theallowScrollLockresource ๐scroll-to(count)โ scroll to the given line relative to the beginning of the saved-lines. like,scroll-to(0)would scroll to the beginning. two special nonnumeric parameters are recognized:scroll-to(begin)โ scroll to the beginning of the saved lines.scroll-to(end)โ scroll to the end of the saved lines, i.e. to the currently active page.
secure()โ toggles Secure Keyboard mode (go read the SECURITY section ๐), and it's invoked from thesecurekbdentry inmainMenu๐ก๏ธselect-cursor-end(destname [, ...])โ basicallyselect-end, except you're supposed to pair it withselect-cursor-start.select-cursor-extend()โ basicallyselect-extend, except you're supposed to pair it withselect-cursor-start.select-cursor-start()โ basicallyselect-start, except the selection kicks off at the current text cursor position instead of the pointer.select-end(destname [, ...])โ drops the currently selected text into every single selection or cutbuffer named bydestname. it also sends a mouse position and updates the internal selection state to reflect that the selection process is done โselect-extend()โ tracks the pointer and extends the selection. only bind this to Motion events, no cap ๐ซselect-set()โ stashes the text that corresponds to the current selection, without touching the selection mode.select-start()โ begins text selection at wherever the pointer currently is. peep the POINTER USAGE section for how to actually make selections ๐- if xterm is built to support block-selection, this action takes a parameter
blockwhich starts a block-selection instead of the default character-oriented selection.
- if xterm is built to support block-selection, this action takes a parameter
send-signal(signame)โ sends the signal named bysignameto the xterm subprocess (that's the shell or program you gave with the-ecommand line option). also invoked by thesuspend,continue,interrupt,hangup,terminate, andkillentries inmainMenu. allowable signal names are (case is not significant):tstp(if supported by the operating system),suspend(same aststp),cont(if supported by the operating system),int,hup,term,quit,alrm,alarm(same asalrm) andkill๐set-8-bit-control(on/off/toggle)โ sets, unsets or toggles theeightBitControlresource. also invoked from the8-bit-controlentry invtMenu.set-allow132(on/off/toggle)โ sets, unsets or toggles thec132resource. also invoked from theallow132entry invtMenu.set-altscreen(on/off/toggle)โ sets, unsets or toggles between the alternate and current screens ๐set-appcursor(on/off/toggle)โ sets, unsets or toggles the handling of Application Cursor Key mode, and is also invoked by theappcursorentry invtMenu.set-appkeypad(on/off/toggle)โ sets, unsets or toggles the handling of Application Keypad mode, and is also invoked by theappkeypadentry invtMenu.set-autolinefeed(on/off/toggle)โ sets, unsets or toggles automatic insertion of line feeds. also invoked by theautolinefeedentry invtMenu.set-autowrap(on/off/toggle)โ sets, unsets or toggles automatic wrapping of long lines. also invoked by theautowrapentry invtMenu๐set-backarrow(on/off/toggle)โ sets, unsets or toggles thebackarrowKeyresource. also invoked from thebackarrow keyentry invtMenu.set-bellIsUrgent(on/off/toggle)โ sets, unsets or toggles thebellIsUrgentresource. also invoked by thebellIsUrgententry invtMenu๐set-cursesemul(on/off/toggle)โ sets, unsets or toggles thecursesresource. also invoked from thecursesemulentry invtMenu.set-cursorblink(on/off/toggle)โ sets, unsets or toggles thecursorBlinkresource. also invoked from thecursorblinkentry invtMenuโจset-font-doublesize(on/off/toggle)โ sets, unsets or toggles thefontDoublesizeresource. also invoked by thefont-doublesizeentry infontMenu.set-font-linedrawing(on/off/toggle)โ sets, unsets or toggles xterm's state about whether the current font has line-drawing characters and whether it should draw them directly. also invoked by thefont-linedrawingentry infontMenu๐set-font-packed(on/off/toggle)โ sets, unsets or toggles theforcePackedFontresource, which controls use of the font's minimum or maximum glyph width. also invoked by thefont-packedentry infontMenu.set-hp-function-keys(on/off/toggle)โ sets, unsets or toggles thehpFunctionKeysresource. also invoked by thehpFunctionKeysentry inmainMenu.set-jumpscroll(on/off/toggle)โ sets, unsets or toggles thejumpscrollresource. also invoked by thejumpscrollentry invtMenu.set-keep-clipboard(on/off/toggle)โ sets, unsets or toggles thekeepClipboardresource.set-keep-selection(on/off/toggle)โ sets, unsets or toggles thekeepSelectionresource. also invoked by thekeepSelectionentry invtMenu๐set-logging(on/off/toggle)โ sets, unsets or toggles the state of the logging option.set-marginbell(on/off/toggle)โ sets, unsets or toggles themarginBellresource.set-num-lock(on/off/toggle)โ toggles the state of thenumLockresource.set-old-function-keys(on/off/toggle)โ sets, unsets or toggles the state of legacy function keys. also invoked by theoldFunctionKeysentry inmainMenu.set-pop-on-bell(on/off/toggle)โ sets, unsets or toggles thepopOnBellresource. also invoked by thepoponbellentry invtMenu๐ซขset-private-colors(on/off/toggle)โ sets, unsets or toggles theprivateColorRegistersresource.set-render-font(on/off/toggle)โ sets, unsets or toggles therenderFontresource. also invoked by therender-fontentry infontMenu.set-reverse-video(on/off/toggle)โ sets, unsets or toggles thereverseVideoresource. also invoked by thereversevideoentry invtMenu๐คset-reversewrap(on/off/toggle)โ sets, unsets or toggles thereverseWrapresource. also invoked by thereversewrapentry invtMenu.set-sco-function-keys(on/off/toggle)โ sets, unsets or toggles thescoFunctionKeysresource. also invoked by thescoFunctionKeysentry inmainMenu.set-scroll-on-key(on/off/toggle)โ sets, unsets or toggles thescrollKeyresource. also invoked from thescrollkeyentry invtMenu.set-scroll-on-tty-output(on/off/toggle)โ sets, unsets or toggles thescrollTtyOutputresource. also invoked from thescrollttyoutputentry invtMenu.set-scrollbar(on/off/toggle)โ sets, unsets or toggles thescrollbarresource. also invoked by thescrollbarentry invtMenu๐set-select(on/off/toggle)โ sets, unsets or toggles theselectToClipboardresource. also invoked by theselectToClipboardentry invtMenuโ
set-sixel-scrolling(on/off/toggle)
okay so this one flips between inline mode (that's sixel scrolling, bestie โจ) and absolute positioning ๐
and you can ALSO control it with DEC private mode 80 (DECSDM) or from the sixelScrolling entry in the btMenu. three ways, zero excuses.
set-sun-function-keys(on/off/toggle)
sets, unsets or toggles the sunFunctionKeys resource. it's also invoked by the sunFunctionKeys entry in mainMenu. ๐
set-sun-keyboard(on/off/toggle)
sets, unsets or toggles the sunKeyboard resource. also invoked by the sunKeyboard entry in mainMenu.
set-tek-text(large/2/3/small)
sets the font used in the Tektronix window to the value of the selected resource, according to the argument. the argument can be either a keyword or a single-letter alias, as shown in the parentheses below ๐
large(l) โ use resourcefontLarge, same as menu entrytektextlarge.two(2) โ use resourcefont2, same as menu entrytektext2.three(3) โ use resourcefont3, same as menu entrytektext3.small(s) โ use resourcefontSmall, same as menu entrytektextsmall.
set-terminal-type(type)
this directs output to either the vt or tek windows, according to the type string. it's also invoked by the tekmode entry in vtMenu and the vtmode entry in tekMenu. ๐
set-titeInhibit(on/off/toggle)
sets, unsets or toggles the titeInhibit resource, which controls switching between the alternate and current screens. (yes, that capitalization is literally how it's spelled, no i'm not fixing it ๐ซถ)
set-toolbar(on/off/toggle)
sets, unsets or toggles the toolbar feature. also invoked by the toolbar entry in mainMenu.
set-utf8-fonts(on/off/toggle)
sets, unsets or toggles the utf8Fonts resource. also invoked by the utf8-fonts entry in fontMenu. โจ
set-utf8-mode(on/off/toggle)
sets, unsets or toggles the utf8 resource. also invoked by the utf8-mode entry in fontMenu.
set-utf8-title(on/off/toggle)
sets, unsets or toggles the utf8Title resource. also invoked by the utf8-title entry in fontMenu.
set-visibility(vt/tek,on/off/toggle)
sets, unsets or toggles whether or not the vt or tek windows are visible. it's also invoked from the tekshow and vthide entries in vtMenu, and the vtshow and tekhide entries in tekMenu. ๐
set-visual-bell(on/off/toggle)
sets, unsets or toggles the visualBell resource. also invoked by the visualbell entry in vtMenu.
set-vt-font(d/1/2/3/4/5/6/7/e/s [,normalfont [, boldfont]])
this sets the font, or fonts, currently being used in the VTxxx window. the first argument is a single character that specifies which font to use:
dorDโ the default font (the font initially used when xterm was started)1through7โ the fonts specified by thefont1throughfont7resourceseorEโ the normal and bold fonts that have been set through escape codes (or specified as the second and third action arguments, respectively)sorSโ the font selection (as made by programs such asxfontsel(1)) indicated by the second action argument
if xterm is configured to support wide characters, an additional two optional parameters are recognized for the e argument: wide font and wide bold font. ๐
smaller-vt-font()
set the font to the next smaller one, based on the font dimensions. see also set-vt-font().
soft-reset()
this resets the scrolling region. it's also invoked from the softreset entry in vtMenu. the effect is identical to a soft reset (DECSTR) control sequence. ๐ง
spawn-new-terminal(params)
spawn a whole new xterm process, periodt. this is available on systems which have a modern version of the process filesystem, e.g., โ/procโ, which xterm can read.
- use the โcwdโ process entry, e.g.,
/proc/12345/cwdto obtain the working directory of the process which is running in the current xterm. - on systems which have the โexeโ process entry, e.g.,
/proc/12345/exe, use this to obtain the actual executable. otherwise, use the$PATHvariable to find xterm. - if parameters are given in the action, pass them to the new xterm process.
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)
this inserts the specified text string as if it had been typed. quotation is necessary if the string contains whitespace or non-alphanumeric characters. if the string argument begins with the characters โ0xโ, it is interpreted as a hex character constant. โญ
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. also invoked from the tekcopy entry in tekMenu.
tek-page()
clears the Tektronix window. also invoked by the tekpage entry in tekMenu.
tek-reset()
resets the Tektronix window. also invoked by the tekreset entry in tekMenu.
vi-button()
handles a button event (other than press and release) by echoing a control sequence computed from the event's line number in the screen relative to the current line:
ESC ^P
or
ESC ^N
according to whether the event is before, or after the current line, respectively. the ^N (or ^P) is repeated once for each line that the event differs from the current line. and the control sequence is omitted altogether if the button event is on the current line. ๐
visual-bell()
this action flashes the window quickly. blink and you'll miss it fr fr.
the Tektronix window also has the following action:
gin-press(l/L/m/M/r/R)
this action sends the indicated graphics input code. ๐ฑ๏ธ
โจ Default Key Bindings โจ
the default bindings in the VTxxx window use the SELECT token, which is set by the selectToClipboard resource. these ones are for the vt100 widget, bestie:
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(SELECT, CUT_BUFFER0) \n\
Shift <KeyPress> Insert:insert-selection(SELECT, CUT_BUFFER0) \n\
Alt <Key>Return:fullscreen() \n\
<KeyRelease> Scroll_Lock:scroll-lock() \n\
Shift~Ctrl <KeyPress> KP_Add:larger-vt-font() \n\
Shift Ctrl <KeyPress> KP_Add:smaller-vt-font() \n\
Shift <KeyPress> KP_Subtract:smaller-vt-font() \n\
~Meta <KeyPress>:insert-seven-bit() \n\
Meta <KeyPress>:insert-eight-bit() \n\
!Ctrl <Btn1Down>:popup-menu(mainMenu) \n\
!Lock Ctrl <Btn1Down>:popup-menu(mainMenu) \n\
!Lock Ctrl @Num_Lock <Btn1Down>:popup-menu(mainMenu) \n\
! @Num_Lock Ctrl <Btn1Down>:popup-menu(mainMenu) \n\
Meta <Btn1Down>:select-start(block) \n\
~Meta <Btn1Down>:select-start() \n\
~Meta <Btn1Motion>:select-extend() \n\
!Ctrl <Btn2Down>:popup-menu(vtMenu) \n\
!Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \n\
!Lock Ctrl @Num_Lock <Btn2Down>:popup-menu(vtMenu) \n\
! @Num_Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \n\
~Ctrl ~Meta <Btn2Down>:ignore() \n\
Meta <Btn2Down>:clear-saved-lines() \n\
~Ctrl ~Meta <Btn2Up>:insert-selection(SELECT, CUT_BUFFER0) \n\
!Ctrl <Btn3Down>:popup-menu(fontMenu) \n\
!Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \n\
!Lock Ctrl @Num_Lock <Btn3Down>:popup-menu(fontMenu) \n\
! @Num_Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \n\
~Ctrl ~Meta <Btn3Down>:start-extend() \n\
~Meta <Btn3Motion>:select-extend() \n\
Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \n\
Lock Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \n\
Lock @Num_Lock Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \n\
@Num_Lock Ctrl <Btn4Down>:scroll-back(1,halfpage,m) \n\
<Btn4Down>:scroll-back(5,line,m) \n\
Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \n\
Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \n\
Lock @Num_Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \n\
@Num_Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage,m) \n\
<Btn5Down>:scroll-forw(5,line,m) \n\
<BtnUp>:select-end(SELECT, CUT_BUFFER0) \n\
<BtnMotion>:pointer-motion() \n\
<BtnDown>:pointer-button() \n\
<BtnUp>:pointer-button() \n\
<BtnDown>:ignore()
the default bindings in the Tektronix window are analogous but less extensive, kinda the introvert sibling of the two ngl. these ones are for the tek4014 widget:
โฆand then the rest of that default translation block just keeps going, bestie, look:
~Meta<KeyPress>: insert-seven-bit() \n\
Meta<KeyPress>: insert-eight-bit() \n\
!Ctrl <Btn1Down>: popup-menu(mainMenu) \n\
!Lock Ctrl <Btn1Down>: popup-menu(mainMenu) \n\
!Lock Ctrl @Num_Lock <Btn1Down>: popup-menu(mainMenu) \n\
!Ctrl @Num_Lock <Btn1Down>: popup-menu(mainMenu) \n\
!Ctrl <Btn2Down>: popup-menu(tekMenu) \n\
!Lock Ctrl <Btn2Down>: popup-menu(tekMenu) \n\
!Lock Ctrl @Num_Lock <Btn2Down>: popup-menu(tekMenu) \n\
!Ctrl @Num_Lock <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)
โจ Custom Key Bindings โจ
Okay so the tea: you can totally make the translations resource your own โ either by overriding bits of it, or by merging your resources with it. Either way works, pick your fighter ๐
Here's a lil example that uses shifted select/paste to copy to the clipboard, and unshifted select/paste for the primary selection. And in each case, a (different) cut buffer is also a target or source of the select/paste operation. Big important thing to remember tho: cut buffers store data in ISO-8859-1 encoding, while selections can store data in a whole variety of formats and encodings. While xterm owns the selection, it highlights it. When it loses the selection, it removes the corresponding highlight. But bestie โ you can still paste from the corresponding cut buffer. ๐ซถ
*VT100*translations: #override \n\
~Shift~Ctrl<Btn2Up>: insert-selection(PRIMARY, CUT_BUFFER0) \n\
Shift~Ctrl<Btn2Up>: insert-selection(CLIPBOARD, CUT_BUFFER1) \n\
~Shift <BtnUp> : select-end(PRIMARY, CUT_BUFFER0) \n\
Shift <BtnUp> : select-end(CLIPBOARD, CUT_BUFFER1)
So in that example, the class name VT100 is used rather than the widget name. These are different, okay? A class name could apply to more than one widget. And there's a leading * because the widget hierarchy above the vt100 widget depends on whether the toolbar support is compiled into xterm. iykyk ๐
Most of the predefined translations are about the mouse, with a few that use some of the special keys on the keyboard. Applications use special keys (function-keys, cursor-keys, keypad-keys) with modifiers (shift, control, alt). And here's the catch: if xterm defines a translation for a given combo of special key + modifier, that makes it unavailable for use by applications within the terminal. Not me breaking someone's workflow ๐ญ
For instance, one might extend the use of Page Up and Page Down keys seen here:
Shift <KeyPress> Prior : scroll-back(1,halfpage) \n\
Shift <KeyPress> Next : scroll-forw(1,halfpage) \n\
โฆto the Home and End keys:
Shift <KeyPress> Home : scroll-to(begin) \n\
Shift <KeyPress> End : scroll-to(end)
But then shift-Home and shift-End would then be unavailable to applications. Trade-offs, bestie, trade-offs. โญ
Not everyone finds the three-button mouse bindings easy to use. In a wheel mouse, the middle button might be the wheel. As an alternative, you could add a binding using shifted keys:
*VT100*translations: #override \n\
Shift <Key>Home: copy-selection(SELECT) \n\
Shift <Key>Insert: copy-selection(SELECT) \n\
Ctrl Shift <Key>C: copy-selection(SELECT) \n\
Ctrl Shift <Key>V: insert-selection(SELECT)
You would still use the left- and right-mouse buttons (typically 1 and 3) for beginning and extending selections. ๐
And besides mouse problems, there are also keyboards with inconvenient layouts. Some lack a numeric keypad, which makes it hard to use the shifted keypad plus and minus bindings for switching between font sizes. Workaround? Just assign the actions to keys you can actually reach:
*VT100*translations: #override \n\
Ctrl <Key> +: larger-vt-font() \n\
Ctrl <Key> -: smaller-vt-font()
Now โ the keymap feature lets you switch between sets of translations. The sample below shows how the keymap() action may be used to add special keys for entering commonly-typed words:
*VT100.Translations: #override <Key>F13: keymap(dbx)
*VT100.dbxKeymap.translations: \
<Key>F14: keymap(None) \n\
<Key>F17: string("next") \n\
string(0x0d) \n\
<Key>F18: string("step") \n\
string(0x0d) \n\
<Key>F19: string("continue") \n\
string(0x0d) \n\
<Key>F20: string("print ") \n\
insert-selection(PRIMARY, CUT_BUFFER0)
๐ฆ Default Scrollbar Bindings ๐ฆ
Key bindings are normally associated with the vt100 or tek4014 widgets, which act as terminal emulators. Xterm's scrollbar (and toolbar if it is configured) are separate widgets. And because all of these use the X Toolkit, they have corresponding translations resources. Those resources are distinct, and they match different patterns โ e.g., the differences in widget-name and number of levels of widgets which they may contain. ๐
The scrollbar widget is a child of the vt100 widget. It's positioned on top of the vt100 widget. And toggling the scrollbar on and off causes the vt100 widget to resize. That's just how it is. โจ
The default bindings for the scrollbar widget use only mouse-button events:
<Btn5Down>: StartScroll(Forward) \n\
<Btn1Down>: StartScroll(Forward) \n\
<Btn2Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \n\
<Btn3Down>: StartScroll(Backward) \n\
<Btn4Down>: StartScroll(Backward) \n\
<Btn2Motion>: MoveThumb() NotifyThumb() \n\
<BtnUp>: NotifyScroll(Proportional) EndScroll()
Events which the scrollbar widget does not recognize at all are lost. Gone. Poof. ๐
However, at startup, xterm augments these translations with the default translations used for the vt100 widget, together with the resource "actions" which those translations use. Because the scrollbar (or menubar) widgets do not recognize these actions (but because it has a corresponding translation), they are passed on to the vt100 widget. Iconic behavior honestly ๐
This augmenting of the scrollbar's translations has a few limitations, and we're gonna list them because transparency is the vibe:
- Xterm knows what the default translations are, but there is no suitable library interface for determining what customizations a user may have added to the
vt100widget. All that xterm can do is augment the scrollbar widget to give it the same starting point for further customization by the user. - Events in the gap between the widgets may be lost.
- Compose sequences begun in one widget cannot be completed in the other, because the input methods for each widget do not share context information.
Most customizations of the scrollbar translations do not concern key bindings. Rather, users are generally more interested in changing the bindings of the mouse buttons. For example, some people prefer using the left pointer button for dragging the scrollbar thumb. That can be set up by altering the translations resource, e.g.,
*VT100.scrollbar.translations: #override \n\
<Btn5Down>: StartScroll(Forward) \n\
<Btn1Down>: StartScroll(Continuous) MoveThumb() NotifyThumb() \n\
<Btn4Down>: StartScroll(Backward) \n\
<Btn1Motion>: MoveThumb() NotifyThumb() \n\
<BtnUp>: NotifyScroll(Proportional) EndScroll()
โจ CONTROL SEQUENCES AND KEYBOARD โจ
okay bestie, this is the part where apps get to talk back to your terminal ๐ฌ like, an application can yeet a whole string of characters at the terminal and change how it behaves. people call these "ANSI escape sequences" or just "escape sequences" but ngl both names are kinda misleading, so let's unpack:
- ANSI x3.64 (which is obsolete, rip) got replaced by ISO 6429 (ECMA-48), and that is what laid down the rules for how these character sequences are formatted.
- the OG VT100 claimed to be ANSI-compatible (against x3.64), but there's no freely available version of the ANSI standard to show where the VT100 actually differs. most docs that mention the ANSI standard have extra stuff that wasn't in the original (like anything based on
ansi.sys). so this whole discussion is gonna focus on the ISO standards instead. - the standard only describes sequences going from the host to the terminal. there's literally no standard for sequences that special keys send from the terminal back to the host. by convention (and by looking at existing terminals), those sequences usually conform to the host-to-terminal standard anyway.
- some of xterm's sequences just don't fit the standard scheme at all. technically those are "unspecified". example: DEC Screen Alignment Test (DECALN) is this three-character sequence:
ESC # 8
- some sequences do fit the standard format but aren't listed in the standard. these include the ones for setting up scrolling margins and doing forward/reverse scrolling.
- and some sequences (especially the single-character functions like tab and backspace) don't even include the escape character. ๐
so with all that in mind: the standard calls these character sequences "control sequences".
Xterm Control Sequences lists the control sequences an application can send to xterm to make it do various operations. most of these operations are standardized โ from either the DEC or Tektronix terminals, or from more widely used standards like ISO-6429.
a few examples of usage are given in this section. ๐
๐ช Window and Icon Titles ๐
some scripts use echo with the options -e and -n to tell the shell to interpret the string โ\eโ as the escape character, and to suppress a trailing newline on output. those are not portable, nor recommended. instead, use printf(1) (POSIX). periodt.
for example, to set the window title to โHello world!โ, you could use one of these commands in a script:
printf '\033]2;Hello world!\033\\'
printf '\033]2;Hello world!\007'
printf '\033]2;%s\033\\' "Hello world!"
printf '\033]2;%s\007' "Hello world!"
the printf(1) command interprets the octal value โ\033โ for escape, and (since it wasn't given in the format) omits a trailing newline from the output. slay.
some programs (like screen(1)) set both window- and icon-titles at the same time, using a slightly different control sequence:
printf '\033]0;Hello world!\033\\'
printf '\033]0;Hello world!\007'
printf '\033]0;%s\033\\' "Hello world!"
printf '\033]0;%s\007' "Hello world!"
the difference is the parameter โ0โ in each command. most window managers will honor either window title or icon title. some will make a distinction and let you set just the icon title. you can tell xterm to ask for this with a different parameter in the control sequence:
printf '\033]1;Hello world!\033\\'
printf '\033]1;Hello world!\007'
printf '\033]1;%s\033\\' "Hello world!"
printf '\033]1;%s\007' "Hello world!"
โจ๏ธ Special Keys ๐
xterm, like any VT100-compatible terminal emulator, has two modes for the special keys (cursor-keys, numeric keypad, and certain function-keys):
- normal mode, which makes the special keys transmit "useful" sequences โ like the control sequence for cursor-up when you press the up-arrow โ and
- application mode, which uses a different control sequence that can't be mistaken for those "useful" sequences.
the main difference between the two modes? normal mode sequences start with CSI (escape [) and application mode sequences start with SS3 (escape O). that's it, that's the tea. ๐ต
the terminal gets initialized into one of these two modes (usually normal mode), based on the terminal description (termcap or terminfo). the terminal description also has capabilities (strings) defined for the keypad mode used in curses applications.
there's a whole problem with using the terminal description for applications that aren't meant to be full-screen curses applications: the definitions of special keys are only correct for this keypad mode. ๐ญ
for example, some shells (unlike ksh(1), which appears to be hard-coded and doesn't even use termcap) let their users customize key-bindings, assigning shell actions to special keys.
bash(1)allows constant strings to be assigned to functions. this is only successful if the terminal is initialized to application mode by default, because bash lacks flexibility in this area. it uses a (less expressive than bash's) readline scripting language for setting up key bindings, which relies upon the user to statically enumerate the possible bindings for given values of$TERM.zsh(1)provides an analogous feature, but it accepts runtime expressions, and it also provides a$terminfoarray for scripts. in particular, you can use the terminal database, transforming when defining a key-binding. by transforming the output so thatCSIandSS3are equated, zsh can use the terminal database to obtain useful definitions for its command-line use regardless of whether the terminal uses normal or application mode initially. here's an example:
[[ "$terminfo[kcuu1]" == "^[O"* ]] && \
bindkey -M viins "${terminfo[kcuu1]/O/[}" \
vi-up-line-or-history
๐ Changing Colors ๐ฆ
a few shell programs let users add color and other video attributes to the shell prompt strings. users can do this by setting $PS1 (the primary prompt string). again, bash and zsh have provided features not found in ksh. but there's a problem, bestie: the prompt's width on the screen will not necessarily be the same as the number of characters. because there's no guidance in the POSIX standard, each shell addresses the problem in a different way:
bashtreats characters withinโ\[โandโ\]โas nonprinting (using no width on the screen).zshtreats characters withinโ%{โandโ%}โas nonprinting.
in addition to the difference in syntax, the shells provide different methods for obtaining useful escape sequences:
- as noted in Special Keys,
zshinitializes the$terminfoarray with the terminal capabilities.
it also provides a function echoti which works like tput(1) to convert a terminal capability with its parameters into a string that can be written to the terminal.
- shells lacking a comparable feature (such as bash) can always use the program
tput(1)to do this transformation.
hard-coded escape sequences are supported by each shell, but are not recommended โ because those rely upon particular configurations and cannot be easily moved between different user environments. ๐
๐ธ ENVIRONMENT ๐ธ
okay so bestie, xterm is out here setting a bunch of environment variables for you ๐. It also removes certain ones that are known to mess with other apps โ like, it will literally delete COLUMNS, LINES, and TERMCAP in the configurations where those aren't needed. cleaning house, periodt ๐งนโจ
๐ซ System Independent
some of these show up on every system, no cap:
DISPLAYโ the display name, pointing at the X server (peep DISPLAY NAMES inX(7)).TERMโ set according to the terminfo (or termcap) entry that xterm is using as a reference.
ngl on some systems you might run into a situation where the shell you're using and xterm are built with libraries that have different terminal databases ๐ซ . When that happens, xterm may pick a terminal description that your shell has literally never heard of. awkward.
WINDOWIDโ set to the X window id number of the xterm window. very much its own little ID card ๐ชช.XTERM_FILTERโ set if a locale-filter is used. the value is the pathname of the filter.XTERM_LOCALEโ shows the locale that xterm used on startup. some shell initialization scripts might set a different locale, so this is the receipts ๐.XTERM_SHELLโ set to the pathname of the program that gets invoked. usually that's a shell program, e.g./bin/sh. but since it's not necessarily a shell program, it's a whole separate thing fromSHELL, iykyk.XTERM_VERSIONโ set to the string that the-versionoption displays. normally that's an identifier for the X Window libraries used to build xterm, followed by xterm's patch number in parenthesis. that patch number also shows up in the response to a Secondary Device Attributes (DA) control sequence (see Xterm Control Sequences).
๐ System Dependent
depending on how your system is configured, xterm might also set these ones:
COLUMNSโ the width of the xterm in characters (cf:stty columns).
when this variable is set, curses applications (and honestly most terminal programs) will assume the terminal has this many columns.
xterm would do this for systems that have no ability to tell the size of the terminal. those are very rare โ none newer than the mid 1990s when SVR4 became prevalent. so like, ancient ๐.
HOMEโ when xterm is configured (at build-time) to update utmp.LINESโ the height of the xterm in characters (cf:stty rows).
when this variable is set, curses applications (and most terminal programs) will assume the terminal has this many lines (rows).
same deal as COLUMNS: xterm would do this for systems that can't tell the size of the terminal, and those are very rare, none newer than the mid 1990s when SVR4 became prevalent.
LOGNAMEโ when xterm is configured (at build-time) to update utmp.
your configuration may have set LOGNAME; xterm does not modify that. if it's unset, xterm will use USER if that one's set. and finally, if neither is set, xterm will use the getlogin(3) function. it's giving backup plan energy ๐ซถ.
SHELLโ when xterm is configured (at build-time) to update utmp. it's also set if you provide a valid shell name as the optional parameter.
xterm sets this to an absolute pathname. if you've set the variable to a relative pathname, xterm may set it to a different shell pathname.
and if you've set this to a pathname that doesn't correspond to a valid shell, xterm may unset it, to avoid confusion. sorry babe, it's for your own good ๐ .
TERMCAPโ the contents of the termcap entry corresponding to$TERM, with lines and columns values substituted for the actual size window you've created.
this feature is, just like LINES and COLUMNS, used rarely. it addresses the same limitation of a few older systems by giving termcap-based applications a way to get the initial screen size.
TERMINFOโ may be defined to a nonstandard location using the configure script.XCURSOR_THEMEโ see thecursorThemeresource. ๐
๐ช WINDOW PROPERTIES ๐ช
in the output from xprop(1), there are several properties. let's go through them one by one bestie ๐ฆ
โจ Properties set by X Toolkit
WM_CLASSโ this shows the instance name and the X resource class, passed to X Toolkit during initialization of xterm, e.g.
WM_CLASS(STRING) = "xterm", "UXTerm"
WM_CLIENT_LEADERโ this shows the window-id that xterm provides with an environment variable (WINDOWID), e.g.
WM_CLIENT_LEADER(WINDOW): window id # 0x800023
WM_COMMANDโ this shows the command-line arguments for xterm which are passed to X Toolkit during initialization, e.g.
WM_COMMAND(STRING) = { "xterm", "-class", "UXTerm", "-title", "uxterm", "-u8" }
WM_ICON_NAMEโ this holds the icon title, which different window managers handle in various ways (chaotic of them tbh). it's set via theiconNameresource. applications can change this using control sequences.WM_LOCALE_NAMEโ this shows the result from thesetlocale(3)function for theLC_CTYPEcategory, e.g.
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_NAMEโ this holds the window title, normally at the top of xterm's window. it's set via thetitleresource. applications can change this using control sequences.
๐ Properties set by Xterm
X Toolkit does not manage EWMH properties. xterm does this directly, main character style ๐ .
_NET_WM_ICON_NAMEโ stores the icon name._NET_WM_NAMEโ stores the title string._NET_WM_PIDโ stores the process identifier for xterm's display.
๐ Properties used by Xterm
_NET_SUPPORTEDโ xterm checks this property on the supporting window to decide if the window manager supports specific maximizing styles. that may include other window manager hints; xterm uses the X library calls to manage those._NET_SUPPORTING_WM_CHECKโ xterm checks this to make sure it will only update the EWMH properties for a window manager that actually claims EWMH compliance. vibe check, basically โ._NET_WM_STATEโ this tells xterm whether its window has been maximized by the window manager, and if so, what type of maximizing:_NET_WM_STATE_FULLSCREEN_NET_WM_STATE_MAXIMIZED_HORZ_NET_WM_STATE_MAXIMIZED_VERT
๐ FILES ๐
the actual pathnames given may differ on your system, bestie โ don't come for me ๐ฅบ
/etc/shellsโ contains a list of valid shell programs, used by xterm to decide if theSHELLenvironment variable should be set for the process started by xterm.
on systems which have the getusershell function, xterm will use that function rather than directly reading the file, since the file may not even be present if the system uses default settings.
/var/run/utmpโ the system log file, which records user logins./var/log/wtmpโ the system log file, which records user logins and logouts./usr/share/X11/app-defaults/XTermโ the xterm default application resources./usr/share/X11/app-defaults/XTerm-colorโ the xterm color application resources. if your display supports color, use this
*customization: -color
in your .Xdefaults file to automatically use this resource file rather than /usr/share/X11/app-defaults/XTerm. if you don't do this, xterm uses its compiled-in default resource settings for colors. so like, do it if you want the pretty colors, babe ๐.
/usr/share/pixmapsโ the directory in which xterm's pixmap icon files are installed.
๐ ERROR MESSAGES ๐
most of the fatal error messages from xterm use the following format:
xterm: Error XXX, errno YYY: ZZZ
the XXX codes (which xterm uses as its exit-code) are listed below, with a brief explanation. buckle up, there's a lot ๐
1ERROR_MISCโ miscellaneous errors, usually accompanied by a specific message,11ERROR_FIONBIOโmain: ioctl() failed on FIONBIO12ERROR_F_GETFLโmain: ioctl() failed on F_GETFL13ERROR_F_SETFLโmain: ioctl() failed on F_SETFL14ERROR_OPDEVTTYโspawn: open() failed on /dev/tty15ERROR_TIOCGETPโspawn: ioctl() failed on TIOCGETP17ERROR_PTSNAMEโspawn: ptsname() failed18ERROR_OPPTSNAMEโspawn: open() failed on ptsname19ERROR_PTEMโspawn: ioctl() failed on I_PUSH/"ptem"20ERROR_CONSEMโspawn: ioctl() failed on I_PUSH/"consem"21ERROR_LDTERMโspawn: ioctl() failed on I_PUSH/"ldterm"22ERROR_TTCOMPATโspawn: ioctl() failed on I_PUSH/"ttcompat"23ERROR_TIOCSETPโspawn: ioctl() failed on TIOCSETP24ERROR_TIOCSETCโspawn: ioctl() failed on TIOCSETC25ERROR_TIOCSETDโspawn: ioctl() failed on TIOCSETD26ERROR_TIOCSLTCโspawn: ioctl() failed on TIOCSLTC27ERROR_TIOCLSETโspawn: ioctl() failed on TIOCLSET28ERROR_INIGROUPSโspawn: initgroups() failed29ERROR_FORKโspawn: fork() failed30ERROR_EXECโspawn: exec() failed32ERROR_PTYSโget_pty: not enough ptys34ERROR_PTY_EXECโwaiting for initial map35ERROR_SETUIDโspawn: setuid() failed36ERROR_INITโspawn: can't initialize window46ERROR_TIOCKSETโspawn: ioctl() failed on TIOCKSET47ERROR_TIOCKSETCโspawn: ioctl() failed on TIOCKSETC49ERROR_LUMALLOCโluit: command-line malloc failed50ERROR_SELECTโin_put: select() failed54ERROR_VINITโVTInit: can't initialize window57ERROR_KMMALLOC1โHandleKeymapChange: malloc failed60ERROR_TSELECTโTinput: select() failed64ERROR_TINITโTekInit: can't initialize window71ERROR_BMALLOC2โSaltTextAway: malloc() failed80ERROR_LOGEXECโStartLog: exec() failed83ERROR_XERRORโxerror: XError event84ERROR_XIOERRORโxioerror: X I/O error85ERROR_ICEERRORโICE I/O error90ERROR_SCALLOCโAlloc: calloc() failed on base91ERROR_SCALLOC2โAlloc: calloc() failed on rows102ERROR_SAVE_PTRโScrnPointers: malloc/realloc() failed
๐ BUGS ๐ (the tea, bestie)
Okay so big pastes do not work on some systems. And I need you to know: this is not a bug in xterm. Not our girl's fault, periodt. It's a bug in the pseudo terminal driver of those systems. Here's the lore: xterm feeds large pastes to the pty only as fast as the pty will accept data, but some pty drivers do not return enough information to know if the write has succeeded. So it's giving "not my problem" but also "we literally cannot tell" ๐ญ.
- When connected to an input method, it is possible for
xtermto hang if the XIM server is suspended or killed. Lowkey haunted behaviour ngl ๐. - Many of the options are not resettable after
xtermstarts. So choose wisely, bestie ๐ . - This program still needs to be rewritten. It should be split into very modular sections, with the various emulators being completely separate widgets that do not know about each other. Ideally, you'd like to be able to pick and choose emulator widgets and stick them into a single control widget. Yes, it's giving "group project where nobody talks to each other" โจ.
- There needs to be a dialog box to allow entry of the Tek COPY file name. Not me filing that under "someday" ๐.
๐ AUTHORS ๐
Far too many people. That's the whole vibe, honestly.
These contributed to the X Consortium: Loretta Guarino Reid (DEC-UEG-WSL), Joel McCormack (DEC-UEG-WSL), Terry Weissman (DEC-UEG-WSL), Edward Moy (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 (HP), Jonathan Kamens (MIT-Athena). Iconic lineup fr fr ๐ซถ.
Beginning with XFree86, there were far more identifiable contributors. The THANKS file in xterm's source lists 243 in June 2022. Keep in mind these: Jason Bacon, Jens Schweikhardt, Ross Combs, Stephen P. Wall, David Wexelblat, and Thomas Dickey (invisible-island.net). Absolute legends, no cap ๐.
๐ฆ SEE ALSO ๐ฆ
resize(1), luit(1), uxterm(1), X(7), Xcursor(7), pty(4), tty(4)
Xterm Control Sequences (this is the file ctlseqs.ms).
https://invisible-island.net/xterm/xterm.html
https://invisible-island.net/xterm/manpage/xterm.html
https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
https://invisible-island.net/xterm/xterm.faq.html
https://invisible-island.net/xterm/xterm.log.html
X Toolkit Intrinsics โ C Language Interface (Xt), Joel McCormack, Paul Asente, Ralph R. Swick (1994), Thomas E. Dickey (2019).
Inter-Client Communication Conventions Manual (ICCCM), David Rosenthal and Stuart W. Marks (version 2.0, 1994).
Extended Window Manager Hints (EWMH), X Desktop Group (version 1.5, 2011).
EWMH uses UTF8_STRING pervasively without defining it, but does mention the ICCCM. Version 2.0 of the ICCCM does not address UTF-8. That is an extension added in XFree86. The way this is just left dangling in the docs... ๐
- Markus Kuhn summarized this in UTF-8 and Unicode FAQ for Unix/Linux (2001), in the section โIs X11 ready for Unicode?โ
https://www.cl.cam.ac.uk/~mgk25/unicode.html
- Juliusz Chroboczek proposed the
UTF8_STRINGselection atom in 1999/2000, which became part of the ICCCM in XFree86.
https://www.irif.fr/~jch/software/UTF8_STRING/
An Xorg developer removed that part of the documentation in 2004 when incorporating other work from XFree86 into Xorg. The feature is still supported in Xorg, though undocumented as of 2019. (iykyk ๐ง)
And that's the whole page, bestie!! ๐ธ You just read the manual page XTERM(1), Patch #411, dated 2026-08-24 โ that's the version and date, right there at the bottom like a little signature ๐. Go forth and slay your terminal ๐โจ๐.
๐ฆ where this page comes from
- fedora 43: xterm 411-1.fc43 ยท MIT AND X11 AND HPND AND CC-BY-4.0
- fedora 44: xterm 411-1.fc44 ยท MIT AND X11 AND HPND AND CC-BY-4.0
- Copyright 1996-2025,2026 by Thomas E. Dickey
- Copyright 1989 X Consortium
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms