Unix screen utility error: Cannot find termcap entry for 'xterm-256color'

不打扰是莪最后的温柔 提交于 2019-12-03 11:44:52

问题


I work on a NetBSD system through an ssh connection from my Mac and I want to use the screen utility so that I can start processes and come back to them after my terminal connection has been interrupted. When I type screen I get the error message:

Cannot find termcap entry for 'xterm-256color'

After looking through forum posts, I thought it had something to do with termcap on the remote machine, but that appears not to be the case; I can initiate screen with no errors from an ssh session from another computer, one to which I don't generally have access. This suggests that I need to configure something on my local machine, but I haven't been able to figure out what or how. Although this post is tagged "gnu-screen" I suspect that I'm working with Berkeley screen, though I don't know whether that is a significant distinction.


回答1:


Quick fix: run TERM=xterm screen instead of screen.

You get the error because on your mac you have TERM=xterm-256color, and xterm-256color is not in the remote machine's termcap. You don't get the error when you connect from the other computer because it has its TERM variable set to something else.




回答2:


You can add it personally to $HOME/.termcap - run this on your NetBSD account:

infocmp -C xterm-color | sed -e 's/xterm-color/xterm-256color/' > $HOME/.termcap

But you can also as root (or ask root) to add the termcap entry to /usr/share/misc/termcap. That would fix it for all users.




回答3:


In OS X, under the tab Profiles, then Advanced, then Terminfo, switch from xterm-256color to xterm.



来源:https://stackoverflow.com/questions/10823994/unix-screen-utility-error-cannot-find-termcap-entry-for-xterm-256color

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!