The ultimate authorities for using and customizing xterm are the man pages for xterm, uxterm, koi8rxterm, and resize; and the XTerm ChangeLog.
Resource File Settings
Xterm is used with different hardware on a variety of operating systems, not just with a PC keyboard on a GNU/Linux system. There are several options you can set in your X resources files that may make this terminal emulator much easier to use.
- Allow xterm to report the TERM variable correctly. Do not set the TERM variable from your ~/.bashrc or ~/.bash_profile or similar file. The terminal itself should report the correct TERM to the system so that the proper terminfo file will be used. Two usable terminfo files are xterm, and xterm-256color.
- – Without setting TERM explicitly, xterm should report
xterm. You can check this from within xterm using either of these commands:
$ echo $TERM $ tset -q
- – When TERM is not set explicitly, color schemes for some programs, such as vim, may not appear until a key is pressed or some other input occurs. This can be remedied with this resource setting :
- Use UTF-8. First make certain your locale settings are correct for UTF-8, then add this to your resource file so that xterm interprets all incoming data as UTF-8 encoded:
- Fix the Alt key. On PC keyboards Template:Keypress is used as the Template:Keypress key. Make xterm aware of this by adding the following to your resource file:
As new lines are written to the bottom of the xterm window, older lines disappear from the top. Xterm saves these lines and they can be redisplayed by scrolling. By default, 1024 lines are saved. You can change the number of saved lines with the
Other X resources that affect scrolling are
jumpScroll, set to
true by default, and
fastScroll, both of which default to
The scrollbar is not shown by default. It can be made visible by a menu selection, by command line options, or by setting resource values. It can be made to appear to the left or right of the window and its visual appearance can be modified through resource settings.
The scrollbar operates differently from what you may be accustomed to using.
- To scroll down:
- – Click on the scrollbar with the left mouse button.
- – Click on the scrollbar below the thumb with the middle mouse button.
- To scroll up:
- – Click on the scrollbar with the right mouse button.
- – Click on the scrollbar above the thumb with the middle mouse button.
- To position text, moving in either direction:
- – Grab the thumb and use "click-and-drag" with the middle mouse button.
The Archlinux version of xterm is compiled with the toolbar, or menubar, disabled. The menus are still available as popups when you press Template:Keypress within the xterm window. The actions invoked by the menu items can often be accomplished using command line options or by setting resource values.
Some of the menu options are discussed below.
Main Options Menu
Ctrl + LeftMouse
Secure Keyboardattempts to ensure only the xterm window, and no other application, receives your keystrokes. The display changes to reverse video when it is invoked. If the display is not in reverse video, the Secure Keyboard mode is not in effect. Please read the "SECURITY" section of the xterm man page for this option's limitations.
Allow SendEventsallows other processes to send keypress and mouse events to the xterm window. Because of the security risk, do not enable this unless you are very sure you know what you are doing.
Log to File– The log file will be named
Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX. This file will contain all the printed output and all cursor movements. Logging may be a security risk.
- The six
Send *** Signalmenu items are not often useful, except when your keyboard fails.
KILLwill close the xterm window.
KILLshould be avoided, as it does not allow any cleanup code to run.
Quitmenu item will also close the xterm window – it is the same as sending a
HUPsignal. Most users will use the keyboard combination Template:Keypress or will type
exitto close an xterm instance.
VT Options Menu
Ctrl + MiddleMouse
Select to Clipboard– Normally, selected text is stored in PRIMARY, to be pasted with Template:Keypress or by using the middle mouse button. By toggling this option to on, selected text will use CLIPBOARD, allowing you to paste the text selected in an xterm window into a GUI application using Template:Keypress. The corresponding XTerm resource is
Show Alternate Screen– When you use an a terminal application such as vim, or less, the alternate screen is opened. The main VT window, now hidden, remains in memory. You can view this main window, but not issue any commands in it, by toggling this menu option. You are able to select and copy text from this main window (when using vim, hold down Template:Keypress while using the mouse), then paste into your editor in the alternate screen. Using the alternate screen may take some trial and error experimentation.
Show Tek Windowand
Switch to Tek Mode– The Tektronix 4014 was a graphics terminal from the 1970s used for CAD and plotting applications. The command line program
graph, from , and the application can be made to use xterm's Tek emulation; most people will prefer more modern display options for charting data.
VT Fonts Menu
Ctrl + RightMouse
See Fonts for a more complete discussion of font options and changing the menu selection defaults.
- When using XLFD fonts, the first seven menu items will change the font face and font size used in the current xterm window. If you are using an Xft font, the font face will not change with the different selections, only the size.
Selectionallows you to switch to the font name currently stored in $PRIMARY (or $CLIPBOARD).