-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blinking characters #47
Comments
@trosendal , I strongly suspect this is caused by an attempt by libcaca to emulate 16 colors on a 8 color terminal. It does this by setting the A_BOLD and A_BLINK attributes when the terminal says it only supports the standard 8 colors in order to emulate a 16 color palette. As the author of a terminal emulator, I was just getting ready to write up this very issue. @samhocevar , while the strategy may work on some terminals, it definitely does not on others. instead, the cell blinks (as it actually should). |
@TragicWarrior I'm not sure how to affect the available colors in a terminal. When I view the above |
@trosendal , I don't have any experience with docker--I use lxc instead. My suspicion is that docker alters your environment variables TERM and COLORTERM. The TERM var is the most important. That is what ncurses reads at startup to determine how many colors are available. On most modern systems, these are set as follows:
Once you know what TERM is set to you can query the terminfo database to see what ncurses is likely going to think you should have: (using my string above from my environment)
So on my xfce4 terminal, it supports 0x100 colors (256) which cause libcaca to initialize the 8 standard colors plus the 8 extended colors. At startup libcaca reads the ncurses COLORS variable--which is almost always based on ncurses reading the terminfo db. If the value of COLORS is < 16 then libcaca tries to emulate 16 colors by setting A_BOLD and A_BLINK on the standard 8 colors. This works in some cases. In others, it simply causes the affected cell to blink (which I would argue is the correct behavior). IMO, libcaca should not try to emulate 16 colors using this well-known, but unreliable trick. |
@trosendal , It seems that the author is aware of the incompatibilty caused by this approach (emulating 16 colors). |
Unfortunately the |
@TragicWarrior is correct that this is apparently due to the 8 colour terminal. So I understand you want to fix it by scaling your colours to only those available in the current terminal, but for me it is fixed by just expanding my colours to 256. In line with my first test case, the following causes blinking:
But this does not:
|
I have the same problem! |
This happens for me using all the docker fedora examples above with and without setting FWIW I am using iTerm2 on the Mac to do the docker tests and the Contrary to speculation above, I can't conclude it's simply a matter of setting |
This issue also appears here: (ranger/ranger#1407) with a nice example. It can be reproduced in docker as follows. Start a docker from the official fedora 30 image:
Then inside the running docker:
The characters in the cat's ears are blinking
The text was updated successfully, but these errors were encountered: