Difference between revisions of "User:Thisoldman"

From ArchWiki
Jump to: navigation, search
m (Menus: sandbox)
m (Blanked page.)
 
(26 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Xterm=
 
'''xterm''' is the standard [[Wikipedia:Terminal emulator|terminal emulator]] for the [[X Window System]]. It is highly configurable and has many useful and some unusual features.
 
  
The ultimate authorities for using and customizing xterm are the ''man pages'' for ''xterm, uxterm, koi8rxterm, ''and ''resize; and the [http://invisible-island.net/xterm/xterm.log.html XTerm ChangeLog].
 
 
==Basics==
 
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 {{ic|$TERM}} as {{ic|xterm}}.  You can check this with either of these commands:
 
{{bc|$ 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 by setting the resource {{ic|termName}}, either from the command line with {{ic|xterm -tn xterm-256color}}, or by setting the resource value:
 
xterm*termName: xterm-256color
 
*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:
 
XTerm*locale: true
 
*Fix the '''Alt '''key. {{Keypress|Alt}} is not the {{Keypress|Meta}} key, yet on PC keyboards {{Keypress|Alt}} is used as the {{Keypress|Meta}} key.  Make xterm aware of this by adding the following to your resource file:
 
XTerm*metaSendsEscape: true
 
===Scrolling===
 
 
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 {{ic|saveLines}} resource,
 
Xterm*saveLines: 4096
 
 
Other X resources that affect scrolling are {{ic|jumpScroll}}, set to {{ic|true}} by default, and {{ic|multiScroll}} and {{ic|fastScroll}}, both of which default to {{ic|false}}.
 
 
For manual scrolling, one can use the mouse wheel, or the key combinations of {{Keypress|Shift+PageUp}} and {{Keypress|Shift+PageDown}} to scroll a half page at a time, or one can use the scrollbar.
 
 
====The Scrollbar====
 
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'' by using a "click-and-drag" with the middle mouse button.
 
 
===Menus===
 
The Archlinux version of xterm is compiled with the ''toolbar, ''or ''menubar, ''disabled.  The menus are still available as ''popups'' when you press {{Keypress|Ctrl+MouseButton}} within the xterm window.  The actions invoked by the menu items can often be accomplished using command line options or by setting resource values.
 
 
{{Tip|If the popup menu windows show only as small boxes, it is probably because you have a line similar to this, {{ic|xterm*geometry: 80x32}}, in your resources file.  This ''does ''start xterm in an 80 column by 32 row main window, but it also forces the menu windows to be 80 pixels by 32 pixels!  Replace the incorrect line with this:
 
{{bc|xterm*VT100.geometry: 80x32}}}}
 
 
Some of the menu options are discussed below.
 
 
====Main Options Menu====
 
'''''Ctrl + LeftMouse'''''
 
 
*The effects of {{ic|Full Screen}} and {{ic|Redraw Window}} are obvious.
 
 
*{{ic|Secure Keyboard}} attempts 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.
 
 
*{{ic|Allow SendEvents}} allows other processes to send keypress and mouse events to the xterm instance.  Because of the security risk, do not enable this unless you are very sure you know what you are doing.
 
 
*{{ic|Log to File}} – The log file will be named {{ic|Xterm.log.hostname.yyyy.mm.dd.hh.mm.ss.XXXXXX}}. This file will contain all the printed output ''and '' also all cursor movements.  Logging may be a security risk.
 
 
*The six {{ic|Send *** Signal}} menu items are not often useful, except when your keyboard fails.  You may be more familiar with the keyboard equivalents for some of the items:
 
:{{ic|STOP}} is usually invoked with {{Keypress|Ctrl+z}} to suspend a process,
 
:{{ic|CONT}} with {{Keypress|Ctrl+y}} to continue the process and
 
:{{ic|INT}} with {{Keypress|Ctrl+c}} to interrupt a process.
 
:{{ic|HUP}}, {{ic|TERM}} and {{ic|KILL}} will close the xterm window.  {{ic|KILL}} should be avoided, as it does not allow any cleanup code to run.  The {{ic|Quit}} menu item will also close the xterm window – it is the same as sending a {{ic|HUP}} signal.  Most users will use the keyboard combination {{Keypress|Ctrl+d}} or will type {{ic|exit}} to close an xterm instance.
 

Latest revision as of 05:31, 11 March 2013