Menu

#920 LxTerminal contents are not always updated properly when ncurses-based program is running

open
nobody
lxterminal (81)
5
2019-03-04
2019-03-03
john
No

I noticed this problem when using DosBox with its integrated debugger. The debugger uses a ncurses-based interface which appears when the debugger-enabled DosBox is launched from terminal. Basically, the terminal contents are not always refreshed properly.

A screenshot from the debugger is attached. As we can see, the green line in the code window is not properly displayed. It should end with "(no jump)" but there's extra garbage. Also, the data window above is not consistent. The right side (data decoded as ASCII) shows characters in many locations where the left side (raw data in hexadecimal format) shows 00.

I am not sure if this a bug in LxTerminal or something else, but this did not occur when I used Xterm. I do not know if this occurs with other ncurses programs.

LxTerminal version was 0.3.2-1 on Fedora Linux 29, 64-bit. DosBox was the latest SVN version. The debugger ("heavydebug" version) was enabled by compiling it with --enable-debug=heavy

1 Attachments

Discussion

  • Egmont Koblinger

    LXTerminal can be compiled against GTK+ version 2 or 3. The terminal emulation is done by a corresponding version of VTE: for GTK+ 2 it's VTE 0.28, whereas for GTK+ 3 it's an up to date version, the latest being 0.54 currently.

    Fedora seems to use GTK+ 2 and thus VTE 0.28, as opposed to let's say Ubuntu which ships LXTerminal with GTK+ 3 and VTE 0.54.

    VTE 0.28 was released 7+ years ago, and that GTK+ 2 based branch has been abandoned since then. It's not going to receive bugfixes. All the terminal emulation work went into the GTK+ 3 based VTE which is actively being maintained, and used by apps such as gnome-terminal, xfce4-terminal, tilix, terminator... You could try one of these, I'm quite certain the bug will be gone.

    The best you can do is ask Fedora maintainers to switch to GTK+ 3, or even ask LXTerminal developers (I'm not one) to drop GTK+ 2 support and thus force the use of GTK+ 3 (although I'm afraid it's contrary to LXDE's goals). You can also compile such a version for yourself.

     
  • Egmont Koblinger

    Also note that the problem is not the extra garbage, the problem is that the green "(no jmp)" isn't positioned to its desired column.

    I guess this is because ncurses emits the REP sequence to repeat the preceding space a couple of times, while this is not understood by the terminal. A possible workaround for this is to use a terminfo definition which does not claim the terminal supports the REP capability, like older versions of TERM=xterm or TERM=xterm-256color.

     

Log in to post a comment.

MongoDB Logo MongoDB