Screen: Cannot find terminfo entry for 'xterm-256color'

后端 未结 12 1948
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-24 00:51

When I run

screen

on the remote host(running Linux), I obtain the following error:

Cannot find terminfo entry for \'xterm-         


        
12条回答
  •  Happy的楠姐
    2020-12-24 01:33

    I've previously used the default Mac OS X Terminal app to access my Ubuntu-based tmux via ssh, and found the problem you described - my bash and tmux is set to screen-256color, an option not even in the list in the Mac Terminal preferences.

    I tried adding the line:

    export TERM=screen-256color
    

    as a startup command, but it was ignored and was overridden with xterm-color upon startup.

    I also managed to change the settings for the Mac Terminal to screen-256color by choosing Shell > Export Settings, and then editing the XML file it generated, finding the line xterm-color and changing it to screen-256color, then Shell > Importing this settings file. Upon launching the Terminal, however, I found it had still overridden this setting with xterm-color.

    So I conceded and downloaded iTerm2 which allowed me to change the screen-256color setting by typing it into a plain text field (rather than choosing from a limited pulldown menu). This worked straight away without even having to close and reopen the console.

    So in conclusion, I recommend using iTerm2 rather than the default Mac Terminal (which doesn't seem to allow the changes to $TERM you require).

提交回复
热议问题