If no particular program is specified, xterm runs the user's shell. An X display can show one or more user's xterm windows output at the same time.[2][3] Each xterm window is a separate process, but all share the same keyboard, taking turns as each xterm process acquires focus. Normally focus switches between X applications as the user moves the pointer (e.g., a mouse cursor) about the screen, but xterm provides options to grab focus (the Secure Keyboard feature) as well as accept input events sent without using the keyboard (the Allow SendEvents feature). Those options have limitations, as discussed in the xterm manual.[4]
XTerm originated prior to the X Window System. It was originally written as a stand-alone terminal emulator for the VAXStation 100 (VS100) by Mark Vandevoorde, a student of Jim Gettys, in the summer of 1984, when work on X started. It rapidly became clear that it would be more useful as part of X than as a standalone program, so it was retargeted to X. As Gettys tells the story, "part of why xterm's internals are so horrifying is that it was originally intended that a single process be able to drive multiple VS100 displays."[5]
After many years as part of the X reference implementation, around 1996 the main line of development then shifted to XFree86 (which itself forked from X11R6.3), and it is now maintained by Thomas Dickey.
Many xterm variants are also available, such as hanterm, a variant tailored to Korean speakers, and kterm, which is designed for Japanese speakers.[6] Most terminal emulators for X started as variations on xterm.[discuss][7]
VT420: DECSTR (soft terminal reset) was added in patch 34.[10] In 2012, xterm's default emulation was changed to VT420 to allow tmux to assume the corresponding left/right margin support.[11]
VT520: Although not officially emulated, parts of VT520 features were implemented.[12] Controls DECSMBV and DECSWBV for setting the margin- and warning-bell volume were added in patch 254.[13]
Customization
As with most X applications, xterm can be customized via global X resources files (e.g. /usr/lib/X11/app-defaults/XTerm), per-user resource files (e.g. ~/XTerm, ~/.Xresources), or command-line arguments. Most of the command-line options correspond to resource settings, as noted in the manual page.
While the name of the program is xterm, the X resource class is XTerm. The uxterm script overrides this, using the UXTerm resource class.
XTerm normally does not have a menu bar. To access xterm's three menus, users hold the control key and press the left, middle, or right mouse button. Support for a "toolbar" can be compiled-in, which invokes the same menus.
In addition to protocols used in commercially available terminal machines, xterm added a few protocols that have been adopted by other terminal emulators, such as:
Mouse tracking: Support for buttons 4 and 5 was added in patch 120.[14]
16-color terminal protocol: Added in patch 39.[15]
^Rothman, Ernest E; Jepson, Brian; Rosen, Rich (2008-09-18). Mac OS X for Unix Geeks (Leopard): Demistifying the Geekier Side of Mac OS X. "O'Reilly Media, Inc.". ISBN978-0596555191.