Subject: Re: change the default console color
To: Frederick Bruckman <fredb@immanent.net>
From: Byron Servies <bservies@pacang.com>
List: netbsd-users
Date: 03/26/2004 08:37:50
On Mar 25, 2004, at 7:43 PM, Frederick Bruckman wrote:

> On Thu, 25 Mar 2004, Billy Eipp wrote:
>
>> Hi, I just installed netbsd 1.6.2 on an i386 server (standard install,
>> no X windows) and I would like to make the color of the foreground
>> different than white. I've searched and cannot find the way to do 
>> this.
>>
>> I've used netbsd before and I think there is an easy command to set 
>> the
>> color (say to green), but I can't remember.
>
> I don't think so, but there are compile time options. See comments in
> the GENERIC config, or the very fine wscons(4) man page.
>

      options WS_KERNEL_FG=WSCOL_XXX,

      options WS_KERNEL_BG=WSCOL_XXX,

      options WS_KERNEL_COLATTR="(WSATTR_XXX | WSATTR_YYY)"
                and

      options WS_KERNEL_MONOATTR="(WSATTR_XXX | WSATTR_YYY)"
                allow to make console output originating from the kernel 
appear
                differently than output from user level programs (via
                /dev/console or the specific tty device like /dev/ttyE0).
                ``WS_KERNEL_FG'' and ``WS_KERNEL_BG'' set the foreground 
/
                background used on color displays. The ``WSCOL_XXX'' 
arguments
                are colors as defined in
                /usr/include/dev/wscons/wsdisplayvar.h.  
``WS_KERNEL_COLATTR''
                and ``WS_KERNEL_MONOATTR'' are additional attribute 
flags used
                on color or monochrome displays, respectively.  The 
arguments
                are defined in the same header file. Whether the 
attributes are
                supported or not depends on the actually used graphics 
adapter.
                These options are ignored by the ``dumb'' terminal 
emulation.


you might be able to use wsconsctl to change the color at runtime, but 
I haven't tried.

HTH,

Byron