Re: [systemd-devel] [systemd‑devel] Removing bold fonts from boot messages
Lennart Poettering wrote: 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. There is no problem with the sequences! Maybe I described that in a wrong way. I was just "complaining" that in systemd 246 the boot messages look like [ok] Reached targert Initrd Default Target The ascii sequences for the bold part have been added between 234 and 246 and I thought there was an option to remove only those sequences. I understand that I can only turn colors and bold print off or on at the same time. But it's ok as I've learned how to disable bold fonts in xterm on-the-fly. And it's really no big deal, sorry if I made it sound like a serious problem :-) -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. BioinformatikMail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
Re: [systemd-devel] [systemd‑devel] Removing bold fonts from boot messages
Ulrich Windl wrote: You are mixing sender and receiver: You cannot disable colors in the xterm binary (receiver) via termcap; instead you must restrict what the sender outputs via termcap: Xterm won't add colors when not requested. Also, not all programs use termcap. Classic VI and Emacs are probably good example who do use termcap/terminfo. I've read a lot about it and start to understand what you mean. That's a translation in the receiver. You could also represent bold by colored text, but that's something different. Also if the ANSI escape sequences are hard-coded (monoculture?), you're out of luck. Well, as far as I understand the ascii sequences are hard-coded in systemd, and between v234 and v246 some sequences were added for printing parts of the boot messages in bold. So all I can do is indeed disabling bold fonts in the receiver, i.e. xterm. And as xterm has a builtin function for that, it's quite easy to turn them on and off on-the-fly... Thanks for your explanations! -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. BioinformatikMail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *
Re: [systemd-devel] [systemd‑devel] Removing bold fonts from boot messages
On Mi, 13.10.21 18:29, Frank Steiner (fsteiner-ma...@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
Re: [systemd-devel] [systemd‑devel] Removing bold fonts from boot messages
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... -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. BioinformatikMail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. *