Subject: Re: change the default console color
To: Florian =?iso-8859-1?b?U3T2aHI=?= <netbsd@wolfnode.de>
From: Jean-Christophe Valiere <jyce@free.fr>
List: netbsd-users
Date: 03/26/2004 14:31:47
Selon Florian Stöhr <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 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 know it is possible with bash (my father colored the foreground in
> > > 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=en&lr=&ie=UTF
> > -8&selm=5ii58.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 WS_KERNEL_FG=WSCOL_CYAN
> #options WS_KERNEL_BG=WSCOL_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__
> if (!vc->hdl.vh_mono)
> /*
> * DEC firmware uses a blue background.
> */
> res = vga_alloc_attr(scr, WSCOL_WHITE, WSCOL_BLUE,
> WSATTR_WSCOLORS, attrp);
> else
> #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