-
Notifications
You must be signed in to change notification settings - Fork 49
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
urxvt term colors issue #21
Comments
The latest commits in the develop branch should patch up the color differences for normal exit and on SIGINT I can't get the stderr to reproduce on st, I did remove an environment variable that was being set by the library to force ncurses to use xterm-256color control sequences, that might have had something to do with it. Removing this seems to not allow ncurses to change color definitions on st, so you'd have to set the TERM variable yourself before running the program if this occurs. |
I think that the assumption you've made is right (about st, but it reflects on other terminals as well). According to this: for example After your patch, I've tested demos from devel branch, and now everything seems to work just fine with However
|
Accidentally closed issue, sorry for that. After fix: fa13145 TERM="foo" # Change $TERM to foo
./demo # executing cppurses demo
# Instead of executing (error prints -> from ncurses::initscr())
Error opening terminal: foo. # With exit code (1) Pointing that there is maybe a problem, it might be solved some other (better) way.
This solution prevents potentially undesired exit(), but on the other hand hint that there is a problem with $TERM (shown at exit) might be useful for the end user to know. INFO: Unfortunately some terminfo files are not written correctly, and that may cause coloring problems as one occurred with setenv("TERM", "xterm-256color", 1);
// or manually setting TERM variable in shell But as we already discussed, this sometimes causes those Note: In ubuntu, ncurses-dev package does not provide terminfo files, but there is package: Also I run on some color issues using Konsole (on KDE-Neon), both before and after fa13145 (similar to st colors issue).. With Unrelated
|
Thanks for the patch to handle screen initialization gracefully. It seems like this is a good solution for now, fixing all of the color issues on all terminals is a larger issue than this project tries to solve. Looks like konsole does not implement changing color definitions seen here. Though it does appear that things like htop and vim display colors correctly in konsole and st, htop uses ncurses and vim does not(as far as I know), so there must be a solution out there. Also, thank you for the link to your project! It's exciting seeing this library being used outside of my own projects :) |
Description
After executing any cppurses tui program in some terminal emulators (tested with multiple versions of
urxvt
, andst
(simple terminal)) some of the terminal colors get modified.Colors: 239-254 after end of program execution (with or without interrupt) look different.
Screenshot: terminal color test
I'm using Arch Linux
Tried with following packages:
URXVT
st - Simple Terminal
Additional info
st (Simple terminal) logs to stderr:
lxterminal
orxterm
issue described above does not occur.The text was updated successfully, but these errors were encountered: