xterm [-toolkitoption ...] [-option ...] [shell]
The xterm program is a terminal emulator for the X Window System. It provides DEC VT102/VT220 and selected features from higher-level terminals such as VT320/VT420/VT520 (VTxxx). It also provides Tektronix 4014 emulation for programs that cannot use the window system directly. If the underlying operating system supports terminal resizing capabilities (for example, the SIGWINCH signal in systems derived from 4.3bsd), xterm will use the facilities to notify programs running in the window whenever it is resized.
The VTxxx and Tektronix 4014 terminals each have their own window so that you can edit text in one and look at graphics in the other at the same time. To maintain the correct aspect ratio (height/width), Tektronix graphics will be restricted to the largest box with a 4014's aspect ratio that will fit in the window. This box is located in the upper left area of the window.
Although both windows may be displayed at the same time, one of them is considered the “active” window for receiving keyboard input and terminal output. This is the window that contains the text cursor. 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.
The VT102 emulation is fairly complete, but does not support autorepeat. Double-size characters are displayed properly if your font server supports scalable fonts. The VT220 emulation does not support soft fonts, it is otherwise complete. Termcap(5) entries that work with xterm include an optional platform-specific entry (“xterm”), “xterm”, “vt102”, “vt100”, “ansi” and “dumb”. xterm automatically searches the termcap file in this order for these entries and then sets the “TERM” and the “TERMCAP” environment variables. You may also use “vt220”, but must set the terminal emulation level with the decTerminalID resource. (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 VT102 escape sequences. (See the Xterm Control Sequences document.)
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 Tektronix 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.
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.
In VT102 mode, there are escape sequences to activate and deactivate an alternate screen buffer, which is the same size as the display area of the window. When activated, the current screen is saved and replaced with the alternate screen. Saving of lines scrolled off the top of the window is disabled until the normal screen is restored. The termcap(5) entry 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.
In either VT102 or Tektronix mode, there are escape sequences to change the name of the windows. Additionally, in VT102 mode, xterm implements the window-manipulation control sequences from dtterm, such as resizing the window, 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.
The xterm terminal emulator accepts the standard X Toolkit command line options as well as many application-specific options. If the option begins with a `+' instead of a `-', the option is restored to its default value. 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.
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.
One parameter (after all options) may be given. That overrides xterm's built-in choice of shell program. Normally xterm checks the SHELL variable. If that is not set, xterm tries to use the shell program specified in the password file. If that is not set, xterm uses /bin/sh. If the parameter is not a relative path, i.e., beginning with “./” or “../”, xterm looks for the file in the user's PATH. In either case, it constructs an absolute path. The -e option cannot be used with this parameter since it uses all parameters following the option.
The other options are used to control the appearance and behavior. Not all options are necessarily configured into your copy of xterm:
XtermLog.XXXXXX
or
Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX
depending on how xterm was built.
xterm -e /bin/bash -l -c "my command here"
-S/dev/pts/123/45 -S123/45 -Sab34
The following command line arguments are provided for compatibility with older versions. They may not be supported in the next release as the X Toolkit provides standard options that accomplish the same task.
The following standard X Toolkit command line arguments are commonly used with xterm:
The program understands all of the core X Toolkit resource names and classes. Application specific resources (e.g., “XTerm.NAME”) follow:
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”.
| boldMode | alwaysBoldMode | Comparison | Action |
| false | false | ignored | use font |
| false | true | ignored | use font |
| true | false | same | overstrike |
| true | false | different | use font |
| true | true | ignored | overstrike |
This resource is used only for bitmap fonts:
FontPath "/usr/lib/X11/fonts/misc/"
FontPath "/usr/lib/X11/fonts/misc/:unscaled"
#!/bin/sh FONT=`xfontsel -print` test -n "$FONT" && xfd -fn "$FONT"
fc-list :scalable=true:spacing=mono: family
*font: fixed
xterm.vt100.font
xterm.vt100.utf8Fonts.font
| HCM | HR | HBG | HFG | Highlight |
| false | false | default | default | bg/fg |
| false | false | default | set | bg/fg |
| false | false | set | default | fg/HBG |
| false | false | set | set | fg/HBG |
| false | true | default | default | bg/fg |
| false | true | default | set | bg/fg |
| false | true | set | default | fg/HBG |
| false | true | set | set | fg/HBG |
| true | false | default | default | bg/fg |
| true | false | default | set | HFG/fg |
| true | false | set | default | bg/HBG |
| true | false | set | set | HFG/HBG |
| true | true | default | default | fg/fg (useless) |
| true | true | default | set | HFG/fg |
| true | true | set | default | fg/HBG |
| true | true | set | set | HFG/HBG |
| default | false | default | default | bg/fg |
| default | false | default | set | bg/fg |
| default | false | set | default | fg/HBG |
| default | false | set | set | HFG/HBG |
| default | true | default | default | bg/fg |
| default | true | default | set | bg/fg |
| default | true | set | default | fg/HBG |
| default | true | set | set | HFG/HBG |
*localeFilter: xterm-filter -p
| 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 |
1 for reverse, 2 for underline, 4 for bold and 8 for blink.
The following resources are specified as part of the tek4014 widget (class Tek4014). These are specified by patterns such as “XTerm.tek4014.NAME”:
The resources that may be specified for the various menus are described in the documentation for the Athena SimpleMenu widget. The name and classes of the entries in each of the menus are listed below. Resources named “lineN” where N is a number are separators with class SmeLine.
As with all X resource-based widgets, the labels mentioned are customary defaults for the application.
The Main Options menu (widget name mainMenu) has the following entries:
The VT Options menu (widget name vtMenu) has the following entries:
The VT Fonts menu (widget name fontMenu) has the following entries:
The TEK Options menu (widget name tekMenu) has the following entries:
The following resources are useful when specified for the Athena Scrollbar widget:
Once the VT102 window is created, xterm allows you to select text and copy it within the same or other windows.
The selection functions are invoked when the pointer buttons are used with no modifiers, and when they are used with the “shift” key. The assignment of the functions described below to keys and buttons may be changed through the resource database; see ACTIONS below.
Pointer button one (usually left) is used to save text into the cut buffer. Move the cursor to beginning of the text, and then hold the button down while moving the cursor to the end of the region and releasing the button. The selected text is highlighted and is saved in the global cut buffer and made the PRIMARY selection when the button is released. Normally (but see the discussion of on2Clicks, etc):
Multiple-click is determined by the time from button up to button down, so you can change 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 lines were wrapped by xterm itself rather than by the application running in the window. 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 PRIMARY selection, if any, otherwise from the cut buffer, inserting it as keyboard input.
Pointer button three (usually right) extends the current selection. (Without loss of generality, you can swap “right” and “left” everywhere in the rest of this paragraph.) If 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 really 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.
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.
Unlike the VT102 window, the Tektronix window does not allow the copying of text. It does allow Tektronix GIN mode, and in this mode the 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 is bit is normally stripped unless the terminal mode is RAW; see tty(4) for details).
X clients provide select and paste support by responding to requests conveyed by the server.
When configured to use the primary selection, (the default) xterm can provide the selection data in ways which help to retain character encoding information as it is pasted.
A user “selects” text on xterm, which highlights the selected text. A subsequent “paste” to another client forwards a request to the client owning 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, e.g., if it has released it or another client has asserted ownership, it relies on cut-buffers to pass the data. But cut-buffers handle only ISO-8859-1 data (officially - some clients ignore the rules).
When configured to use the clipboard (see resource selectToClipboard), the problem with persistence of ownership is bypassed. Otherwise, there is no difference regarding the data which can be passed via selection.
The different types of data which are passed depend on what the receiving client asks for. These are termed selection targets.
When asking for the selection data, xterm tries the following types in this order:
The middle two (TEXT and COMPOUND_TEXT) are added if xterm is configured with the i18nSelections resource set to “true”.
UTF8_STRING is preferred (therefore first in the list) since xterm stores text as Unicode data when running in wide-character mode, and no translation is needed. On the other hand, TEXT and COMPOUND_TEXT may require translation. If the translation is incomplete, they will insert X's “defaultString” whose value cannot be set, and may simply be empty. Xterm's defaultString resource specifies the string to use for incomplete translations of the UTF8_STRING.
You can alter the types which xterm tries using the eightBitSelectTypes or utf8SelectTypes resources. For instance, you might have some specific locale setting which does not use UTF-8 encoding. The resource value is a comma-separated list of the selection targets, which consist of the names shown. You can use the special name I18N to denote the optional inclusion of TEXT and COMPOUND_TEXT. The names are matched ignoring case, and can be abbreviated. The default list can be expressed in several ways, e.g.,
UTF8_STRING,I18N,STRING utf8,i18n,string u,i,s
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 that can be altered. A check mark appears next to a mode that is currently active. Selecting one of these modes toggles its state. Other menu entries are commands; selecting one of these performs the indicated function.
All of the menu entries correspond to X actions. In the list below, the menu label is shown followed by the action's name in parenthesis.
The xterm mainMenu pops up when the “control” key and pointer button one are pressed in a window. This menu contains items that apply to both the VT102 and Tektronix windows. There are several sections:
The vtMenu sets various modes in the VT102 emulation, and is popped up when the “control” key and pointer button two are pressed in the VT102 window.
The fontMenu pops up when when the “control” key and pointer button three are pressed in a window. It sets the font used in the VT102 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:
The second section allows you to modify the way it is displayed:
The third section allows you to modify the way it is specified:
uxterm -class XTerm
The 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.
Commands:
Windows:
X environments differ in their security consciousness.
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.
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 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.
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 of range:value pairs. The range is either a single number or low-high in the range of 0 to 65535, corresponding to the code for the character or characters to be set. The value is arbitrary, although 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 bytes 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};
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.
The following actions are provided for use within the vt100 or tek4014 translations resources:
*VT100*translations: #override \n\ Meta <KeyPress> /:dabbrev-expand()
^X ESC G <line+“ ”> <col+“ ”>
d or D indicate the default font (the font initially used when xterm was started),
1 through 6 indicate the fonts specified by the font1 through font6 resources,
e or E indicate the normal and bold fonts that have been set through escape codes (or specified as the second and third action arguments, respectively), and
s or S indicate the font selection (as made by programs such as xfontsel(1)) indicated by the second action argument.
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. The control sequence is omitted altogether if the button event is on the current line.
The Tektronix window also has the following action:
The default bindings in the VT102 window use the SELECT token, which is set by the selectToClipboard resource:
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() \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\
<BtnDown>:ignore()
The default bindings for the scrollbar widget are separate from the VT100 widget:
<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()
The default bindings in the Tektronix window are:
~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)
Here is an example which uses shifted select/paste to copy to the clipboard, and unshifted select/paste for the primary selection. In each case, a (different) cut buffer is also a target or source of the select/paste operation. It is important to remember however, that cut buffers store data in ISO-8859-1 encoding, while selections can store data in a variety of formats and encodings. While xterm owns the selection, it highlights it. When it loses the selection, it removes the corresponding highlight. But 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)
Below is a sample of how the keymap() action is used to add special keys for entering commonly-typed works:
*VT100.Translations: #override <Key>F13: keymap(dbx)
*VT100.dbxKeymap.translations: \
<Key>F14: keymap(None) \n\
<Key>F17: string("next") string(0x0d) \n\
<Key>F18: string("step") string(0x0d) \n\
<Key>F19: string("continue") string(0x0d) \n\
<Key>F20: string("print ") insert-selection(PRIMARY, CUT_BUFFER0)
Some people prefer using the left pointer button for dragging the scrollbar thumb. That can be setup 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()
The Xterm Control Sequences document lists the control sequences which an application can send xterm to make it perform various operations. Most of these operations are standardized, from either the DEC or Tektronix terminals, or from more widely used standards such as ISO-6429.
Xterm sets several environment variables:
Depending on your system configuration, xterm may also set the following:
The actual pathnames given may differ on your system.
Most of the fatal error messages from xterm use the following format:
Large pastes do not work on some systems. This is not a bug in xterm; it is a bug in the pseudo terminal driver of those systems. 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.
When connected to an input method, it is possible for xterm to hang if the XIM server is suspended or killed.
Many of the options are not resettable after xterm starts.
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.
There needs to be a dialog box to allow entry of the Tek COPY file name.
resize(1), luit(1), uxterm(1), X(7), pty(4), tty(4)
Xterm Control Sequences (this is the file ctlseqs.ms).
http://invisible-island.net/xterm/xterm.html
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
Far too many people, including:
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), Jason Bacon, Stephen P. Wall, David Wexelblat, and Thomas Dickey (invisible-island.net).