Closed hackerb9 closed 5 years ago
Seems to refer to hackerb9/lsix#14. It would be helpful if someone describe what the "mlterm bug" is supposed to be. Maybe it's just the default value of one of the Sixel configuration properties. As to introducing a new terminal type, this is a big issue. You cannot suppose a new type to appear in a lot of terminfo databases soon, and you would seriously impede interoparability with (remote login to) older systems, permanently. That's why few terminal emulators go that way and most actually refer to xterm. And in fact mintty is compatible to xterm as far as properties are described via terminfo. If there is a gap, it's a bug that I'll handle.
The sixel scrolling mode bug was going to be my next bug report, but I wanted to double check with some friends who have real DEC VT terminals to make sure what I was about to say was correct. I was going to let you know that the DEC documentation states that, while the VT125 and VT240 both defaulted to displaying images in the top left corner, that behavior is a deviation from the standard. The VT330 and VT340 are better models for how SIXEL is supposed to work. It also happens to be the way that XTerm works.
Thank you for fixing the bug before I even reported it.
As for changing the TERM type to "mintty", that is not something that would happen all at once. Yes, doing it immediately would break many things. First, lay the groundwork by getting a "mintty" entry added to Terminfo. Once a preponderance of systems know about "mintty", which may be years later, then you can safely change the TERM environment variable.
If that seems like too much work, perhaps it would be better to fake the name of a moribund system, such as vt420
. The XTerm project is still alive and well. While MinTTY may be bug-for-bug compatible with XTerm today, it may not be tomorrow.
Thank you.
By the way, note that users on old systems where they do not have root can still update their own Terminfo database. For example, create a file called mintty.terminfo
:
mintty|MinTTY the CYGWIN terminal emulator,
use=xterm,
Then compile the terminfo entry like so:
tic mintty.terminfo
From then on, TERM=mintty
will work correctly.
The core of the sixel scrolling bug is the mapping from DECSET 80 to the behaviour. The default value (apparently changed from earlier to later DEC terminals) is a minor question, but sure, scrolling mode on is the more reasonable default.
If I were to introduce a mintty terminfo entry, it would be identical to xterm, so that would make no sense. If xterm is extended (and I am in fact reproducing such extensions as seen in the changelog), this will not affect any terminfo property.
You can configure TERM with mintty option Term
or in the Options dialog, where some options up to vt340 are available. vt420 is in fact not a good idea because mintty does not implement rectangular area functions; this is properly reported in the primary device attributes report and in the status string report (DECRQSS) for DECSCL.
If you know people who have a running (?) DEC terminal, maybe you could ask them what horizontal scrolling mode is. xterm, configured for vt420, reports to support horizontal scrolling and user windows in the primary device attributes report.
The reason for using a different TERM variable is to allow distinguishing features (or bugs) which are not part of Terminfo nor queryable via escape sequences. For example, one can detect SIXEL capability using an escape sequence, but one cannot detect whether the terminal has the scrolling bug except by checking the TERM variable. For that, my program has to check if TERM is equal to vt125
, vt240
, or mlterm
.
Also, it's just the right thing to do. If people start making assumptions about what it means to be an "xterm", that impinges on the author of XTerm.
It is not only unnecessary to pretend to be an xterm
, it is counterproductive. It can lead to a situation like USER AGENT where everyone pretends to be Mozilla and we start using adhoc solutions for distinguishing clients. That'd be a shame since, unlike USER AGENT, UNIX's Terminfo provides an easy and standardized way to specify a new terminal type that is equivalent to an earlier type. (See my previous comment for an example of defining TERM=mintty).
It also hurts nothing to start the process. MinTTY can submit a Terminfo entry now and switch the TERM variable months from now, years from now, or never. No harm done.
Users can set TERM as they like and, as I suggested in my previous comment, mintty offers a range of alternative settings in its configuration. This is not a reliable way to detect a terminal type. The only reliable way is the secondary device attributes report. Therefore I do not agree it would be the right thing to do. As about bugs, they should be fixed rather than communicated as established deviation. Or how would you otherwise adjust to TERM=mintty after mintty has fixed the sixel scrolling mode bug? You can, again, only refer to the DA report which uniquely identifies mintty as well as its version. Adding a mintty terminfo entry and never switching the default might be an option, but the terminfo database has not been actively maintained (i.e. extended) for many years already. I wouldn't even know where to submit such a change. And, as you described before, anyone can do that for themselves if that's desired.
Checking TERM is not completely reliable, true. It would help if projects like MinTTY did not pretend to be "xterm". Still, I've found it more reliable than using secondary DA.
Terminfo is continuously updated as part of ncurses. It is currently maintained by Thomas Dickey. I believe you can just send the terminfo file to bug-ncurses@gnu.org with a note saying you release copyright on that file.
If you'd like I can even send it in for you, just to get the ball rolling. Perhaps, once you see setting TERM=mintty simply working on 90% of systems, you'll change your mind about the default TERM. 😊
Released 3.0.1. Submitted terminfo entries mintty and mintty-direct to the terminfo database.
Thank you!
My program lsix has received a report that MinTTY is not drawing SIXEL graphics correctly. According to the report, part of the problem seems to be that MinTTY sets its TERM variable to "xterm", but it is not completely compatible with XTerm.
MinTTY is a popular enough program now that it no longer needs to pretend to be some other terminal. Please change the TERM variable to "mintty" and submit an entry to the Terminfo database.
Thanks!