MANIFEST | 3 Tekproc.c | 17 aclocal.m4 | 296 +++- button.c | 14 charproc.c | 100 - configure | 2265 ++++++++++++++++++++++++++------------ configure.in | 8 debian/changelog | 11 debian/copyright | 2 debian/gbp.conf | 6 debian/local/xterm.faq.html | 662 ++++++++--- debian/patches/902_windowops.diff | 2 debian/patches/904_fontops.diff | 6 error.h | 3 fontutils.c | 11 main.c | 142 +- menu.c | 4 misc.c | 91 - os2main.c | 9 print.c | 6 ptyx.h | 12 resize.c | 21 screen.c | 76 - scrollbar.c | 25 trace.c | 94 - trace.h | 7 util.c | 28 version.h | 4 vttests/query-fonts.pl | 166 ++ xterm.log.html | 44 xterm.man | 72 - xterm_io.h | 10 xtermcap.c | 4 33 files changed, 2961 insertions(+), 1260 deletions(-)
New commits: commit 52bb9b6bfb634ce0aed2d5370b57e028535621a2 Author: Julien Cristau <jcris...@debian.org> Date: Sun Jun 6 14:39:29 2010 +0200 Upload to unstable diff --git a/debian/changelog b/debian/changelog index e826c26..04b950f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -xterm (259-1) UNRELEASED; urgency=low +xterm (259-1) unstable; urgency=low * README.Debian: drop obsolete content, including a link to the old Debian X FAQ (closes: #581647). Thanks, Bob Proulx! @@ -12,7 +12,7 @@ xterm (259-1) UNRELEASED; urgency=low * Update copy of XTerm FAQ to revision 1.138 (dated 2010/05/15). * Bump copyright year in debian/copyright. - -- Julien Cristau <jcris...@debian.org> Sun, 06 Jun 2010 13:49:43 +0200 + -- Julien Cristau <jcris...@debian.org> Sun, 06 Jun 2010 14:39:27 +0200 xterm (258-1) unstable; urgency=low commit c3dd4f2d45516ba5c449552a037b04c5a95a078d Author: Julien Cristau <jcris...@debian.org> Date: Sun Jun 6 14:39:25 2010 +0200 Bump copyright year in debian/copyright. diff --git a/debian/changelog b/debian/changelog index 763d4f4..e826c26 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,7 @@ xterm (259-1) UNRELEASED; urgency=low supposedly unused key has been useful for various rebindings (closes: #580946) * Update copy of XTerm FAQ to revision 1.138 (dated 2010/05/15). + * Bump copyright year in debian/copyright. -- Julien Cristau <jcris...@debian.org> Sun, 06 Jun 2010 13:49:43 +0200 diff --git a/debian/copyright b/debian/copyright index 88e3717..48740bc 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,7 +4,7 @@ This package was debianized by first time by David Martinez Moreno Upstream sources: http://invisible-island.net/xterm/xterm.html -Copyright 1997-2009 by Thomas E. Dickey +Copyright 1997-2010 by Thomas E. Dickey Copyright 1999-2000 by Steve Wall All Rights Reserved commit 0503569a7e8968f6a7bdb8ec2aab93b165aa038e Author: Julien Cristau <jcris...@debian.org> Date: Sun Jun 6 14:36:49 2010 +0200 Update copy of XTerm FAQ to revision 1.138 (dated 2010/05/15). diff --git a/debian/changelog b/debian/changelog index cd7323b..763d4f4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ xterm (259-1) UNRELEASED; urgency=low + change default for allowScrollLock resource to false, noting that the supposedly unused key has been useful for various rebindings (closes: #580946) + * Update copy of XTerm FAQ to revision 1.138 (dated 2010/05/15). -- Julien Cristau <jcris...@debian.org> Sun, 06 Jun 2010 13:49:43 +0200 diff --git a/debian/local/xterm.faq.html b/debian/local/xterm.faq.html index 2324466..7de3a7d 100644 --- a/debian/local/xterm.faq.html +++ b/debian/local/xterm.faq.html @@ -1,7 +1,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <!-- ***************************************************************************** - * Copyright 1997-2007,2009 by Thomas E. Dickey * + * Copyright 1997-2009,2010 by Thomas E. Dickey * * All Rights Reserved. * * * * Permission to use, copy, modify, and distribute this software and its * @@ -20,19 +20,19 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * ***************************************************************************** - $XTermId: xterm.faq.html,v 1.107 2009/11/11 11:59:38 tom Exp $ + $XTermId: xterm.faq.html,v 1.138 2010/05/15 20:46:49 tom Exp $ --> <HTML> <HEAD> -<TITLE>XTERM - Frequently Asked Questions (FAQ)</TITLE> +<TITLE>XTERM – Frequently Asked Questions (FAQ)</TITLE> <LINK REV=MADE HREF="mailto:dic...@invisible-island.net"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </HEAD> <BODY> <HR> -Copyright 1997-2007,2009 by Thomas E. Dickey +Copyright 1997-2009,2010 by Thomas E. Dickey <HR> -<H1>Contents</H1> +<h2>Contents</h2> <UL> <LI><A HREF="#what_is_it">What is XTERM?</A> <LI><A HREF="#who_did_it">Who wrote XTERM?</A> @@ -49,7 +49,7 @@ Copyright 1997-2007,2009 by Thomas E. Dickey </UL> <HR> -<H1><A NAME="what_is_it">What is XTERM?</A></H1> +<h2><A NAME="what_is_it">What is XTERM?</A></h2> From the manual page: <blockquote> The xterm program is a terminal emulator for the X Window System. It provides @@ -60,7 +60,7 @@ derived from 4.3bsd), xterm will use the facilities to notify programs running in the window whenever it is resized. </blockquote> -<H1><A NAME="who_did_it">Who wrote XTERM?</A></H1> +<h2><A NAME="who_did_it">Who wrote XTERM?</A></h2> I've been working on xterm since early 1996 (see my <a href="xterm.log.html">changelog</a> for details). <P> @@ -68,7 +68,7 @@ But the program is much older than that. <p> A lot of people, cited at the bottom of the manual page wrote the original xterm program, maintained by the X Consortium -(later part of the Open Group - I'm well aware of the distinction, +(later part of the Open Group – I'm well aware of the distinction, but am citing when the work was done, not who the current owner may be). There is no changelog, and it is not clear who did what. Email from Jim Gettys provides some background: @@ -147,61 +147,82 @@ same mapping software I wrote the emulator for. And I am still at the Smithsonian Astrophysical Observatory. </blockquote> <P> -This FAQ is oriented toward the version of xterm distributed with XFree86, -which is based on the X11R6.3 xterm, with the addition of ANSI color and +This FAQ is oriented toward the version of xterm originally distributed +with XFree86 (also known as "new xterm", +with a corresponding terminal description "xterm-new"), +which was based on the X11R6.3 xterm, with the addition of ANSI color and VT220 controls. -<H1><A NAME="what_platforms">What platforms does it run on?</A></H1> +<h2><A NAME="what_platforms">What platforms does it run on?</A></h2> <code>Xterm</code> runs in all of the implementations of X11. I've built and run these since I started working on xterm: <UL> -<LI>AIX 3.2.5 (cc) -<LI>Digital Unix 3.2, 4.0 (cc) -<LI>FreeBSD 2.2.6 to 5.1 (gcc 2.8) -<LI>HP-UX 9.05 (gcc 2.7.2) +<LI>AIX 3.2.5, 4.1, 4.3 (cc) +<LI>Digital Unix 3.2, 4.0, 5.0 (cc) +<LI>FreeBSD 2.2.6 to 6.0 (gcc 2.8) +<LI>HP-UX 9.05 to 11.23 (gcc 2.7.2 to 3.4) <LI>IRIX 5.2, 6.2 (cc, gcc 2.7.2, gcc 2.8) -<LI>Linux 2.0.0 to 2.4.22 (gcc 2.7.2 to 3.3) +<LI>Linux 2.0.0 to 2.6.26 (gcc 2.7.2 to 4.3) <LI>SCO OpenServer 5 (cc, gcc). <LI>Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8 (cc, gcc 2.7.2) <LI>SunOS 4.1.1, 4.1.3 (gcc 2.7.2) </UL> <P> -Most of these configurations have X11R5 libraries. Only minor changes +The older configurations have X11R5 libraries. Only minor changes are needed to make xterm work on those systems. However, with X11R6 you can obtain better locale support, as well as new features such as the active icon. +X11R7... not much to say there. -<H1><A NAME="latest_version">What is the latest version?</A></H1> -The most recent (and well supported) version of xterm is the XFree86 version. -I have a copy at -<P> -Ftp: <A HREF="ftp://invisible-island.net/xterm/xterm.tar.gz">ftp://invisible-island.net/xterm/xterm.tar.gz</A> +<h2><A NAME="latest_version">What is the latest version?</A></h2> +The most recent (and well supported) version of xterm is the one that I maintain: +<ul> +<li><A HREF="ftp://invisible-island.net/xterm/xterm.tar.gz">current source (ftp)</A> +<li><A HREF="http://invisible-island.net/datafiles/release/xterm.tar.gz">current source (http)</A> +</ul> -<H1><A NAME="other_versions">What versions are available?</A></H1> -There are several other versions of xterm, as well as similar programs. +<h2><A NAME="other_versions">What versions are available?</A></h2> +There are several other versions of xterm, based on xterm's source. These include <UL> <LI><A HREF="#bug_ansi_xterm">ansi_xterm</A> <LI><A HREF="#bug_color_xterm">color_xterm</A> <LI><A HREF="#bug_cxterm">cxterm</A> (Chinese) +<LI><A HREF="#bug_hanterm">hanterm</A> (Korean) +<LI><A HREF="#bug_mxterm">mxterm</A> +<LI><A HREF="#bug_nxterm">nxterm</A> +<LI><A HREF="#bug_kterm">kterm</A> (Japanese) +<LI><A HREF="#bug_xterm_r6">xterm</A> (from X Consortium) +</UL> +There are similar programs not based on xterm's source, +which are compatible to different degrees. +These include +<ul> <LI><A HREF="#bug_dtterm">dtterm</A> <LI><A HREF="#bug_emu">emu</A> (from X Consortium) <LI><A HREF="#bug_eterm">Eterm</A> <LI><A HREF="#bug_gnometerm">GNOME Terminal</A> <LI><A HREF="#bug_multignome">Multi GNOME Terminal (MGT)</A> -<LI><A HREF="#bug_hanterm">hanterm</A> (Korean) <LI><A HREF="#bug_mterm">mterm</A> -<LI><A HREF="#bug_mxterm">mxterm</A> -<LI><A HREF="#bug_nxterm">nxterm</A> <LI><A HREF="#bug_konsole">konsole</A> -<LI><A HREF="#bug_kterm">kterm</A> (Japanese) <LI><A HREF="#bug_mlterm">mlterm</A> (Multi Lingual) +<LI><A HREF="#bug_osso_xterm">osso-xterm</A> +<LI><A HREF="#bug_roxterm">roxterm</A> <LI><A HREF="#bug_rxvt">rxvt</A> +<LI><A HREF="#bug_xfce_term">xfce-term</A> <LI><A HREF="#bug_xgterm">xgterm</A> <LI><A HREF="#bug_xiterm">xiterm</A> -<LI><A HREF="#bug_xterm_r6">xterm</A> (from X Consortium) -</UL> +</ul> +Some of these use the <a href="#vte_widget">VTE widget</a>. +Since that supplies most of the terminal emulation, +the remaining differences between programs using VTE tend to be +at the level of the window manager (menus, borders, etc.). +Other (older) programs which are based on reusable widgets +include +<A HREF="#bug_dtterm">dtterm</A> and +<A HREF="#bug_emu">emu</A>. +<p> (I am aware of a few others, such as <STRONG>xcterm</STRONG>, but have not seen a working version of these). @@ -230,7 +251,7 @@ there was some resistance at the time (2000/4/5) by that organization to incorporating the fix because it might be confused with the 4.0 release version. -<H1><A NAME="how_do_i">How do I ...</A></H1> +<h2><A NAME="how_do_i">How do I ...</A></h2> Not really problems, but frequently asked questions (the point of this, after all): <UL> @@ -241,8 +262,11 @@ after all): <LI><A HREF="#how2_blink">How do I make the cursor blink?</A> </UL> -<H2><A NAME="how2_fsize">How do I change the font size?</A></H2> -This is in the manpage, in <em>MENUS</em>. +<h3><A NAME="how2_fsize">How do I change the font size?</A></h3> +xterm uses fonts given as resource settings. +You can switch between these fonts at runtime, using a menu. +This is documented in the manpage, in the +<a href="manpage/xterm.html#MENUS">MENUS</a> section. <p> X Consortium xterm provides popup menus, by pressing the control key together with the mouse button. @@ -253,8 +277,14 @@ Usually these are in increasing order of size. XFree86 xterm provides the menu, plus a feature adapted from rxvt: pressing the shifted keypad plus or minus keys steps through the font menu selections, in order of their size. +<p> +xterm's manpage does not document the syntax for X resources; +it is done in the X documentation. +If you are instead asking about a +<a href="#utf8_fonts">problem displaying a given font</a>, +it may be due to a problem with your resource settings. -<H2><A NAME="how2_print">How do I print the screen?</A></H2> +<h3><A NAME="how2_print">How do I print the screen?</A></h3> That depends on why you want to print it. <p> If you want a trace of an interactive session, you should use the @@ -320,7 +350,7 @@ is told to switch the printer offline. If you use the popup menu to print the screen, this will close the printer pipe unless it was already opened by the application running in xterm. -<H2><A NAME="how2_fkeys">How do I set up function keys?</A></H2> +<h3><A NAME="how2_fkeys">How do I set up function keys?</A></h3> With XFree86 xterm, this is relatively simple. So I'll answer that first. <P> With X Consortium xterm, you have partial support for DEC VTxxx function keys. @@ -583,7 +613,7 @@ From his readme file, for vmsterm: numeric keypad. The top row of keys PC numeric keypad (Num Lock, Divide, Multiply, Subtract) are where you find PF1, PF2, PF3, PF4 on a VT keyboard, so I have mapped them to PF1 thru PF4. The PC numeric keypad Add key (+) takes - up the space of two keys which are Minus and Comma on the VT keyboard - I have + up the space of two keys which are Minus and Comma on the VT keyboard – I have mapped it to Comma (Delete Character in the EDT editor). I have then used the PC Pause key to map to VT key Minus (Delete Word in the EDT editor). The remaining keys on the auxiliary numeric keypad are the same for PC and VT. @@ -821,7 +851,7 @@ and the script: -e telnet $HOST </code></pre> -<H2><A NAME="how2_title">How do I set the title?</A></H2> +<h3><A NAME="how2_title">How do I set the title?</A></h3> The control sequences for doing this are documented in <a href="#ctlseqs_ms">ctlseqs.ms</a>. <P> @@ -895,7 +925,7 @@ Hemant Shah <s...@typhoon.xnet.com>): Here's another source of information: <a href="http://cns.georgetown.edu/~ric/howto/Xterm-Title/">Xterm-Title HowTo</a> -<H2><A NAME="how2_blink">How do I make the cursor blink?</A></H2> +<h3><A NAME="how2_blink">How do I make the cursor blink?</A></h3> Standard xterm does not implement a blinking cursor. Some of the variations do: dtterm, @@ -903,7 +933,7 @@ GNOME Terminal, and XFree86 xterm (from mid 1999, <a href="xterm.log.html#xterm_107">patch 107</a>). -<H1><A NAME="frequent_problems">Frequent problems</A></H1> +<h2><A NAME="frequent_problems">Frequent problems</A></h2> <UL> <li>Starting xterm, or not <ul> @@ -920,6 +950,8 @@ and XFree86 xterm <LI><A HREF="#scaled_font">The bold font is ugly</A> <LI><A HREF="#little_dot">I see little dots on the screen</A> <LI><A HREF="#no_russian">My terminal doesn't display Cyrillic characters</A> +<LI><A HREF="#utf8_fonts">I see boxes instead of characters in uxterm</A> +<LI><A HREF="#slow_menus">The first popup menu is very slow</A> </ul> <li>Keyboard problems <ul> @@ -931,6 +963,7 @@ and XFree86 xterm <LI><A HREF="#xterm_pageup">Why can't I use the pageup/pagedown keys?</A> <LI><A HREF="#xterm_pc_style">Why can't I use the home/end keys?</A> <LI><A HREF="#xterm_arrows">Why can't I use the cursor keys in (whatever) shell?</A> +<LI><a HREF="../ncurses/ncurses.faq.html#bash_meta_mode">Alt-keys do not work in bash</a> </ul> <li>Colors and other graphic rendition <ul> @@ -938,19 +971,23 @@ and XFree86 xterm <LI><A HREF="#xterm_terminfo">What $TERM should I use?</A> <LI><A HREF="#xterm_hilite">Reverse video is not reset</A> <LI><A HREF="#vim_16colors">My colors changed in vim</A> +<LI><A HREF="#grep_colors">"grep --color" does not show the right output</A> </ul> <li>Odd behavior <ul> <LI><A HREF="#xterm_paste">Why can't I cut/paste in xterm?</A> +<LI><A HREF="#xterm_tabs">Why can't I select tab-characters in xterm?</A> <LI><A HREF="#xterm_resize">FVWM does weird things when I try to resize xterm</A> <LI><A HREF="#xterm_tite">Why doesn't the screen clear when running vi?</A> <LI><A HREF="#xterm_vite">Why is the cursor misplaced after running vi?</A> <LI><A HREF="#narrowproto">Why doesn't the scrollbar work?</A> +<LI><A HREF="#window_ops">Why can't my program read the window title?</A> +<LI><A HREF="#window_ops2">Why can't my program set the window size?</A> </ul> <LI><A HREF="#warning_msg">What is this warning message?</A> </UL> -<H2><A NAME="no_altchar">My terminal doesn't show box characters</A></H2> +<h3><A NAME="no_altchar">My terminal doesn't show box characters</A></h3> Xterm displays the 7-bit ASCII and VT100 graphic characters (including box corners) using specially arranged fixed-pitch fonts. The first 32 glyph positions (which would correspond to nonprinting control @@ -975,7 +1012,7 @@ support for DEC technical character set. These are distinct (7-bit) character sets. Xterm currently does not support this. -<H2><A NAME="scaled_font">The bold font is ugly</A></H2> +<h3><A NAME="scaled_font">The bold font is ugly</A></h3> Xterm lets you directly specify one bold font, which is assumed to correspond to the default font. Older versions of xterm make a fake bold font for the other choices @@ -996,7 +1033,7 @@ by appending ":unscaled" to the path: FontPath "/usr/lib/X11/fonts/misc/:unscaled" </code></pre> -<H2><A NAME="little_dot">I see little dots on the screen</A></H2> +<h3><A NAME="little_dot">I see little dots on the screen</A></h3> Well, I do. Perhaps you do not. It depends on the fonts you choose, and how you use them. @@ -1016,7 +1053,7 @@ For each font, it asks the font server for a corresponding bold font. Your font server may not have the bold font (or it may incorrectly report that it does). But it usually works. -<H2><A NAME="no_russian">My terminal doesn't display Cyrillic characters</A></H2> +<h3><A NAME="no_russian">My terminal doesn't display Cyrillic characters</A></h3> Cyrillic encodings typically use characters in the range 128-159. For a VT220 (or any terminal that follows ISO 6429), those are treated as control characters. @@ -1031,7 +1068,128 @@ Here is a <a href="ftp://invisible-island.net/xterm/KOI8Term">resource file</a> which I use for testing this configuration. -<H2><A NAME="no_color">My terminal doesn't recognize color</A></H2> +<h3><A NAME="utf8_fonts">I see boxes instead of characters in uxterm</A></h3> +xterm may show boxes instead of characters if the font that you have +selected does not contain those characters. +Normally you can fix most of that using the UTF-8 feature, with <code>uxterm</code>. +However, your X resource settings may be the source of the problem. +<p> +One pitfall to setting X resources is that they allow you to specify wildcards, +e.g., the "*" character. +When you give a wildcard, the X resource matches any number of levels in +the widget hierarchy. +<p> +xterm has more than one widget matching "font" at different levels of the +hierarchy. +There are the popup menus, and there are the fonts used for <code>uxterm</code>. +The latter is where an overbroad pattern can cause xterm to use a different +font than you expect. +<p> +Suppose your resource setting includes this pattern +<pre> +*VT100*font: fixed +</pre> +It could be interpreted as this: +<pre> +*VT100.font: fixed +*VT100.utf8Fonts.font: fixed +</pre> +xterm uses the <code>utf8Fonts</code> subresources to provide +runtime-switchable fonts between IS0-8859-1 (Latin-1) and ISO-10646 (Unicode). +Modifying the Unicode font to "fixed" will make most of the characters +unavailable (i.e., shown as boxes). +If instead your resource looks like +<pre> +*VT100.font: fixed +</pre> +it would be unambiguous, and not modify the <code>utf8Fonts</code> value. + +<h3><A NAME="slow_menus">The first popup menu is very slow</A></h3> +Some users report that when starting xterm, +it is very slow, +that their computer's CPU time increases, etc. +<p> +This is a longstanding bug in the X libraries. +There is a workaround using a resource setting for xterm. + +<h4>Details</h4> +xterm uses the Athena (Xaw) widgets to display popup menus. +In the normal case, those are initialized one-by-one as they are first used. +If you have configured xterm to use its toolbar configuration, +they are all initialized on startup. +In the latter, performance problems are more noticeable. +<p> +The Athena widgets <code>XawInitializeWidgetSet</code> function goes +through several levels down to +the X library <code>_XlcAddUtf8LocaleConverters</code> function +to call <code>create_tocs_conv</code> and related functions to make a list of +character sets from the locale, +which is used in menus to get all possible fonts needed for a fontset. +<p> +If your current locale uses <em>UTF-8</em> encoding, +this will read a long list of bitmap fonts—everything whose +<em>encoding</em> might be useful for displaying the menus. +For example, this list (from <code>lcUTF8.c</code>) +which dates from around 2000 is the core of the problem: +<blockquote> +ISO10646-1, +ISO8859-1, +ISO8859-2, +ISO8859-3, +ISO8859-4, +ISO8859-5, +ISO8859-6, +ISO8859-7, +ISO8859-8, +ISO8859-9, +ISO8859-10, +ISO8859-11, +ISO8859-13, +ISO8859-14, +ISO8859-15, +ISO8859-16, +JISX0201.1976-0, +TIS620-0, +GB2312.1980-0, +JISX0208.1983-0, +JISX0208.1990-0, +JISX0212.1990-0, +KSC5601.1987-0, +KOI8-R, +KOI8-U, +KOI8-C, +TATAR-CYR, +ARMSCII-8, +IBM-CP1133, +MULELAO-1, +VISCII1.1-1, +TCVN-5712, +GEORGIAN-ACADEMY, +GEORGIAN-PS, +ISO8859-9E, +MICROSOFT-CP1251, +MICROSOFT-CP1255, +MICROSOFT-CP1256, +BIG5-0, +BIG5-E0, +BIG5-E1, +ISO10646-1, +ISO10646-1 +</blockquote> +<p> +However, xterm is going to use only the characters shown in the popup menus. +It is unlikely that you need Chinese fonts for that. + +<h4>Solution</h4> +xterm's <code>menuLocale</code> resource can be set to an explicit +value, e.g., "C" to override the current locale as seen by this +initialization debacle. + +<h4>Limitations</h4> +The workaround does not prevent some hacker from "improving" the X libraries +still further. + +<h3><A NAME="no_color">My terminal doesn't recognize color</A></h3> First, ensure that you have set up xterm to render color. The XFree86 xterm renders color only if you have set resources to do this; the default behavior is monochrome to maintain compatibility @@ -1051,7 +1209,7 @@ Finally, some applications (that do not interface properly with terminfo or termcap) may need the environment variable <a href="../ncurses/ncurses.faq.html#no_colorterm">$COLORTERM</a> to be set. -<H2><A NAME="setup_resize">Why is my screen size not set?</A></H2> +<h3><A NAME="setup_resize">Why is my screen size not set?</A></h3> Well, it may be set, but not correctly. You may notice these symptoms: <ul> <li>When editing with vi, you cannot see the beginning of the file, or @@ -1098,7 +1256,7 @@ perhaps because someone liked it that way. Real VT100's are 24 lines. I once used (and wrote applications for) a Bitgraph terminal, which emulated VT100, but displayed 65 lines. -<H2><A NAME="xterm_pageup">Why can't I use the pageup/pagedown keys?</A></H2> +<h3><A NAME="xterm_pageup">Why can't I use the pageup/pagedown keys?</A></h3> Some vendors, e.g,. Sun, have added key translations which make the pageup and pagedown keys talk to the xterm's scrollbar instead of your application. @@ -1156,7 +1314,7 @@ For example, a more-specific pattern for the resource name lets you override: makes the home/end and pageup/pagedown keys usable by your editor, while leaving their shifted equivalents available for the scrollbar. -<H2><A NAME="xterm_pc_style">Why can't I use the home/end keys?</A></H2> +<h3><A NAME="xterm_pc_style">Why can't I use the home/end keys?</A></h3> This is a long story, unless you are referring to X Consortium <A HREF="#bug_xterm_r6">xterm</A>. That program is simply broken in this respect. @@ -1265,11 +1423,11 @@ the app-defaults file, I see that it sets which would not affect the home/end keys. (The color resources are redundant, so that is not a problem either). </ul> -<a href="XTerm-debian-88c">Here is a resource file</a> +<a href="http://invisible-island.net/xterm/XTerm-debian-88c">Here is a resource file</a> which I tested with xterm-88c, xterm-149 and xterm-158, using $TERM set to xterm-debian. -<H2><A NAME="xterm_arrows">Why can't I use the cursor keys in (whatever) shell?</A></H2> +<h3><A NAME="xterm_arrows">Why can't I use the cursor keys in (whatever) shell?</A></h3> VTxxx (VT100 and up) terminals may send different escape sequences for the cursor (arrow) keys depending on how they are set up. The choices are referred to as the normal and application modes. @@ -1308,14 +1466,51 @@ Terminfo entries are written assuming that the application has initialized the terminal using the <code>smkx</code> string before it is able to match the codes given for the cursor or keypad keys. -<H2><A NAME="xterm_paste">Why can't I cut/paste in xterm?</A></H2> +<h3><A NAME="xterm_paste">Why can't I cut/paste in xterm?</A></h3> When an application sets xterm to any of its mouse tracking modes, it reserves the unshifted mouse button clicks for the application's use. Unless you have modified the treatment of the shifted mouse button events (e.g., with your window manager), you can always do cut/paste by pressing the shift key while clicking with the mouse. -<H2><A NAME="no_libpath">Why does $LD_LIBRARY_PATH get reset?</A></H2> +<h3><A NAME="xterm_tabs">Why can't I select tabs in xterm?</A></h3> +This issue was noted early on, <a href="#known_bugs">here</a> in 1997. +<p> +xterm is copying from the screen, which stores only printable characters. +That includes spaces and line-drawing characters. +But tabs are special; they are used for more than one purpose. +<p> +If the screen is cleared in some part, that stores nulls. +Cursor addressing does not fill in nulls as it jumps around, +though xterm does supply blanks for the most useful cases, +especially when getting data for a selection. +<p> +Full-screen programs such as text-editors tend to write in random fashion, +and generally do not print nulls to the screen. +Curses on the other hand, may supply tabs where you thought there were none. +Also, the terminal driver can expand tabs (and often is set to do this by default). +<p> +So the whole thing is unreliable: +unless you make special arrangements for +each of the programs running inside xterm, +you would often get a tab when you expect, and vice versa. +<p> +For the special case where your expectations would match the available +data, it is solvable. +There are basically two ways it could be done: +<ul> +<li>set a bit in each cell's data which says it was skipped +over via a tab. +The complication is that xterm is using all of the flag bits in each cell. +<li>store literal tabs and nulls to be interpreted later – both by the +display and the selection logic. +</ul> +As of 2010, a few other terminals do implement this feature. +But the reason that it's been low-priority is that it's +of very limited usefulness when copying between terminal sessions +(and for that matter, from other clients). + +<h3><A NAME="no_libpath">Why does $LD_LIBRARY_PATH get reset?</A></h3> If xterm is running setuid (which is needed on some systems which have no wrappers for opening pty's and updating utmp), newer systems automatically set or reset environment variables which are considered security problems. @@ -1335,7 +1530,7 @@ environment. Modern Unix systems (such as recent Solaris and HPUX versions) do not require you to run xterm setuid. Some will result in odd malfunctions if you do this. -<H2><A NAME="no_ls_and_e">Why do the -e and -ls options not work together?</A></H2> +<h3><A NAME="no_ls_and_e">Why do the -e and -ls options not work together?</A></h3> Xterm has two useful options for controlling the shell that is run: <dl> <dt>-e @@ -1351,7 +1546,7 @@ whatever reason will fall through to the <code>-ls</code> option. It cannot (in general) combine the two, since some shells permit this (e.g., bash), and others do not (e.g., tcsh). -<H2><A NAME="no_termcap">I need /etc/termcap</A></H2> +<h3><A NAME="no_termcap">I need /etc/termcap</A></h3> If you have a termcap version of xterm on a system with no termcap libraries, you may also be missing /etc/termcap. <P> @@ -1363,7 +1558,7 @@ If xterm cannot find the terminal description, it will accept that, though it will print a warning. If xterm does not find the termcap entry, it will not set the $TERMCAP variable. -<H2><A NAME="no_ptys">Xterm does not run (no available pty's)</A></H2> +<h3><A NAME="no_ptys">Xterm does not run (no available pty's)</A></h3> Your copy of xterm may not have enough permissions to use existing pty's: <ul> <li>you may have to make xterm run setuid to root @@ -1391,7 +1586,7 @@ numbers of the pty's may have changed during a kernel upgrade. <p> See also the MAKEDEV script, which usually exists under /dev. -<H2><A NAME="xterm_hilite">Reverse video is not reset</A></H2> +<h3><A NAME="xterm_hilite">Reverse video is not reset</A></h3> When running <em>less</em> or other programs that do highlighting, you see the highlighting not turned off properly. <P> @@ -1411,9 +1606,9 @@ and set the <code>termName</code> resource accordingly in the app-defaults file for the system which has the newer xterm. <p> -However - see <a href="#xterm_terminfo">below</a>. +However – see <a href="#xterm_terminfo">below</a>. -<H2><A NAME="vim_16colors">My colors changed in vim</A></H2> +<h3><A NAME="vim_16colors">My colors changed in vim</A></h3> Some <code>vim</code> users may notice their colors change after updating to <a href="xterm.log.html#xterm_238">patch 238</a>. Before, some text would display in a dark color using a bold font. @@ -1444,7 +1639,38 @@ vim uses the bold attribute to simulate colors 8-15. Changing the color scheme to use bold where it is wanted will make the colors work as before – and work consistently with other terminals. -<H2><A NAME="xterm_terminfo">What $TERM should I use?</A></H2> +<h3><A NAME="grep_colors">"grep --color" does not show the right output</A></h3> +GNU grep (version 2.5) introduced a <code>--color</code> option. +<p> +It does this for each highlighted match: +<ol> +<li>it writes the text up to (not including the match) +<li>it writes an ANSI color control control sequence +<li>it writes the matched text +<li>it writes a control sequence to clear to the end of the line +<li>it writes an ANSI control sequence to reset graphic rendition. +<li>repeat this process until the entire line is written. +</ol> +<p> +One problem is in the second and fourth steps. +If the preceding text brought us up to the last column, +then xterm (and any VT100-compatible terminal) is waiting for +graphic text to wrap to the next line. +Any controls would take effect on the current column position. +Newlines are ignored while in this state. +<p> +However, if xterm gets a control sequence while waiting to wrap to the +next line, it will update the screen according to that control. +Then it is ready to accept more data. +But at this point, it is no longer waiting to wrap; +the special case is for newline versus graphic characters. +For instance, backspacing clears the state +(<A HREF="../vttest/vttest.html">vttest</A> illustrates this). +So the data starts to write at the current column (the last one on the line), +rather than at the beginning of the next line. +In that case, grep's output will not look right. + +<h3><A NAME="xterm_terminfo">What $TERM should I use?</A></h3> <p> The <code>xterm-color</code> value for $TERM is a bad choice for XFree86 xterm because it is @@ -1452,9 +1678,14 @@ commonly used for a terminfo entry which happens to not support <code>bce</code> Complicating matters, FreeBSD (after dithering for a few years on the matter) introduced a bastardized version which implies the opposite sense of <code>bce</code>, (because it uses SGR 39 and 49), but does not set it. -The most recent version -provides the <code>xterm-xfree86</code> entry which is distributed with -XFree86 xterm (which corresponds to the one distributed with ncurses). +After lengthy discussion, +FreeBSD began using the terminal descriptions which I've written. +<p> +The most recent XFree86 version's terminal description corresponds to +<code>xterm-xfree86</code> (also distributed with ncurses). +I have continued to make changes; +the most recent version is simply named +<code>xterm-new</code> (also distributed with ncurses). <p> The term "<code>bce</code>" stands for "back color erase". Terminals such as XFree86 xterm @@ -1468,7 +1699,7 @@ screen in a single color are more efficient on terminals that support back color erase. <p> Curses libraries that support color know about <code>bce</code> and do the -right thing - provided that you tell them what the terminal does. +right thing – provided that you tell them what the terminal does. That is the whole point of setting $TERM. The "xterm-color" description distributed with ncurses does not list <code>bce</code>, because it was applied originally to a terminal type @@ -1477,8 +1708,8 @@ not implement back color erase. It will "work" for XFree86 xterm, though less efficient. Some other applications such as the slang library have hardcoded support for terminals that implement back color erase. -Given the "xterm-color" description, those will be efficient - and -fortuitously work. However, slang (through version 1.4.0) does not +Given the "xterm-color" description, those will be efficient – and +fortuitously work. However, slang (through version 1.4.0) did not work properly for the terminals that xterm-color was designed for. See this <a href="../lynx/lynx-ncurses.html">page</a> for an example of (n)curses and slang running on dtterm. @@ -1498,7 +1729,7 @@ However, it does not match any xterm in current use. (Apparently it was written for an obsolete version on Unixware). The colors work, true, but the mouse will not, nor will the function keys. -<H2><A NAME="xterm_resize">FVWM does weird things when I try to resize xterm</A></H2> +<h3><A NAME="xterm_resize">FVWM does weird things when I try to resize xterm</A></h3> I have an old (3.1.2G) bug report for xterm which may be related to the second (3.9s) problem: <ul> @@ -1536,7 +1767,16 @@ Olvm, olvwm and twm all behave correctly so it may be a fvwm problem. </ul> I have not observed the first, but have reproduced the second. -<H2><A NAME="xterm_tite">Why doesn't the screen clear when running vi?</A></H2> +<h3><A NAME="xterm_tite">Why doesn't the screen clear when running vi?</A></h3> +This refers to the "alternate screen" feature, +which has been used in its termcap file since 1988. +On various systems, this feature may have been removed, +although it has always been in the xterm sources. +<p> +The feature is controllable (it can be enabled or disabled). +However, as it was originally conceived, that ability to control +it applies only to programs using termcap. +<p> Under SunOS 4.x, the termcap description for xterm embeds in the <code>ti</code> and <code>te</code> capabilities a command to switch to xterm's alternate screen (e.g., while running <code>vi</code>), and return @@ -1549,7 +1789,7 @@ There are corresponding terminfo symbols for <code>ti</code> and <code>te</code>: <code>smcup</code> and <code>rmcup</code>, respectively. <P> -This is configurable. +This is configurable... <p> For example (from Bjorn Helgaas <helg...@dhc.net>) this procedure adds these capabilities to the "xterm" @@ -1595,13 +1835,20 @@ as two control sequences that can be disabled by <code>titeInhibit</code>. The 1049 code is a refinement of 1047 and 1048, clearing the alternate screen before switching to it rather than after switching back to the normal screen. -This allows you (with a popup menu entry designed to exploit this behavior) to +Since <a href="xterm.log.html#xterm_90">patch #90 in 1998</a> +xterm allows you (with a popup menu entry designed to exploit this behavior) to switch the display back to the alternate screen to select text from it, to paste into the normal screen. You can also set or clear the <code>titeInhibit</code> resource using another popup menu entry (<code>Enable Alternate Screen Switching</code>). +<p> +Most other terminal emulators implement only half of the feature. +They recognize the control sequence, but do not provide the ability to +change it at runtime, e.g., using a menu entry. +Like any other half-done implementation, that is a bug which should be +reported to the developers of those programs. -<H2><A NAME="xterm_vite">Why is the cursor misplaced after running vi?</A></H2> +<h3><A NAME="xterm_vite">Why is the cursor misplaced after running vi?</A></h3> Vi and other full-screen applications use the termcap <code>ti/te</code> (terminfo <code>smcup/rmcup</code>) strings to initiate and end cursor addressing mode. As mentioned in the discussion of <A HREF="#xterm_tite">titeInhibit</A>, @@ -1626,7 +1873,7 @@ changes the behavior of the cursor save/restore operations so they apply only to the current screen. That makes it less likely to misplace your cursor. -<H2><A NAME="narrowproto">Why doesn't the scrollbar work?</A></H2> +<h3><A NAME="narrowproto">Why doesn't the scrollbar work?</A></h3> Originally xterm was built using imake rather than a configure script. One feature of imake that is not possible to guess within the configure script is the wide-prototype compile-time definition @@ -1644,7 +1891,39 @@ For instance configure --disable-imake --disable-narrowproto </code></pre> -<H2><A NAME="xterm_erase">Why doesn't my delete key work?</A></H2> +<h3><A NAME="window_ops">Why can't my program read the window title?</A></h3> +The longstanding control sequence for reading the window title is something +that can be abused in special conditions. +For novice (unknowledgable) users, this can be a problem. +<p> +xterm provides resource-settings and menu entries to allow this and related +features to be enabled or disabled. +See for example <code>allowWindowOps</code> +The default resource settings in xterm can be overridden by a packager. +However, a knowledgable user can override those default settings. +<p> +It is also possible that an overzealous packager may have crippled +xterm by removing the functionality altogether. +(That should be reported as a bug, to me). +<p> +For instance, one of those sent me a "security fix" some years ago, +which deleted most of the control sequences which return data to the host. +It broke the <code>resize</code> program, and selection, among other uses +considered to be benign. In contrast, the same features used in other +terminal emulators are tolerated by the same people, so rather than being +a misguided attempt at fixing security issues, patches such as +that appear to be an attempt at harassment. + +<h3><A NAME="window_ops2">Why can't my program set the window size?</A></h3> +Some overzealous packagers, +perhaps influenced by the demonstration I provided, +are protecting you against the possibility of your xterm becoming inaccessible. +(That's unlikely...). +<p> +You should be able to override it, as noted above via resource settings +or menu entry ("Allow Window Ops"). + +<h3><A NAME="xterm_erase">Why doesn't my delete key work?</A></h3> This seems to be a problem with the older XFree86 release (3.1.2). I have picked up pieces of the story (xterm and the keyboard work as designed under XFree86 3.2 and up). @@ -1683,7 +1962,7 @@ depending on the pseudo terminal's sense, or based on the termcap setting of <em>kbs</em> (backspace key). This feature is controlled by the resource setting <em>ptyInitialErase</em>. -<H2><A NAME="xterm_erased">Why did my delete key stop working?</A></H2> +<h3><A NAME="xterm_erased">Why did my delete key stop working?</A></h3> Well, something changed. You have to determine what did. <p> @@ -1729,7 +2008,7 @@ as <code>stty erase</code>. As a matter of fact, <code>stty erase</code> has to be a single character, so <escape>[3~ would not work anyway. -<H2><A NAME="xterm_xmodmap">Well, how can I set my delete key?</A></H2> +<h3><A NAME="xterm_xmodmap">Well, how can I set my delete key?</A></h3> When people first started asking this question in 1995-1996, it appeared in the context of making Netscape work. Netscape's use of the delete key running in X did not match user's expectations @@ -1742,7 +2021,7 @@ or <pre><code> keycode 22 = 0xff08 </code></pre> -Either way is a bad technical solution - it works for some people +Either way is a bad technical solution – it works for some people but not others (on my keyboard at work, keycode 22 is the numeric keypad '9'). <p> @@ -1760,7 +2039,7 @@ some use termcap or terminfo, and some are hardcoded. So I prefer to be able to switch the xterm's keyboard at runtime. You cannot do that with resources. -(Or not really - xterm has a <code>keymap()</code> action which could +(Or not really – xterm has a <code>keymap()</code> action which could support this if you provided a rather complex resource settings, but the X library support for that is broken in X11R6). Instead, I have added to XFree86 a set of resources (and popup menu entries) @@ -1773,7 +2052,7 @@ See the manual page for as well as <code>sunKeyboard</code>. -<H2><A NAME="xterm_keypad">Why doesn't my keypad work?</A></H2> +<h3><A NAME="xterm_keypad">Why doesn't my keypad work?</A></h3> A few people have commented that the keypad does not work properly. Aside from bugs (I have fixed a few), the most common problem seems to be misconception. @@ -1849,10 +2128,10 @@ Other arrangements of the keyboard are possible of course. If you prefer to use the top row of the numeric keypad as PF1 through PF4, you should do this using xterm's X resources. -<H2><A NAME="xterm_8bits">Why can't I input 8-bit characters?</A></H2> +<h3><A NAME="xterm_8bits">Why can't I input 8-bit characters?</A></h3> You must have the <code>eightBitInput</code> resource set to do this. -<H2><A NAME="my_xdefaults">My .Xdefaults for XTERM</A></H2> +<h3><A NAME="my_xdefaults">My .Xdefaults for XTERM</A></h3> <PRE><code> XTerm*internalBorder: 10 XTerm*highlightSelection: true @@ -1910,7 +2189,7 @@ add the following line to your <code>.Xdefaults</code> file: *customization: -color </code></PRE> -<H2><A NAME="tiny_menus">Why are the menus tiny?</A></H2> +<h3><A NAME="tiny_menus">Why are the menus tiny?</A></h3> Everything seems to work, except that the xterm menus (VT options, fonts, etc.) do not display properly; the menus pop up, but only with a tiny display @@ -1935,7 +2214,7 @@ widget hierarchy): XTerm*VT100.geometry: 80x24 </code></PRE> -<H2><A NAME="warning_msg">What is this warning message?</A></H2> +<h3><A NAME="warning_msg">What is this warning message?</A></h3> <DL> <DT>xterm: Error 11, errno 22: permission denied <DD>Actually, any message like this denotes a failure which requires @@ -2018,7 +2297,7 @@ initialization to determine how to display the cursor. If none of those colors can be allocated, XFree86 xterm reverts to monochrome. </DL> -<H2><A NAME="known_bugs">Known Bugs in XTERM</A></H2><P> +<h3><A NAME="known_bugs">Known Bugs in XTERM</A></h3><P> These are the known bugs (or limitations) in the XFree86 xterm. They are also present in the other versions based on the X Consortium sources (color_xterm, ansi_xterm, kterm). @@ -2032,13 +2311,14 @@ Technically, not implementing <code>bce</code> (or allowing the choice between it and its complement) is not a bug, since few hardware terminals (with good reason) implemented this feature. <UL> -<LI>cut/paste does not select tabs; instead spaces are selected. +<LI>cut/paste does not <a href="#xterm_tabs">select tabs</a>; +instead spaces are selected. This is because the selection works from the array of displayed characters, on which tab/space conversion has already been performed. <LI>does not implement the autorepeat feature of VTxxx terminals. </UL> -<H3><A NAME="bug_xterm_r6">X11R6.3 XTERM</A></H3> +<h4><A NAME="bug_xterm_r6">X11R6.3 XTERM</A></h4> The X Consortium version of xterm (and versions based on it) has additional bugs not in XFree86 xterm: <UL> @@ -2059,18 +2339,20 @@ does not check the event class before attempting to use events. <p> Update 2004/04/08: <br> -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1olfg3-00053x...@alioth.debian.org