Summary: | app-misc/screen with 'term screen-256color' treats colors wrong | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Lukas Schneiderbauer <lukas.schneiderbauer> |
Component: | Current packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | martin |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
color testing script
screenshot of script-output in plain konsole screenshot of script-output in konsole + screen screenshot of eix-diff in plain konsole screenshot of eix-diff in konsole + screen without 256colors screenshot of eix-diff in konsole + screen with 256colors |
Description
Lukas Schneiderbauer
2012-10-21 15:30:05 UTC
Created attachment 327060 [details]
color testing script
Created attachment 327062 [details]
screenshot of script-output in plain konsole
all good in a plain kde-base/konsole session.
Created attachment 327064 [details]
screenshot of script-output in konsole + screen
The colors appear as screen would not have 256color support enabled. (although it definitely changes something. see the eix-diff screenshots)
Created attachment 327066 [details]
screenshot of eix-diff in plain konsole
for reference
Created attachment 327068 [details]
screenshot of eix-diff in konsole + screen without 256colors
the line 'term screen-256color' is disabled here. The colors are different here but that's okay I suppose.
Created attachment 327070 [details]
screenshot of eix-diff in konsole + screen with 256colors
'term screen-256color' enabled here.
It looks different than the screenshot of eix-diff in plain konsole.
For most applications, the output of echo "$TERM" is relevant. If this is "screen", there is no way for an application to know whether the actually emulated terminal can display 8 or 256 colors: The terminal will "understand" 256 colors, but e.g. if screen is running on a linux console, it is attempted to "map" the 256 colors to only 8 colors which can produce unreadable results (e.g. most colors which eix uses are just mapped to "green"). For this reason, eix (and some other applications like vim) will only use a 256 color scheme if you have TERM=screen-256color (or specify it somehow explicitly in a configuration file). For eix, you can override this by setting TERM_ALT correspondingly (see the eix manpage; use eix --print TERM_ALT to see the default). Since you refer particularly to eix-diff: eix-diff had a bug in eix-0.27.1 and did not honour TERM_ALT as documented; this is fixed in >=eix-0.27.2. |