Subject: Re: change the default console color
To: Jean-Christophe Valiere <jyce@free.fr>
From: =?ISO-8859-1?Q?Florian_St=F6hr?= <netbsd@wolfnode.de>
List: netbsd-users
Date: 03/26/2004 14:41:56
On Fri, 26 Mar 2004, Jean-Christophe Valiere wrote:

> Selon Florian St=F6hr <netbsd@wolfnode.de>:
>
> > On Fri, 26 Mar 2004, Billy Eipp wrote:
> >
> > >
> > > On Mar 26, 2004, at 2:46 AM, Florence HENRY wrote:
> > >
> > > > Hello,
> > > >
> > > >> Hi, I just installed netbsd 1.6.2 on an i386 server (standard inst=
all,
> > > >> 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 se=
t
> > > >> the
> > > >> color (say to green), but I can't remember.
> > > >
> > > > I know it is possible with bash (my father colored the foreground i=
n
> > > > green), but I don't know how to do it.
> > > >
> > >
> > > I found this link from google groups that has some suggestions on how
> > > to change the fg/bg from a shell. I was hoping to find a flexible
> > > command line option.
> > >
> > > http://groups.google.com/groups?hl=3Den&lr=3D&ie=3DUTF
> > > -8&selm=3D5ii58.92%24j_4.68473%40news.uswest.net
> > >
> > >
> > > > --
> > > > Florence HENRY
> > > > florence.henry@obspm.fr
> > > >
> > >
> > >
> > > Anyway, thanks for the suggestion.
> > > Billy
> > >
> > >
> >
> > Well, the kernel option you think about only changes the color
> > of the kernel messages (I use CYAN for my custom kernels to
> > distinguish from GENERIC kernels):
> >
> > options =09WS_KERNEL_FG=3DWSCOL_CYAN
> > #options =09WS_KERNEL_BG=3DWSCOL_BLACK
> >
> > If you want a REALLY colorful console (like on alpha, white on blue),
> > you have to hack the file /usr/src/sys/dev/ic/vga.c
> >
> > For alpha:
> >
> > #ifdef __alpha__
> > =09if (!vc->hdl.vh_mono)
> > =09=09/*
> > =09=09 * DEC firmware uses a blue background.
> > =09=09 */
> > =09=09res =3D vga_alloc_attr(scr, WSCOL_WHITE, WSCOL_BLUE,
> > =09=09=09=09     WSATTR_WSCOLORS, attrp);
> > =09else
> > #endif
> >
> > you could do a similar one for your platform with your favourite colors
> > here.
> >
> > With bash, I also did it once by using standard ANSI sequences.
> >
> > Cheers
> > Florian
> >
> Isn't there a simplest way as when you r kernel breaks down, the kernel
> debugger writes green caractere ??
>
> --
>                 "Si la politique pouvait changer notre vie,
>               cela ferait longtemps qu'elle serait interdite."
>               - Federation Anarchiste de France
>

Hm, the WS_KERNEL_FG and WS_KERNEL_BG should catch all kernel messages,
including the debugger. But maybe I'm wrong since all kernel panics I
got in my NetBSD-life were on sgimips via serial console.

Florian