Re: Colored kernel messages on serial console

Mouse <[email protected]> Mon, 27 Jul 2026 13:24:24 -0400 (EDT)
Newsgroups gmane.os.netbsd.devel.kernel
Message-ID <[email protected]>
> Without *really* knowing what I'm doing, I've just changed the
> kprintf to produce ANSI color sequences

I assume your're actually talking about the ISO 6429 parameters for
ANSI X3.64's SGR sequence; that seems to be what "ANSI color" gets used
to mean.  (As far as I know ANSI has not actually standardized anything
for colour - or, ANSI being *A*NSI, I guess I should say "color".  In
case someone knows - am I out of date in that?)

> so that I'll get my familiar green kernel messages (after migrating
> from wscons to a serial console setup recently).

> How insane is this?

Unless it defaults off, I would call it extremely annoying if/when I
ever run into it (which admittedly would probably be rarely-to-never).

At work, I have to deal with a lot of things, mostly coming from the
Linux world, which assume "ANSI colour" (a) works and (b) is wanted; in
my use cases, (a) is rarely true and (b) is never true.  These programs
generally do this not only without being told to, not only without any
reason to think they'll work, but even when faced with reason to think
they won't work (in the form of a $TERM whose description is manifestly
not even vaguely close to X3.64).  And I know $TERM is recognized and
has a working description, because many programs handle it correctly.

I am [32mquite[0m thoroughly [30;42;1msick[0m of seeing the resultant
output corruption.  A few programs (notably gdb) are borderline
unusable as a result.  (I even ran into one thing brain-damaged enough
to wedge on startup if it's not talking to X3.64, but that is only
tangentially related.)

If I want Linux, I know - all too well - where to find it.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		[email protected]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B