Software:xterm

From HandWiki
Revision as of 07:52, 9 February 2024 by Sherlock (talk | contribs) (fixing)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Standard terminal emulator for the X Window system

xterm
Icon of XTerm (from 2012).svg
Xterm.png
A sample xterm, running the Bash shell, showing a listing of /etc.
Original author(s)Mark Vandevoorde
Developer(s)Thomas Dickey
Initial release1984; 40 years ago (1984)
Operating systemUnix, Unix-like, MVS OpenVMS, OS/2
TypeTerminal emulator
LicenseMIT/X Consortium License
Website{{{1}}}

xterm is the standard terminal emulator for the X Window System. It allows users to run programs which require a command-line interface.

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.[1][2] 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.[3]

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."[4]

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.[5] Most terminal emulators for X started as variations on xterm.

Features

Terminal emulation

Early versions emulated the VT102 and Tektronix 4014. [6]

Later versions added control sequences for DEC and other terminals such as:

  • VT220: Added in patch 24.[7] Later, in 1998, xterm added support for VT220 features, such as extending its support of ISO-2022 shift functions to provide the National Replacement Character Set feature.
  • VT320: Added in patch 24.[7]
  • VT420: DECSTR (soft terminal reset) was added in patch 34.[8] In 2012, xterm's default emulation was changed to VT420 to allow tmux to assume the corresponding left/right margin support.[9]
  • VT520: Although not officially emulated, parts of VT520 features were implemented.[10] Controls DECSMBV and DECSWBV for setting the margin- and warning-bell volume were added in patch 254.[11]

Customization

Example showing xterm's toolbar.
Chart of the 256 colors available in an xterm with color support. XTerm color numbers and RGB values are shown for each.

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.

Protocols

Supported terminal control functions include:

  • ANSI X3.64
  • Sixel
  • Digital Equipment Corporation VT family:
  • Tektronix family:
    • Tektronix 4014

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.[12]
  • 16-color terminal protocol: Added in patch 39.[13]
  • 256 colors terminal protocol: Added in patch 111.[14]
  • 88-color terminal protocol: Added in patch 115.[15]
  • Custom color palette: Ability to specifying the RGB values for palette entries was added in patch 111.[14]

Fonts

Initially Xterm supported only Portable Compiled Format (PCF) bitmap font until 2000 when Xft library was introduced to support modern stroke-based fonts like TrueType.[16]

See also

References

  1. 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. ISBN 978-0596555191. 
  2. Wagner, Bill (1998). The Complete Idiot's Guide to UNIX. ISBN 978-0789718051. https://archive.org/details/completeidiots00wagn. 
  3. "xterm(1)". Security. https://invisible-island.net/xterm/manpage/xterm.html#h2-SECURITY. Retrieved December 21, 2021. 
  4. Thomas E. Dickey. "XTerm – Frequently Asked Questions (FAQ), Who wrote XTerm?". https://invisible-island.net/xterm/xterm.faq.html#who_did_it. 
  5. Thomas E. Dickey. "XTerm – Frequently Asked Questions (FAQ), What versions are available?". https://invisible-island.net/xterm/xterm.faq.html#other_versions. 
  6. Thomas E. Dickey. "What is XTerm?". https://invisible-island.net/xterm/xterm.faq.html#what_is_it. 
  7. 7.0 7.1 "Patch #24 - 1996/8/11 - XFree86 3.1.2Ee". https://invisible-island.net/xterm/xterm.log.html#xterm_24. 
  8. "Patch #34 - 1997/1/5 - XFree86 3.2o". https://invisible-island.net/xterm/xterm.log.html#xterm_34. 
  9. "Patch #280 - 2012/06/24". https://invisible-island.net/xterm/xterm.log.html#xterm_280. 
  10. "Why not emulate VT520?". https://invisible-island.net/xterm/xterm.faq.html#why_not_vt520. 
  11. "Patch #254 - 2010/1/6". https://invisible-island.net/xterm/xterm.log.html#xterm_254. 
  12. "Patch #120 - 1999/10/28 - XFree86 3.9.16c". https://invisible-island.net/xterm/xterm.log.html#xterm_120. 
  13. "Patch #39 - 1997/5/24 - XFree86 3.2Xl". https://invisible-island.net/xterm/xterm.log.html#xterm_39. 
  14. 14.0 14.1 "Patch #111 - 1999/7/10 - XFree86 3.9Pw". https://invisible-island.net/xterm/xterm.log.html#xterm_111. 
  15. "Patch #115 - 1999/9/18 - XFree86 3.9.16a". https://invisible-island.net/xterm/xterm.log.html#xterm_115. 
  16. "XTERM - Change Log". https://invisible-island.net/xterm/xterm.log.html#xterm_148. 

External links