<div dir="ltr">> About your other comments, systemd sits in user space and can query (depend <br>> upon) terminfo. Then, it should be able to support "whatever" terminfo has <br>> defined.... which could include custom terminals by the way that an end user has <br>> added. And while all of that sounds incredibly ancient/old, I was on a project <br><div>> post 2000 that had to do exactly that (of course, even that might sound too old).</div><div><br></div><div>Interestingly enough, systemd's colors work even when TERM is set to vt220, probably because it uses ansi escape codes regardless of the TERM setting. I think there's probably lots of applications doing this except for ls in coreutils which has an explicit list of terminals with color support encoded in the dircolors configuration file. If TERM isn't one of those, you don't get colors. There's probably others that do this as well. I don't think changing the default in systemd is a good idea since it might break other stuff. I'm going to submit a mkosi PR instead that adds an option that overrides serial-getty@ttyS0 with whatever terminal the user wants. Colors won't work out of the box but at least it shouldn't be too hard to find out how to get them to work when using mkosi.</div><div><br></div><div>Thanks for all the info as well. It's always fun to read how stuff was done back in the early days.<br></div><div><br></div><div>Daan<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 14 Jul 2020 at 21:04, Christopher Cox <<a href="mailto:ccox@endlessnow.com">ccox@endlessnow.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 7/14/20 1:48 PM, Daan De Meyer wrote:<br>
> I just tried vt241 and didn't get colorized output in konsole. I looked around a <br>
> bit and it doesn't really seem supported at all by terminal emulators (or at <br>
> least none that I found). I also tried TERM=xterm-256color with 8 different <br>
> terminal emulators and got colors with all of them. My workflow is simply "mkosi <br>
> qemu -nographic" (with a modified mkosi that adds console=ttyS0 and overrides <br>
> TERM for serial-getty@ttyS0 in the vm)." That connects my terminal emulator to <br>
> the serial console of the vm. I then execute "ls -l --color /" in the vm and get <br>
> colored output every time in whatever terminal emulator that I try.<br>
> <br>
> I'm probably missing something but I'm wondering what an example terminal <br>
> emulator would be where xterm-256color would not work at all (even st worked <br>
> perfectly and that is supposed to be pretty barebones afaik). Or is it just that <br>
> color is a commonly supported subset of xterm and stuff breaks down with other <br>
> escape codes instead? Or maybe qemu is doing some kind of translation that <br>
> magically makes every TERM setting work in whatever terminal emulator I try? <br>
> Apologies if this seems ignorant, I have no experience at all with this domain.<br>
<br>
So, some info (not necessarily direction). Old guys like to talk...<br>
<br>
So, speaking of things of old, but not ancient old, when handling server <br>
equipment via serial, you normally do three things. You route the BIOS (legacy) <br>
out the serial port, you send the kernel boot messages out the serial port and <br>
you establish a getty for login on the serial port.<br>
<br>
Just being honest, the "server world" decided everything was Microsoft <br>
Hyperterminal (up to Windows XP, what many considered to be "ansi", 80x25) <br>
during the PC revolution.<br>
<br>
So.. Windows doesn't come with Hyperterminal anymore, which makes sense since <br>
PCs in general don't have serial ports (apart from USB-serial dongles).<br>
<br>
So, can you, or should you adopt a serial console solution (ansi, 80x25)? IMHO, <br>
this is still interesting. Especially in the Linux world. Consider that <br>
network equipment still speaks serial for console, the concept (still, even <br>
though this in a old concept) of using, for example, ssh to serial console <br>
controllers for full out of band access might still be appealing.<br>
<br>
Why? Well, for many reasons. Cabling is much less (that is, less dense) as you <br>
can use flat velum for quite some distance for serial. Since you're having to <br>
somehow deal with network devices anyway, by have all done serially, you have <br>
"one stop" shopping for out of band (more on this in a bit) console access.<br>
<br>
Bonus, no high cost of licensing, for example, iLO or iDrac ent. But noting <br>
that you don't get virtual media with a serial console head solution either.<br>
<br>
But still, if running remote facilities and you need true out of band, and by <br>
that I mean the ability to reconfigure everything, including the network, it <br>
could be just the thing you need.<br>
<br>
But ssh? Network reconfigure? That's not going to work. Often times those same <br>
ssh to serial console devices have additional serial support usually with a <br>
option of a modem (yep... old school I know). Back in the day, using a callback <br>
modem (added security) your infrastructure could reach out to you and you could <br>
indeed reconfigure the whole datacenter, soup to nuts. Something lacking in <br>
general today.<br>
<br>
About your other comments, systemd sits in user space and can query (depend <br>
upon) terminfo. Then, it should be able to support "whatever" terminfo has <br>
defined.... which could include custom terminals by the way that an end user has <br>
added. And while all of that sounds incredibly ancient/old, I was on a project <br>
post 2000 that had to do exactly that (of course, even that might sound too old).<br>
<br>
Btw, as weird as it sounds, where I work today, and I'm not the network admin, <br>
the network admin has purchased a ssh to serial console controller with callback <br>
modem. And he's in his early 30's.<br>
<br>
Btw, when I used to help manage an entire datacenter (same time as contract <br>
below) with those ssh to serial controllers, I just let the the linux TERM <br>
remain as it was mostly compatible with the ANSI from the host BIOS (at least <br>
I'm pretty sure).<br>
<br>
With regards to that post 2000 project, I was interfacing with an old accounting <br>
package called datamodes. Company wanted a solution where by people at home <br>
could ssh into this character based gui, have all the key sequences (and I do <br>
mean all, every Fn, Ctrl, Shift, Alt combo) and have the ability to print to <br>
their local printers from that ssh terminal session. All of this was doable <br>
with good old fashioned terminal handling from the ancient of days. But I did <br>
have to craft my own terminfo entry. Loosely based off the scoansi terminal <br>
(one of the most complete terminal definitions out there, but not totally <br>
complete). The end users were already running a terminal emulator that had a <br>
SCO ansi mode.<br>
<br>
(even back then, datamodes had a "Windows" solution, but for the company I was <br>
contracting to, it was too expensive)<br>
<br>
> <br>
> Daan<br>
> <br>
> On Tue, 14 Jul 2020 at 18:22, Christopher Cox <<a href="mailto:ccox@endlessnow.com" target="_blank">ccox@endlessnow.com</a> <br>
> <mailto:<a href="mailto:ccox@endlessnow.com" target="_blank">ccox@endlessnow.com</a>>> wrote:<br>
> <br>
> On 7/14/20 3:19 AM, Lennart Poettering wrote:<br>
> > On Mo, 13.07.20 18:16, Christopher Cox (<a href="mailto:ccox@endlessnow.com" target="_blank">ccox@endlessnow.com</a><br>
> <mailto:<a href="mailto:ccox@endlessnow.com" target="_blank">ccox@endlessnow.com</a>>) wrote:<br>
> ><br>
> >>> No vt220 does not support colour. I used to work on one and it is<br>
> >>> monochrome hardware.<br>
> >>> Xterm and konsole support extensions beyond vt220 that add in the<br>
> colour support.<br>
> >><br>
> >> Not sure how much (offtopic) history we want to get into. I used the VT240<br>
> >> in my college graphics class. The VT241 was the color variant.<br>
> >><br>
> >> See: <a href="http://terminals-wiki.org/wiki/index.php/DEC_VT240" rel="noreferrer" target="_blank">http://terminals-wiki.org/wiki/index.php/DEC_VT240</a><br>
> >><br>
> >> I still meet programmers what hard code ansi sequences rather than querying<br>
> >> termcap/terminfo. You know what they say about those who "assume".<br>
> ><br>
> > Hmm, if vt241 is a bettre featured terminal type, and both xterm and<br>
> > the Linux console a superset of it, and the terminal widely available<br>
> > in termcaps and stuff we can certainly change our default TERM to be<br>
> > vt241.<br>
> ><br>
> > Daan, if this all is the case, could you prep a PR?<br>
> <br>
> I would think shooting for something low is actually good. Let the individual<br>
> configure for something "better".<br>
> <br>
> I'm not sure I'm ready to say monochrome is obsolete. There can be beauty in<br>
> simplicity and function. My preference, aim low, and allow easy configuration<br>
> upward. You could take the opposite stance of course, it's just that it could<br>
> cause some frustration.<br>
> <br>
> Just my opinion though. I'm old and I think about a lot of things like<br>
> terminals, "proxies" and callback modems... things of value, but most do not<br>
> understand or care about anymore.<br>
> <br>
> <br>
> _______________________________________________<br>
> systemd-devel mailing list<br>
> <a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a> <mailto:<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a>><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
> <br>
<br>
_______________________________________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org" target="_blank">systemd-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
</blockquote></div>