eterm-color: Unknown terminal type
Asked Answered
W

1

7

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.

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

Just in case, I also tried copying over my own local copy of /etc/e (Emacs 24.3) to ~/.terminfo on the remote machine.

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.

How can I fix this?

Wallywalnut answered 27/2, 2014 at 23:44 Comment(2)
You can try the solution given here Run infocmp on the local system, and then tic on the remote host. Just change screen-256color by eterm-colorJointless
May be interesting: unix.stackexchange.com/questions/91977/…Muttra
R
13

It does seem that you've seen the following information already, so it might not help, but it's probably worth reiterating.

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.

On Debian-based systems you administer, you can apt-get install ncurses-term, which includes /usr/share/terminfo/e/eterm-color.

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/.

(n.b. Personally I always just install ncurses-term, so I can't vouch directly for the ~/.terminfo approach.)

Reverence answered 28/2, 2014 at 9:29 Comment(4)
Thanks -- After manually building ncurses from source on the remote machine (with --fPIC for Zsh to work), copying my local eterm-color and eterm-color.ti to the ~/.terminfo/e/ folder on the remote machine , AND removing statements in my shell init files that tried to set/export the env. variable TERM ... this FINALLY worked!Wallywalnut
For future reference, building ncurses was not enough since it did not install terminfo files for eterm. As I mentioned in my previous comment, I had to copy these two files from my local Emacs installation to the remote ~/.terminfo/e folder.Wallywalnut
Had a vm in a gce environment that was doing this while using multi-term to ssh into the instance. apt-get installing ncurses fixed it all up.Bakelite
eterm-color has been part of ncurses terminal database since 2008, so OP's problems installing it are more likely due to some misconfiguration, e.g., $TERMINFO mis-set, and copying a file from Emacs won't improve matters.Strigil

© 2022 - 2024 — McMap. All rights reserved.