Bugzilla – Bug 153079
yast2-ncurses shows wrong colors on rxvt-unicode
Last modified: 2006-06-13 07:08:08 UTC
yast2-ncurses displays in wrong colors when started on rxvt-unicode. It shows all black and gray colors. This is because rxvt-unicode has 88 colors in terminfo, and yast calculates the palette table wrongly. The patch to fix this problem is below.
Created attachment 69968 [details] A patch to fix the palette calculation in yast2-ncurses
Unfortunately the patch breaks the colors in konsole, xterm, and rxvt. Please try differently.
Works fine on my machine on all these terminals.
Sorry, looks like I pasted a wrong patch. The correct one is below.
Created attachment 70163 [details] The correct patch
yes, the problem with the first patch is that ::COLORS is used to initialize _colors before it is itself initialized (probably by ::init_color). so the second patch fixes that for init_colors(), but not for colors(). IMO it can still break.
OK, another fixed patch is below. (BTW, don't change to NEEDINFO. It's obviously a bug of yast-ncurses, and it's your job to fix this bug, not mine :)
Created attachment 70166 [details] yet another fix
Gabi is back. If I were the maintainer, I would like to see the patch more commented. It may solve something but it certainly makes things much more confusing.
Yes, this is my opinion too. Before the patch is applied it should be very well commented and tested. And because it is not absolutely necessary to use an rxvt-unicode terminal (an xterm is always available) I think we shouldn't change the code.