[Bug 730672] Re: Improve Console Colors

Bug Watch Updater 730672 at bugs.launchpad.net
Fri Oct 27 16:31:50 UTC 2017


Launchpad has imported 6 comments from the remote bug at
https://bugzilla.redhat.com/show_bug.cgi?id=689903.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2011-03-22T18:34:36+00:00 Dustin 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 <kirkland at ubuntu.com>

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/21

------------------------------------------------------------------------
On 2011-05-30T12:13:09+00:00 Miroslav wrote:

Instead of requiring all 44 colors on one line I think it would be
better to specify color of each item separately. For items which are not
specified in the config the default would be used.

Something like:

root=white,black
border=,yellow

Few more things:
- the default path should be configurable in the configure script, /etc/newt/colors by default?
- perhaps it would be useful to be able to override the colors also via getenv("NEWT_COLORS"), e.g. NEWT_COLORS=root=white,black:border=,yellow

I can look into it if you want.

Thanks.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/30

------------------------------------------------------------------------
On 2011-05-31T18:01:39+00:00 Dustin wrote:

Awesome!  Thanks for the response.  I was worried this bug/patch might
have gotten dumped into the bit bucket.

Regarding the format of the file, I just went for the simplest approach,
from the perspective of reading the values in the C code.  I didn't
expect this to be something that people changed often, frequently, or on
their own.  I expected more that a distro or a packager would do this,
and probably only ever do it once or twice, so I didn't really think
about it in terms of a user-friendly interface, but instead, just as a
"functional" one.

Regarding the default path, yes, of course, that could (and should?)
very well be configurable.  /etc/newt/colors seemed to me like a simple,
straightforward, obvious default.

Regarding a "NEWT_COLORS" environment variable, that's an excellent
idea, such that the color scheme could even be modified on an
application-by-application, or process-by-process basis (rather than
system wide).

I'm concerned a little bit by the complexity of the code necessary to
process the descriptive configuration file and/or environment variable.
At this point, I would prefer for you to point me to a git branch with
your implementation of these, and I'll gladly build/test that, and port
over Ubuntu's use of this functionality to your new implementation.

Cheers,
Dustin

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/31

------------------------------------------------------------------------
On 2011-06-02T11:43:02+00:00 Miroslav wrote:

Ok, I've pushed a patch implementing that to git
(git://git.fedorahosted.org/git/newt), please let me know how it works
for you.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/32

------------------------------------------------------------------------
On 2011-06-06T14:47:05+00:00 Dustin wrote:

Awesome, thanks!  I'll get this tested...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/33

------------------------------------------------------------------------
On 2011-06-27T12:59:43+00:00 Miroslav wrote:

It is in newt-0.52.13.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/kbd/+bug/730672/comments/35


** Changed in: newt
       Status: Unknown => Fix Released

** Changed in: newt
   Importance: Unknown => Undecided

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to kbd in Ubuntu.
https://bugs.launchpad.net/bugs/730672

Title:
  Improve Console Colors

Status in Newt:
  Fix Released
Status in bogl package in Ubuntu:
  Fix Released
Status in cdebconf package in Ubuntu:
  Fix Released
Status in console-setup package in Ubuntu:
  Fix Released
Status in kbd package in Ubuntu:
  Fix Released
Status in newt package in Ubuntu:
  Fix Released
Status in rootskel package in Ubuntu:
  Fix Released
Status in bogl source package in Natty:
  Fix Released
Status in cdebconf source package in Natty:
  Fix Released
Status in console-setup source package in Natty:
  Fix Released
Status in kbd source package in Natty:
  Fix Released
Status in newt source package in Natty:
  Fix Released
Status in rootskel source package in Natty:
  Fix Released
Status in kbd package in Debian:
  Fix Released

Bug description:
  Binary package hint: kbd

  The Linux virtual terminals support 16 colors, which are configurable in:
   /sys/module/vt/parameters/default_{red,grn,blu}

  A well formed color map, cmap, can be dynamically set using the ioctl:
   ioctl(/dev/tty0, PIO_CMAP, cmap)

  It would be very Ubuntu of us to provide a program in /sbin/setvtrgb
  that dynamically modifies these colors.  Furthermore, we should
  provide a better default color palette than the standard vga one,
  allow admins to configure it, and apply it at boot.

  ------------------------------------------------------------------------

  Order of uploads:
   1) kbd -- establish the setvtrgb utility, get it in the builds, is able to set the original vga colors, but requires a text file input palette

   2) Wait for Marcus/Ivanka to supply a suitable color palette

   3)
     a) console-setup -- add the conffile for the color palette, and the upstart job that calls setvtrgb it at boot
     b) rootskel -- call setvtrgb at install boot
     c) bogl -- fix the hardcoded color palette used by d

   4)
      a) newt -- change the default newt palette to use magenta where we previously used blue

  ------------------------------------------------------------------------

  Eventually (11.10?) we should try to apply the Ubuntu fonts to the
  console as well.  Steps 12–14 are blocked waiting for the Ubuntu
  Monospace to be released and available in the archive.

   11) gfxboot-theme-ubuntu (Proportional) - bug #732854
   12) Bterm (d-i) (Monospace) -
   13) Grub2 (Monospace) - bug #729470
   14) Console-setup (Monospace) - bug #724022

To manage notifications about this bug go to:
https://bugs.launchpad.net/newt/+bug/730672/+subscriptions



More information about the foundations-bugs mailing list