macos Unix 屏幕实用程序错误:找不到“xterm-256color”的 termcap 条目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10823994/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Unix screen utility error: Cannot find termcap entry for 'xterm-256color'
提问by Gregory
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:
我通过 Mac 的 ssh 连接在 NetBSD 系统上工作,我想使用该screen
实用程序,以便我可以启动进程并在终端连接中断后返回到它们。当我输入时,screen
我收到错误消息:
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.
在浏览了论坛帖子后,我认为这与远程机器上的 termcap 有关,但事实并非如此;我可以从另一台计算机的 ssh 会话中启动屏幕而没有错误,我通常无法访问该计算机。这表明我需要在本地机器上配置一些东西,但我无法弄清楚是什么或如何配置。虽然这篇文章被标记为“gnu-screen”,但我怀疑我正在使用 Berkeley screen,尽管我不知道这是否是一个显着的区别。
回答by dave4420
Quick fix: run TERM=xterm screen
instead of screen
.
快速修复:运行TERM=xterm screen
而不是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.
您会收到错误消息,因为在您的 mac 上,您有TERM=xterm-256color
xterm-256color 不在远程机器的 termcap 中。从另一台计算机连接时不会出现错误,因为它的 TERM 变量设置为其他内容。
回答by David Sainty
You can add it personally to $HOME/.termcap - run this on your NetBSD account:
您可以亲自将它添加到 $HOME/.termcap - 在您的 NetBSD 帐户上运行它:
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.
但是您也可以作为 root(或询问 root)将 termcap 条目添加到 /usr/share/misc/termcap。这将为所有用户修复它。
回答by Bloumbloum
In OS X, under the tab Profiles, then Advanced, then Terminfo, switch from xterm-256color
to xterm
.
在 OS X 中,在选项卡Profiles 下,然后是Advanced,然后是Terminfo,从 切换xterm-256color
到xterm
。