[Pkg-kbd-devel] Bug#619299: Feature Request: add the setvtrgb utility

Dustin Kirkland kirkland at ubuntu.com
Tue Mar 22 18:56:01 UTC 2011


Package: kbd
Version: 1.15.2-3

Howdy!

We're carrying a new feature in Ubuntu's kbd package, provided by a
neat little utility called /sbin/setvtrgb.

I recently became aware of a nifty little ioctl, ioctl(fd, PIO_CMAP,
cmap), which is able to dynamically modify the console colors in all
virtual terminals.

Providing this utility gives distributions, as well as interested
system administrators, a really convenient way to make the console's
color scheme easier on the eyes, or higher contrast for the
vision-impaired.

See the included manpage for detailed operation.

As for values, we are using the following values selected by the
Ubuntu Design Team, which are within the current Ubuntu color scheme:

/etc/vtrgb:
1,222,57,255,0,118,44,204,128,255,0,255,0,255,0,255
1,56,181,199,111,38,181,204,128,0,255,255,0,0,255,255
1,43,74,6,184,113,233,204,128,0,0,0,255,255,255,255

Alternatively, the stock, default Linux kernel's VGA values are:
0,170,0,170,0,170,0,170,85,255,85,255,85,255,85,255
0,0,170,85,0,0,170,170,85,85,255,255,85,85,255,255
0,0,0,0,170,170,170,170,85,85,85,85,255,255,255,255

You can place these values, or a modified version of them in a file,
and then run "sudo setvtrgb [FILE]" to test this.  The three lines of
configuration represent 16 red values, 16 green values, and 16 blue
values.  The format matches those exported by the kernel in sysfs.
See:
 $ cat /sys/module/vt/parameters/default_{red,grn,blu}

I'm attaching a patch.  You may choose to put the following in a
debian/changelog entry if you apply my patch:

[ Dustin Kirkland <kirkland at ubuntu.com> ]
  * 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

Dustin Kirkland
Ubuntu Core Developer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kbd-setvtrgb.patch
Type: text/x-patch
Size: 7902 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-kbd-devel/attachments/20110322/5aeda660/attachment.bin>


More information about the Pkg-kbd-devel mailing list