Andrew Daugherity changed bug 913517
What Removed Added
CC   adaugherity@tamu.edu

Comment # 4 on bug 913517 from
This is a systemd issue.  systemd-getty-generator automatically starts agetty
with TERM=vt102 on all "serial" consoles (which includes xvc0 and hvc0, and
also Xen HVM and KVM VMs with virtual serial console on ttyS0).

It would be much more useful to use TERM=xterm instead.  Besides color,
characters like '@' and '[' are displayed incorrectly (showing various umlauts
instead) with vt102 in the virt-manager "text console" on a SLES 11 Xen host. 
With xterm everything is proper.


There are various ways to fix this, depending on the size of hammer you wish to
wield:
1) User override for your specific console device (e.g. xvc0) in
/etc/systemd/system/serial-getty@xvc0.service.d/xterm.conf -- contents as
follows:
[Service]
Environment="TERM=xterm"
2) Same as above, but for all serial console devices -- store it in
/etc/systemd/system/serial-getty@.service.d/xterm.conf (nothing after the
'serial-getty@')
3) Patch the unit file in /usr/lib/systemd/serial-getty@.service, adding the
Environment line under the [Service] section.  Note that systemd RPM updates
would blow this away, so the fix needs to be committed to the RPM.
4) Like #3 but more device-specific by adding a conf file under
/usr/lib/systemd/serial-getty@[device].service/ (compare existing
getty@tty1.service.d).
5) Send a patch upstream to systemd to use xterm instead of vt102.
Note: Need to 'systemctl daemon-reload' after modifying any of these files, and
log off/on the console  (or just reboot the VM).

My vote is for #3, since the vast majority of serial console clients connected
to modern Linux machines, be they VM consoles or otherwise, support xterm.  If
this was thought to be too broad, #4 could be used to fix it for xvc0 and hvc0,
but some VMs use ttyS0 (e.g. KVM "virsh console", Xen HVM), and there's no way
of knowing whether ttyS0 is a VM console or an ancient vt100 glass tty.


You are receiving this mail because: