Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 924627 - sys-apps/less-643-r1: Hard to read blue color on black background and gnome-terminal
Summary: sys-apps/less-643-r1: Hard to read blue color on black background and gnome-t...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-15 10:53 UTC by Pacho Ramos
Modified: 2024-03-25 17:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
screenshot.png (304439461-24c6b0ab-3c96-413a-ab38-98c7e2126fb3.png,213.05 KB, image/png)
2024-02-15 10:53 UTC, Pacho Ramos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2024-02-15 10:53:49 UTC
Created attachment 885013 [details]
screenshot.png

Hello,

I find really hard to read some files due to less using a dark blue color for variables. I can reproduce it when gnome-terminal (3.50.1) is configured with a black background. I have tried to change the color palette, but it doesn't seem to affect less colors at all. I attach a screenshot showing the issue.

On the other hand, colors used in text console are much more readable, but I don't know how to get them used when using gnome-terminal.

I have also tried to remove pygments package (as it seems to be used by lesspipe when available), but still the same output :/
$ echo $LESSOPEN
|lesspipe %s


Thanks a lot for your help
Comment 1 Bill Binder 2024-02-27 19:35:27 UTC
The previous version, sys-apps/less-633, does not have this problem as it actually obeys the configuration:

$ lesspipe --help | grep LESSCOLOR
LESSCOLOR env     - toggle colorizing of output (no/yes/always; default: no)
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-02-27 19:37:43 UTC
lesspipe-r3.sh has:
```
                # Allow people to flip color off if they dont want it
                case ${LESSCOLOR} in
                        always)                   LESSCOLOR=2;;
                        [yY][eE][sS]|[yY]|1|true) LESSCOLOR=1;;
                        [nN][oO]|[nN]|0|false)    LESSCOLOR=0;;
                        *)                        LESSCOLOR=1;;
                esac
                if [[ ${LESSCOLOR} != "0" ]] && [[ -n ${LESSCOLORIZER=pygmentize} ]] ; then
                        # 2: Only colorize if user forces it ...
                        # 1: ... or we know less will handle raw codes -- this will
                        #    not detect -seiRM, so set LESSCOLORIZER yourself
                        if [[ ${LESSCOLOR} == "2" ]] || [[ " ${LESS} " == *" -"[rR]" "* ]] ; then
                                LESSQUIET=true ${LESSCOLORIZER} "$1"
                        fi
                fi

```
Comment 3 Pacho Ramos gentoo-dev 2024-03-03 19:33:32 UTC
The problem to me is not the colorizing or not... it is that the palette used is nearly impossible to read in gnome-terminal. On the other hand, the one used in the text console is nice... but I don't know how to use that palette... neither how can I modify it :/
Comment 4 Nick Bowler 2024-03-25 17:33:20 UTC
Explicitly setting LESSCOLOR=no works to get rid of this rainbow vomit, so the default is clearly not "no" despite the fact that lesspipe --help says the default is no.

It would be nice if it respected NO_COLOR=1 (quite a lot of programs do)

  http://no-color.org/