3 ms·
I can seen the reasoning, but terminals can change settings dynamically from having color support to not having it (I assume that XTerm is not the only one to d
by teddyh 4y ago
I can seen the reasoning, but terminals can change settings dynamically from having color support to not having it (I assume that XTerm is not the only one to do this), and if there is an escape sequence to query this information, it would be reasonable to expect whiptail to use it. If no such dynamic query exists, then yes, whiptail has to go off what TERM is set to.
It might also be reasonable to expect XTerm to set the TERM environment variable to “xterm-mono” if started without color support.
- tinus_hn 4y agoWhiptail uses the newt widget library (which uses the slang library), if you want that kind of support it will have to be added there.
- tssva 4y agoAs stated in another replay whiptail uses the newt widget library which itself is based upon the s-lang library. The s-lang library gets the capabilities of the terminal by querying the terminfo database using the terminal name. This is the same way ncurses or most terminal based libraries work. The terminfo database does contain info regarding whether a specific terminal supports color but doesn't contain info regarding whether there is an escape sequence for that particular terminal to determine if color is turned on. Instead separate terminfo entries for color vs mono are in the database. Setting TERM to xterm when you are using xterm-mono is the error here. It fails just as setting your TERM to xterm when connected to a ADM-3A would cause things to fail.