At least in Linux, on RedHat, the provided xterm terminfo entry is buggy: for whatever reason, they use an initialization sequence via is2 capability that forces an 80-column screen (See CSI ? n l). This is a very silly thing to do. So I want to change this. I want to change it as eloquently as possible.

The terminfo database is found in /etc/terminfo (undocumented) and /usr/lib/terminfo and $HOME/.terminfo and possibly $TERMINFO and $TERMINFO_DIRS.

My choices seem to be:

  • Use infocmp xterm | perl <regexp> | tic to provide a new database and lay it in either the original file (bad idea) or in /etc/termcap/x/xterm

  • Create a new xterm entry called (e.g.) xterm-mine that uses the source capability and lay it in one of the above directories.

Do I have a third choice? Something that overrides just that one capability? A "tweak"?

  • What's wrong with using $HOME/.terminfo as a third choice? – thrig Oct 14 '16 at 15:12
  • @thrig I'm looking for a way to do this without rebuilding the whole terminfo file. – Otheus Oct 14 '16 at 20:05
  • It appears there's a use=xterm that in theory includes from xterm and lets you override (see "Similar Terminals" (in terminfo(5)) though a) I can't get it to work and b) the documentation indicates the whole other file would be duplicated, modulo the local changes, so this method if you can get it working does not sound very different from the straightforward infocmp | perl ... | tic solution. – thrig Oct 14 '16 at 21:46

You appear to have mentioned all of the possibilities. But you did not mention which terminal configuration you are using. The mention of a control sequence

     Ps = 3  -> 132 Column Mode (DECCOLM).

gives a hint.

The issue with regard to the (not new: more than 20 years old) behavior of the initialization string is almost all from PuTTY users. In spite of its using xterm for the TERM setting, PuTTY is not xterm. In contrast to xterm (which makes the corresponding menu item off by default), PuTTY enables it by default (and makes the option available only by choosing whether to allow any resizing).

Further reading:

Debian provides more bug reports related to PuTTY than Red Hat:

The point of all of this is that terminal descriptions (like other things that are used frequently) do not change often when there is a well-established way in which they are used. PuTTY's terminal description differs from xterm's in other ways because it does not implement certain features (such as line-wrapping) consistently with xterm.

Further reading (aside from the ncurse FAQ regarding TERM vs xterm):

  • Hah! I didn't mention the 3 but right you are! And 1000s of gilded 1s and 0s should be showed your way for recalling an issue which you yourself wrote about over 8 years ago. Just damn. – Otheus Oct 17 '16 at 21:09
  • 1
    no problem (some answers server to remind others) – Thomas Dickey Oct 17 '16 at 21:11
  • OK, so, you said back then that the current is2 sequence for xterm is correct because even though xterm is not (necessarily) a fixed-width terminal, the terminfo guidelines mention 80-columns and therefore that is correct? I'd like to know who introduced that sequence and when and why... I can't imagine why someone would want to force 80 columns on the xterm user. But then you're also saying that xterm's default configuration disregards this code and that the (real) xterm user must change a setting so that this code is recognized? – Otheus Oct 17 '16 at 21:13
  • And finally, that what I really ought to do is disable the putty option that allows window-reisizing? Or really that I should ask putty use the "putty" terminal type? Is that well-supported across older (RHEL5) versions of Linux? – Otheus Oct 17 '16 at 21:16
  • 1
    The terminal description detail and defaults predate any direct record I have; I can only give approximate dates based on X releases... – Thomas Dickey Oct 17 '16 at 21:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.