bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ought putty-256color use xterm-256color rather than 256setaf?


From: Thomas Dickey
Subject: Re: ought putty-256color use xterm-256color rather than 256setaf?
Date: Sat, 16 Jan 2021 20:32:12 -0500
User-agent: Mutt/1.10.1 (2018-07-13)

On Sat, Jan 16, 2021 at 07:05:41PM -0500, Nick Black wrote:
> I was debugging a user's bug report regarding PuTTY 0.74 on
> Debian Unstable [0]. The TERM environment variable was defined
> to "putty-256color". Under this configuration, `ccc` is not
> exported, despite PuTTY seemingly supporting `ccc` (both by
> claim and by my testing).
> 
> This seems due to putty-256color inheriting from xterm+256setaf,
> which does not support initc/ccc. I assumed this was an error,
> but consulting the release notes suggests that this was done
> purposefully 2014-03-30 in a patch by Sven Zühlsdorf. I traced
> this to a 2014-03-26 mail to bug-ncurses@:

No version of putty (I just checked 0.74) has passed the test which I use:

        256colors2.pl

(reversing the palette, of course, with the "-r" option).
 
>   https://lists.gnu.org/archive/html/bug-ncurses/2014-03/msg00019.html
> 
> I'm unsure whether PuTTY did indeed lack support for ccc in 2014
> (no version number is reported in the mail) [1], but my testing

That was probably 0.63

> seems to confirm that it does support it now. Might it be
> reasonable to subclass from "xterm-256color" or some other
> database entry?

not until I see it working :-)
 
> Actually, I just found [2], which suggests that Mr. Dickey is
> aware of PuTTY's ability to change the palette in response
> to Linux console-style palette controls. So perhaps I'm just

well... the Linux console-style palette controls are supposedly just
for colors 0 through 15.  I know about that from reading source code.

There's no documentation for any of putty's control sequences,
but the relevant feature in Linux console_codes(4) manual page
says this:

       ESC ]     OSC      (Should  be: Operating system command) ESC ] P nr‐
                          rggbb: set palette,  with  parameter  given  in  7
                          hexadecimal  digits after the final P :-(.  Here n
                          is the color  (0–15),  and  rrggbb  indicates  the
                          red/green/blue  values  (0–255).   ESC  ] R: reset
                          palette

which precludes the notion that it might support 256 colors.

> missing something regarding terminfo internals? My apologies if
> this bug report is invalid.

hmm - I could digress on terminal developers who won't document
or provide an accurate terminal description...
 
> --rigorously, nick
> 
> [0] https://github.com/dankamongmen/notcurses/issues/1295
> [1] Thomas Dickey's response on
>     
> https://stackoverflow.com/questions/47686906/ncurses-init-color-has-no-effect
>     would seem to suggest that PuTTY lacked initc/ccc support
>     as late as 2017-12-07
> [2] 
> https://stackoverflow.com/questions/64867745/how-to-dynamically-change-text-color-in-a-linux-terminal-using-putty
>     Quite recent, 2020-11-17.
> 
> -- 
> nick black -=- https://www.nick-black.com
> to make an apple pie from scratch,
> you need first invent a universe.



-- 
Thomas E. Dickey <dickey@invisible-island.net>
https://invisible-island.net
ftp://ftp.invisible-island.net

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]