0

When I run clear I get:

'screen.linux': unknown terminal type

I get this error message when, on a Debian 7 machine running the OpenVZ kernel, from within a screen session, I vzctl enter into a Debian 8 container.

Now, I know I can just fix this by changing $TERM from 'screen.linux' to 'linux'. That's not my question. My question is twofold:

  • Why doesn't this happen from within the screen session normally? Before I enter the container, $TERM is 'screen.linux', but clear works fine, and
  • If it has anything to do with the terminfo database, how could I fix that so this doesn't happen (and I don't need to change TERM anywhere)?
1
  • You need to start a proper interactive shell after vzctl enter and there are multiple ways to do that: su - or . .bashrc or . .bash_profile Sep 2, 2016 at 19:06

2 Answers 2

1

You can install the ncurses-term package which adds many additional terminal types.

1

Reading the vzctl manual in the context of your question:

enter CTID [--exec command [arg ...]]

Enters into a container (giving a container’s root shell). This option is a back-door for host root only. The proper way to have CT root shell is to use ssh(1).

sounds as if it is talking about a chroot, which would make the shell see only the files which were provided. Likely the container does not have a complete terminal database. It might have the infocmp utility, which prints the pathname for an entry first in a comment (making it useful for checking if the terminal database is missing things such as screen.linux).

1
  • +1 because I didn't realize vzctl enter isn't the "proper" way to get a root shell on a CT. Jul 9, 2015 at 21:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .