Please consider Request Termcap/Terminfo String (XTGETTCAP) (https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Device-Control-functions:DCS-plus-q-Pt-ST.F95) sequence support, at least for the terminfo name. systemd v258 will be able to make use of this escape code to set $TERM correctly in virtual machines with ( https://github.com/systemd/systemd/pull/37538). VTE bug report with more discussion: https://gitlab.gnome.org/GNOME/vte/-/work_items/2884 VTE commit implementing the escape code: https://gitlab.gnome.org/GNOME/vte/-/commit/a11706138577f96e0a392eb2e68dc1eff8f94bbe