pct enter not passing $TERM

tachi

New Member
Aug 15, 2026
4
0
1
Italy
andrea.pappacoda.it
Hi! I am trying to stop using ssh to connect to my containers to reduce the amount of stuff that I need to keep track of, and I'm instead considering accessing a shell on them via pct enter.

Unfortunately, it seems that that pct enter does not pass through the $TERM environment variable, always resetting it to linux. This is unlike ssh sessions, which preserve it as to make it possible to properly render interactive shell sessions.

Here's an example of what I mean:

Code:
root@milan:~# echo $TERM
foot

root@milan:~# ssh 192.168.0.21
root@xmpp:~# echo $TERM
foot
root@xmpp:~#
logout
Connection to 192.168.0.21 closed.

root@milan:~# pct enter 121
root@xmpp:~# echo $TERM
linux
root@xmpp:~#
exit


Am I the only one observing this? Should I report a bug on bugzilla?

Bye!
 
  • Like
Reactions: waltar
Hi UdoB :)

Mh, that's not really a useful workaround for my use case. I myself use different terminal emulators on my own, so the TERM variable cannot be hard-coded to a single value. Moreover, I'm not the only one administering the machines, so there's no one TERM value which fits all.

Of course setting it to at least xterm or xterm-256color would be better than the default linux for most of the times we shell into the machines, as we rarely use the built-in Linux console, but rather we all more or less have an xterm-compatible terminal. But it's an iffy workaround, unfortunately :/

I'll report to bugzilla when I have time, then!
 
Mh, that's not really a useful workaround for my use case.
Sorry, I just wanted to mention that one ;-)
I myself use different terminal emulators on my own, so the TERM variable cannot be hard-coded to a single value. Moreover, I'm not the only one administering the machines, so there's no one TERM value which fits all.
Every administrator has a separate account, right? If not: how could you tell who made that big mistake last night? ;-)

(( In my $dayjob we are utilizing ssh with forced key-only login and sudo logs (locally and remotely) who did run "sudo rm /" :-) ))