From owner-freebsd-questions Sun May 17 11:05:51 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA20668 for freebsd-questions-outgoing; Sun, 17 May 1998 11:05:51 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from darla.swimsuit.internet.dk (Modem1106.internet.dk [194.255.12.38]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA20659 for ; Sun, 17 May 1998 11:05:43 -0700 (PDT) (envelope-from leifn@internet.dk) Received: from darla.swimsuit.internet.dk (darla.swimsuit.internet.dk. [192.168.0.10]) by darla.swimsuit.internet.dk (8.8.8/8.8.8) with SMTP id UAA03649; Sun, 17 May 1998 20:00:33 +0200 (CEST) (envelope-from leifn@internet.dk) Date: Sun, 17 May 1998 20:00:33 +0200 (CEST) From: Leif Neland Reply-To: leifn@internet.dk To: Brendan Kosowski cc: FreeBSD Questions Subject: Re: Console color In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, 17 May 1998, Brendan Kosowski wrote: > > Does anyone out there know how to change the console text color from grey > to another color ( green or yellow ) which is easier on the eyes. > You can change some constants in syscons.c: static default_attr user_default = { (FG_LIGHTGREY | BG_BLACK) << 8, (FG_BLACK | BG_LIGHTGREY) << 8 }; static default_attr kernel_default = { (FG_WHITE | BG_BLACK) << 8, (FG_BLACK | BG_LIGHTGREY) << 8 }; Or use the ansi controle sequence to change colours: set your prompt to: "\e[33;41;1m \$ " \e is escape [ is [ :-) 3x is foreground colour (33 is foreground green) 4x is background colour (41 is background red) 1 is high intensity m is end of escape sequence. Or send the escape sequense from an echo: echo -e "\e[33;41m" Only the first method will work "into programs"; if a program sends a "clear screen" command, the colours will be reset into the default in syscons.c Leif Neland leifn@internet.dk To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message