Before I go into the detail of my problem there is a debian mailing list which seem to explain the cause- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=854414

After installing Debian 9, logging into remote shells results in the the error message "screen.xterm-256color: unknown terminal type". In some instances typing export TERM=xterm-256color fixes the issue.

When I log into a remote console and run some commands like apt-get xxx the error message WARNING: terminal is not fully functional comes up and apt also adds - (press RETURN)WARNING: apt does not have a stable CLI interface yet. Use with caution in scripts.

What I notice is that when I press Ctrl-Alt F1 to execute those commands directly the problems are not there, so I assume that there is something wrong or missing in the default Konsole configuration of Debian 9 may be the problem and my other research seems to support that.

The problem comes up more with zsh than bash but I assume that some change I made to the .bashrc configuration years ago may be fixing it.

I thought of making some changes to .screenrc but read some where because Konsole is the terminal that is where the changes have to be made.

What could the flaws in my Konsole setup be, and could they be coming from defaults which are set in the X11 configuration?

1 Answer 1


When you run screen, it sets the TERM environment variable for the inner shell, preferring to use the outer shell's TERM variable as a starting point, e.g.,


Your outer shell was set to xterm-256color (which is actually incorrect), and screen found a terminal description for screen.xterm-256color (from the ncurses-term package. When you connect (in screen) to a remote machine without that terminal description installed, you will get problems like those listed in the question.

(The bug report is relevant, but the basic problem in that longish thread is that the reporter failed to understand that the various terminals really do not act the same — the package maintainers gave reasonable responses).

By the way, there is a feature in ncurses 6.1, which could easily be used to pass terminal descriptions to other machines using ncurses 6.1. But that would not help with (a) applications that do not use ncurses, or (b) machines where ncurses 6.1 is not installed. In fact, for the latter it would create new problems. When that happens, a discussion of the pros/cons will appear in the ncurses FAQ.

  • Is there a way to get .screenrc to override that behaviour, or place some prefix or command in the screen or ssh command to do so?
    – vfclists
    Nov 15, 2018 at 13:00
  • 1
    You could use term. Nov 15, 2018 at 22:10

You must log in to answer this question.

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