[systemd-devel] [systemd‑devel] Removing bold fonts from boot messages
Lennart Poettering
lennart at poettering.net
Thu Oct 14 12:18:03 UTC 2021
On Mi, 13.10.21 18:29, Frank Steiner (fsteiner-mail1 at bio.ifi.lmu.de) wrote:
> Ulrich Windl wrote:
>
> > Stupid question: If you see bold face at the end of the serial line, wouldn't
> > changing the terminal type ($TERM) do?
> > Maybe construct your own terminal capabilities.
>
> I'd need a TERM that has colors but disallows bold fonts. For some
> reason I wasn't even able to construct a terminfo that would disallow
> colors when using that $TERM inside xterm (and starting a new bash).
> It seems that xterm always has certain capabilities, i.e. "ls --color"
> is always showing colors in xterm, also with TERM=xterm-mono and
> everything else I tried.
>
> Anway, settings a translation to bind "allow-bold-fonts(toggle)"
> to a key in xterm resources allows to block bold fonts whenever
> watching systemd boot messages via ipmi or AMT in a xterm...
Note that systemd doesn't care about terminfo/termcap or anything like
that. We only support exactly three types of terminals:
1. TERM=dumb → you get no ANSI sequences, no fancy emojis or other
non-ASCII unicode chars, no clickable links.
2. TERM=linux → you do get ANSI sequences, but no fancy emojis, but
some simpler known-safe unicode chars (TERM=linux is the Linux
console/VT subsystem), no clickable links.
3. everything else → you get ANSI sequences, fancy emojis, fancy
unicode chars, clickable links.
And that's really it. It's 2021 and so far this was unproblematic. The
ANSI sequences we use aren't crazy exotic stuff but pretty much
baseline and virtually any terminal from the last 25 years probably
supports them.
You can turn these features off individually, too.
SYSTEMD_COLORS=0 → no ANSI colors sequences (alternatively: "NO_COLOR=1" as per https://no-color.org/)
SYSTEMD_EMOJI=0 → no unicode emojis
LC_CTYPE=ANSI_X3.4-1968 → no non-ASCII chars (which also means no emojis)
SYSTEMD_URLIFY=0 → no clickable links
Lennart
--
Lennart Poettering, Berlin
More information about the systemd-devel
mailing list