Ubuntu

Improve Console Colors

Reported by Dustin Kirkland  on 2011-03-07
96
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Newt
Unknown
Unknown
bogl (Ubuntu)
Wishlist
Dustin Kirkland 
Natty
Wishlist
Dustin Kirkland 
cdebconf (Ubuntu)
Medium
Dustin Kirkland 
Natty
Medium
Dustin Kirkland 
console-setup (Ubuntu)
Wishlist
Dustin Kirkland 
Natty
Wishlist
Dustin Kirkland 
kbd (Debian)
Fix Released
Unknown
kbd (Ubuntu)
Wishlist
Dustin Kirkland 
Natty
Wishlist
Dustin Kirkland 
newt (Ubuntu)
Wishlist
Dustin Kirkland 
Natty
Wishlist
Dustin Kirkland 
rootskel (Ubuntu)
Wishlist
Dustin Kirkland 
Natty
Wishlist
Dustin Kirkland 

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

summary: - Feature Request: Provide an interface to modify console colors
+ Feature Request: Improve Console Colors
Changed in console-setup (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
Changed in kbd (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
Changed in console-setup (Ubuntu):
importance: Undecided → Wishlist
Changed in kbd (Ubuntu):
importance: Undecided → Wishlist
Changed in console-setup (Ubuntu):
status: New → In Progress
Changed in kbd (Ubuntu):
status: New → Triaged
Changed in newt (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Dustin Kirkland (kirkland)
Changed in cdebconf (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Dustin Kirkland (kirkland)
Changed in rootskel (Ubuntu):
assignee: nobody → Dustin Kirkland (kirkland)
importance: Undecided → Wishlist
status: New → Triaged
visibility: public → private
Changed in bogl (Ubuntu):
status: New → Triaged
importance: Undecided → Wishlist
assignee: nobody → Dustin Kirkland (kirkland)
Changed in console-setup (Ubuntu):
status: In Progress → Triaged
Changed in kbd (Ubuntu):
status: Triaged → In Progress

Adding a well tested, well formed kbd patch. This one should be suitable for upload to Natty.

description: updated
visibility: private → public
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kbd - 1.15-1ubuntu4

---------------
kbd (1.15-1ubuntu4) natty; urgency=low

  * src/setvtrgb.c, man/man8/setvtrgb.8, COPYING, debian/rules,
    debian/copyright: LP: #730672
    - Add a 'setvtrgb' utility to configure vt/console colors
    - add to udeb (so that this can improve installer usability)
    - add to /sbin, run by root
    - update copyright statement
 -- Dustin Kirkland <email address hidden> Tue, 08 Mar 2011 15:32:10 +0000

Changed in kbd (Ubuntu):
status: In Progress → Fix Released
tags: added: patch
Paul Sladen (sladen) on 2011-03-09
description: updated
Paul Sladen (sladen) on 2011-03-09
description: updated
Mario Limonciello (superm1) wrote :

Shouldn't this need an FFe?

The font stuff is not intended for 11.04.

The color stuff is subject to UI Freeze.

description: updated
Paul Sladen (sladen) on 2011-03-10
description: updated

I have received the colors from Marcus:

1,222,57,255,0,118,44,225,128,255,0,255,0,255,0,255
1,56,181,199,111,38,181,225,128,0,255,255,0,0,255,255
1,43,74,6,184,113,233,225,128,0,0,0,255,255,255,255

Current screenshot attached.

Changed in console-setup (Ubuntu):
status: Triaged → In Progress
Dustin Kirkland  (kirkland) wrote :

Patch for the console-setup portion attached.

Changed in rootskel (Ubuntu):
status: Triaged → In Progress
Changed in bogl (Ubuntu):
status: Triaged → In Progress
Dustin Kirkland  (kirkland) wrote :
Dustin Kirkland  (kirkland) wrote :
Dustin Kirkland  (kirkland) wrote :

Dustin, are there bright and dim versions? It's not clear from the
screenshot.

This bug was fixed in the package console-setup - 1.57ubuntu11

---------------
console-setup (1.57ubuntu11) natty; urgency=low

  * Address console-setup portion of LP: #730672, by installing
    the conffile and applying it at upstart
    - debian/vtrgb: Ubuntu's virtual terminal color scheme
    - debian/console-setup.setvtrgb.upstart: run setvtrgb during upstart
 -- Dustin Kirkland <email address hidden> Thu, 17 Mar 2011 17:10:50 -0500

Changed in console-setup (Ubuntu):
status: In Progress → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package rootskel - 1.93ubuntu3

---------------
rootskel (1.93ubuntu3) natty; urgency=low

  * src/lib/debian-installer.d/S30term: apply the configurable console
    colors in the d-i virtual terminals, LP: #730672
 -- Dustin Kirkland <email address hidden> Thu, 17 Mar 2011 13:34:43 -0500

Changed in rootskel (Ubuntu):
status: In Progress → Fix Released
summary: - Feature Request: Improve Console Colors
+ Improve Console Colors
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package bogl - 0.1.18-4ubuntu1

---------------
bogl (0.1.18-4ubuntu1) natty; urgency=low

  * bterm.c:
    - update the hardcoded color map to the color palette selected by
      the Canonical Design Team, LP: #730672;
    - ideally, bterm.c would read these from the configuration file,
      /etc/vtrgb
 -- Dustin Kirkland <email address hidden> Thu, 17 Mar 2011 15:02:28 -0500

Changed in bogl (Ubuntu):
status: In Progress → Fix Released
Changed in newt (Ubuntu):
status: Triaged → In Progress
Changed in cdebconf (Ubuntu):
status: Triaged → Invalid
assignee: Dustin Kirkland (kirkland) → nobody
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package newt - 0.52.11-2ubuntu3

---------------
newt (0.52.11-2ubuntu3) natty; urgency=low

  * debian/patches/800_ubuntu_skin.patch: LP: #730672
    - add an Ubuntu skin to newt colors, changing blue to magenta
    - note that 'magenta' is actually be aubergine, when coupled
      with the console-setup and kbd fixes for LP: #730672
 -- Dustin Kirkland <email address hidden> Thu, 17 Mar 2011 19:00:51 -0500

Changed in newt (Ubuntu):
status: In Progress → Fix Released
Dustin Kirkland  (kirkland) wrote :

Closing the cdebconf task. No code is affected there. There is an alternate palette with high contrast colors for accessibility. But if that palette is not selected, the default newt one is.

description: updated
Dustin Kirkland  (kirkland) wrote :

Mark,

Yes, there are a total of 16 colors -- 8 normal ones, and 8 bright analogs. Marcus selected all 16 for us. The first 8 normal ones are new and distinct to Ubuntu. The latter 8 bright ones he and Ivanka felt that they couldn't improve upon the 8 pure ones, so we've left it at that.

Furthermore, Linux's vt driver supports all 16 (normal and bright) for foreground colors, but only the 8 normal ones for background colors. See:
 * http://tldp.org/HOWTO/Bash-Prompt-HOWTO/x329.html

The 256color.pl script that I used to create the screenshots wasn't the best way to show these. I found a better script in that x329.html document.

Here you go:
 * http://people.canonical.com/~kirkland/server-aubergine-cli-before.png
 * http://people.canonical.com/~kirkland/server-aubergine-cli-after.png

Dustin

Lovely, thanks Dustin.

Any idea why we don't have colours in the default setup?

Martin Pool (mbp) wrote :

That's nice.

Are these also going to be the default gnome-terminal colors, or available as a palette there?

They look similar to what comes up under "Custom" but I don't know if that's just me.

Martin

Dustin Kirkland  (kirkland) wrote :

Martin, yes, the gnome-terminal palette (also selected by the Design
Team) inspired these which are used on the console. Thanks!

Dustin Kirkland  (kirkland) wrote :

On Fri, Mar 18, 2011 at 2:57 AM, Mark Shuttleworth
<email address hidden> wrote:
> Any idea why we don't have colours in the default setup?

I'm wracking my brain against what you mean by this, and I'm not
seeing it... What "default setup" do you mean?

Dustin

Dustin Kirkland  (kirkland) wrote :

I have submitted the patch to newt to make its system-wide palette configurable at run time, and attached that bug URL to this launchpad bug:
 * https://bugzilla.redhat.com/show_bug.cgi?id=689903

Dustin Kirkland  (kirkland) wrote :

I have also filed a bug with Debian, upstream for kbd, offering our setvtrgb tool, and linking to this bug report:
 * http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619299

Changed in kbd (Debian):
status: Unknown → New
Changed in cdebconf (Ubuntu):
status: Invalid → In Progress
assignee: nobody → Dustin Kirkland (kirkland)
Changed in cdebconf (Ubuntu Natty):
milestone: none → ubuntu-11.04-beta-2
Dustin Kirkland  (kirkland) wrote :

I had previously marked the cdebconf task 'invalid'. That was incorrect.

It took a while to shake out, but Colin recently rebuilt debian-installer, which pulled in a number of changes since the previous d-i build. In particular, the changes to newt that made this behavior configurable landed in the meantime. When d-i rebuilt against this newer version of newt, the aubergine newt palette dropped out of the installer.

I have a solution to this problem, which will in fact make this palette *totally* configurable for downstreams too. The changes will land in cdebconf. Attaching a patch here, for posterity. I'll look for the appropriate reviews and beta bug fix approvals ASAP.

Dustin Kirkland  (kirkland) wrote :

Update cdebconf patch. Tested and working well with:
 * no FRONTEND_BACKGROUND value specified
 * FRONTEND_BACKGROUND=dark
 * FRONTEND_BACKGROUND=original
 * FRONTEND_BACKGROUND=ubuntu
 * FRONTEND_BACKGROUND=kubuntu
 * FRONTEND_BACKGROUND=xubuntu

Dustin Kirkland  (kirkland) wrote :

Note that this cdebconf upload requires release team approval. I have discussed this in IRC with Colin. He okay'd me to go ahead and upload now, and queue the upload for beta2. He will need to rebuild debian-installer to enable these changes before building Beta2 ISOs.

Changed in cdebconf (Ubuntu Natty):
importance: Wishlist → Medium
Dustin Kirkland  (kirkland) wrote :

Pushed cdebconf changes to bzr+ssh://bazaar.launchpad.net/~ubuntu-core-dev/cdebconf/ubuntu.

Uploaded cdebconf_0.154ubuntu2 to the Natty Beta2 queue.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cdebconf - 0.154ubuntu2

---------------
cdebconf (0.154ubuntu2) natty; urgency=low

  Fix for LP: #730672
  * src/modules/frontend/newt/newt.c:
    - use Ubuntu newt's new ability to read palette from configuration file
    - establish a symlink to /etc/newt/palette at initialization according
      to an optional FRONTEND_BACKGROUND kernel parameter
  * debian/palette*, debian/cdebconf-newt-udeb.install:
    - install palettes for [original, dark, ubuntu]
    - install a default /etc/newt/palette symlink to /etc/newt/palette.ubuntu
    - other derivatives can install their palette at /etc/newt/palette.FOO
      and set the FRONTEND_BACKGROUND=FOO kernel parameter
 -- Dustin Kirkland <email address hidden> Tue, 29 Mar 2011 12:22:21 -0500

Changed in cdebconf (Ubuntu Natty):
status: In Progress → Fix Released
Dustin Kirkland  (kirkland) wrote :

FYI, the setvtrgb utility has been accepted and committed to the upstream kbd project \o/

 * http://git.altlinux.org/people/legion/packages/kbd.git?p=kbd.git;a=commitdiff;h=74221133a1810895623d903a00c60b3de4294655

So we should be able to drop the patches to kbd once upstream releases, Debian merges, and we sync with Debian again!

Cheers,
Dustin

Dimitri John Ledkov (xnox) wrote :

How do the colours compare to the http://ethanschoonover.com/solarized ?

Are there goals to have these color pallete availablle via gnome-terminal, emacs, vim, dircolors, source-highlight, eclipse, gedit, etc..... ?

I'm currently using solarized and I truly love well designed colors across all of my monospace activities.

Changed in kbd (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.