Re: Setting colors on atyfb framebuffer console.

"Antonino A. Daplas" <[email protected]> Sun, 21 Oct 2007 00:06:31 +0800
Newsgroups gmane.linux.fbdev.user
Message-ID <1192896391.6073.13.camel@daplas>
On Sat, 2007-10-20 at 00:26 -0400, cga2000 wrote:
> On Tue, Oct 16, 2007 at 04:35:25AM EDT, Antonino A. Daplas wrote:
> > On Mon, 2007-10-15 at 19:04 -0400, cga2000 wrote:
> > > On Mon, Oct 15, 2007 at 10:51:20AM EDT, Antonino A. Daplas wrote:
> 
> [..]
> 
> Hello Tony,
> 
> I have finally gotten around to building a 2.6.23 kernel.  I tried to
> change my foreground/background colors via setterm without any effect.
> 
> > > > /sys/module/vt/parameters/default_blu|default_grn|default_red
> 
> I do have this directory now that I have upgraded to a the more recent
> kernel, but I am unsure how I should use these files.
> 

Each has 16 entries in decimal format standing for the red
(default_red), green (default_grn) and blue (default_blu) part of the
color. I'll be using hexadecimal from here on, since that is easier to
understand.

So the first entry (index 0) is 0x00 for red, 0x00 for green and 0x00
for blue. If you combine them as RGB, you get 0x000000 (black). Index 0
(which is black by default) is the default bacground color. Entry 8
(index 7), which is RGB 0xaaaaaa (light gray) is the default foreground
color.

If you want to change the background color from black to blue:

1. cat /sys/module/vt/parameters/default_blu > blue.txt
2. change the first entry from 0 to 255,
3. echo blue.txt > /sys/module/vt/parameters/default_blu
4. Type 'reset' to reset the terminal.
6. You should not have a light gray text on a blue background.

Tony



-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/