问题描述
在Emacs的 ansi-term
终端中,当我向特定的远程主机发送SSH时,终端无法正确识别,并且我收到错误:
In an ansi-term
terminal in Emacs, when I ssh to a specific remote host, the terminal is not recognized properly, and I get the error:
'eterm-color': unknown terminal type.
我添加了 export TERMINFO =〜/ .terminfo
到 .bashrc
,我在远程机器上尝试过以下操作:
I added export TERMINFO=~/.terminfo
to .bashrc
on the remote machine, and I have tried the following on the remote machine:
cp -r /usr/share/emacs/21.4/etc/e ~/.terminfo
为了防万一,我也尝试通过我自己的本地副本 / etc / e
(Emacs 24.3)复制到$ code>〜/。
Just in case, I also tried copying over my own local copy of /etc/e
(Emacs 24.3) to ~/.terminfo
on the remote machine.
另外,如果重要,如果我尝试 infocmp
在远程机器上,我得到:
Also, in case it matters, if I try infocmp
on the remote machine, I get:
>infocmp
infocmp: couldn't open terminfo file /usr/share/terminfo/e/eterm-color.
如何解决这个问题?
推荐答案
似乎你已经看到以下信息,所以可能不会有帮助,但可能值得重申。
It does seem that you've seen the following information already, so it might not help, but it's probably worth reiterating.
解释说,您应该复制(或符号链接) eterm-color
和 eterm-color.ti
文件从 /usr/share/emacs/xx.x/etc/e
目录(或$系统范围内的 / usr / share / terminfo) / e /
)。
The Emacs Wiki explains that you should copy (or symlink) the eterm-color
and eterm-color.ti
files from the /usr/share/emacs/xx.x/etc/e
directory on your local system to the ~/.terminfo/e/
directory (or alternatively, system-wide at /usr/share/terminfo/e/
).
当然,您也可以在需要连接的任何远程主机上执行此操作。
Of course you can also do likewise on any remote host you need to connect to.
在您管理的基于Debian的系统上,您可以 apt-get install ncurses-term
,其中包括 / usr / share / terminfo / e / eterm-color
。
On Debian-based systems you administer, you can apt-get install ncurses-term
, which includes /usr/share/terminfo/e/eterm-color
.
关于问题的细节,请注意,如果您没有 alread y 有一个〜/ .terminfo
目录,然后 cp -r /usr/share/emacs/21.4/etc/e〜/。 terminfo
不会做你打算做的事情。不清楚是否是这样,但可能解释为什么它不起作用?您需要一个〜/ .terminfo / e /
目录下的eterm-color文件;不直接在〜/ .terminfo /
。
With regard to the details in the question, note that if you didn't already have a ~/.terminfo
directory then cp -r /usr/share/emacs/21.4/etc/e ~/.terminfo
would not do what you intended it to do. It's not clear whether or not that was the case, but it may explain why it didn't work? You need the eterm-color files under a ~/.terminfo/e/
directory; not directly in ~/.terminfo/
.
(nb个人我一直只是安装 ncurses-term
,所以我无法直接支持〜/ .terminfo
方法。)
(n.b. Personally I always just install ncurses-term
, so I can't vouch directly for the ~/.terminfo
approach.)
这篇关于eterm-color:未知终端类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!