4 ms·
I would say there is no bug in whiptail. Whiptail honors the capabilities it is told via TERM your terminal supports. Setting TERM=xterm, which has 8 color supp
by tssva 4y ago
I would say there is no bug in whiptail. Whiptail honors the capabilities it is told via TERM your terminal supports. Setting TERM=xterm, which has 8 color support, and then not supporting color is a bug on your part. If you are going to force xterm to mono you need to set your TERM=xterm-mono which whiptail will honor and there is no issue.
- teddyh 4y agoI 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.