'screen.linux': unknown terminal type

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)?

Parthian Shot

Posted 2015-07-09T20:16:33.793

Reputation: 715

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 – Alec Istomin – 2016-09-02T19:06:03.907

Answers

1

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

wurtel

Posted 2015-07-09T20:16:33.793

Reputation: 1 359

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).

Thomas Dickey

Posted 2015-07-09T20:16:33.793

Reputation: 6 891

+1 because I didn't realize vzctl enter isn't the "proper" way to get a root shell on a CT. – Parthian Shot – 2015-07-09T21:03:41.010