Difference between revisions of "User:Thisoldman"

From ArchWiki
Jump to: navigation, search
m
m (Scrolling: more sandboxing)
Line 16: Line 16:
 
  XTerm*vt100.metaSendsEscape: true
 
  XTerm*vt100.metaSendsEscape: true
 
===Scrolling===
 
===Scrolling===
 +
As new lines are written to the bottom of the xterm window, older lines disappear from the top.  Xterm saves these lines in a buffer and they can be recalled by scrolling.  The mouse wheel should just work, and the combinations of {{Keypress|Shift+PageUp}} and {{Keypress|Shift+PageDown}} will scroll one-half a page at a time, or one can use the [[#The Scrollbar|scrollbar]].
 +
 +
The number of lines saved for recall is set at 1024 by default in Arch.  You can change this with the {{ic|saveLines}} resource,
 +
Xterm*saveLines: 4096
 +
 +
Normally, text output would be scrolled one line at a time.  This would cause some delay when commands produce a lot of output.  The resource {{ic|jumpScroll}} is set to ''true ''by default so that multiple lines at a time can be printed.  Two other resources that affect scrolling speed are {{ic|multiScroll}}, for asynchronous scrolling, and {{ic|fastScroll}}, which suppresses refreshing the display when there is a large amount of output.  Both are set to {{ic|false}} by default.
 +
====The Scrollbar====

Revision as of 14:09, 3 March 2013

xterm is the standard 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; the XTerm FAQ and the 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 to set in your X resources files that make this terminal emulator much easier to use with Linux.

  • 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 $TERM as xterm. You can check this with 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 by setting the resource termName, either from the command line with 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
XTerm*vt100.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 in a buffer and they can be recalled by scrolling. The mouse wheel should just work, and the combinations of Template:Keypress and Template:Keypress will scroll one-half a page at a time, or one can use the scrollbar.

The number of lines saved for recall is set at 1024 by default in Arch. You can change this with the saveLines resource,

Xterm*saveLines: 4096

Normally, text output would be scrolled one line at a time. This would cause some delay when commands produce a lot of output. The resource jumpScroll is set to true by default so that multiple lines at a time can be printed. Two other resources that affect scrolling speed are multiScroll, for asynchronous scrolling, and fastScroll, which suppresses refreshing the display when there is a large amount of output. Both are set to false by default.

The Scrollbar