2

In some console applications my Linux server has started "stripping" certain repeating characters, affecting the user interface significantly.

Here are a few examples:

htop view with uneven columns and CPU graphs This htop view has inconsistently sized CPU graphs and inconsistent columns.

iptraf-ng view with uneven columns iptraf-ng main menu with box characters missing These iptraf-ng views show the menu box characters not being "filled out" and the columns in a live view not being even.

A few points:

  1. This only happens on PuTTY on Windows and the Cygwin (mintty) shell on Windows, confirmed. I haven't tested if it happens on Mac OS X Terminal. It does NOT happen at the local console.
  2. It does not occur if you SSH to the machine from another Linux text console.
  3. My high-level suspicion is that this has something to do with terminal types. However, another Linux server I have does not exhibit this behavior on PuTTY or Cygwin. Both of them report $TERM as being set to xterm.
  4. I've tried reinstalling ncurses on the server in question, which should have also refreshed the terminfo files, with no resolution.
  5. Both machines - both the one working fine and the one exhibiting this behavior - are using en_US.UTF-8 as the locale (the LANG variable). Both have had locale.gen executed recently.
  6. Apps exhibiting this behavior all seem to be curses-based apps. Pure terminal apps are fine.

If it is relevant, both systems are Arch Linux 64-bit, with all current patches applied.

Can someone help pinpoint/solve the is

  • Have you experimented with setting TERM to other valid terminal entries? – Kusalananda Sep 27 '17 at 14:51
  • 3
    This is caused by a recent change in terminfo denoting that TERM=xterm (and variants) support the REP (repeat previous character) escape sequence, which several other terminal emulators don't (yet), or just have added support. See e.g. bugs.kde.org/show_bug.cgi?id=384620 for details. – egmont Sep 27 '17 at 15:38
  • 1
    See unix.stackexchange.com/questions/394834 for what seems to be another question on this subject. @egmont, why not post an answer as an answer? – JdeBP Sep 28 '17 at 7:15
  • @JdeBP haha, you're right. Posting it as an answer as well... – egmont Sep 28 '17 at 12:41
3

This is triggered by a recent change in the terminfo database (part of ncurses) denoting that TERM=xterm (and variants) support the REP (repeat previous character) escape sequence, which several terminal emulators other than xterm don't (yet), or just have added / soon will add support.

See e.g. the Konsole or gnome-termial bugreports for further details.

  • This is definitely the issue. The solution seems to be setting the TERM variable to xterm-color at least for now. I'm not sure if/when Windows tools will get updated to support the change... – fdmillion Sep 28 '17 at 17:13
  • vte version 0.50.1 has just been released, it adds support for the REP escape sequence. I assume Arch Linux will update the package pretty soon. – egmont Oct 3 '17 at 20:55

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.