Comment 30 for bug 730672

Revision history for this message
In , Dustin (dustin-redhat-bugs) wrote :

Created attachment 486874
Make newt's system-wide palette configurable at run time

Hello,

We are carrying a small patch in Ubuntu that makes Newt's default color palette configurable, by optionally placing a configuration file at /etc/newt/palette.

If no file exists at that path, then newt's operation proceeds as normal.

If, on the other hand, a file does exist at that admin-owned location, a list of color values is read from that file and overloaded into the newtColors struct and set with newtSetColors().

I've tested it pretty well and seems to work quite nicely here.

For testing purposes, you can use these two sets of contents for your /etc/newt/palette values. The contents of the file is expected to contain newt's color keywords, all on a single line, comma-separate, no whitespace, and a total of 44 values. For example:

original:
white,blue,black,lightgray,black,lightgray,white,black,red,lightgray,lightgray,red,red,lightgray,lightgray,blue,lightgray,red,lightgray,blue,blue,lightgray,black,lightgray,lightgray,blue,black,lightgray,lightgray,red,white,blue,lightgray,blue,blue,red,blue,lightgray,black,lightgray,lightgray,red,black,brown

ubuntu:
white,magenta,black,lightgray,black,lightgray,white,black,red,lightgray,lightgray,red,red,lightgray,lightgray,magenta,lightgray,red,lightgray,magenta,magenta,lightgray,black,lightgray,lightgray,magenta,black,lightgray,lightgray,red,white,magenta,lightgray,magenta,magenta,red,magenta,lightgray,black,lightgray,lightgray,red,black,brown

Please consider committing this patch against your upstream newt branch. Thanks.

Signed-off-by:
Dustin Kirkland <email address hidden>