Score:0

Alacritty throws "E558: Terminal entry not found in terminfo" when running "htop" and "Error opening terminal: alacritty." when opening files with vim

The errors

Terminal entry not found in terminfo

and

Error opening terminal: alacritty

happen to me on a legacy server when I ssh'ed to it like:

ssh MY_USER@MY_SERVER

and use Alacritty to open text files with vi MY_TEXT_FILE.

The following is just a warning that does not keep me from working with the file in vim, but starts with these lines whenever I look up a vim file:

E558: Terminal entry not found in terminfo
'alacritty' not known. Available builtin terminals are:
    builtin_amiga
    builtin_beos-ansi
    builtin_ansi
    builtin_pcansi
    builtin_win32
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_debug
    builtin_dumb
defaulting to 'ansi'

The other error Error opening terminal: alacritty. is worse since you cannot run some commands then, happens to me with htop to see all of the pids.

The two errors come up likely for the same thing. How to get rid of them?

Score:0

This is taken from Nano/vim in SSH session respond with "Error opening terminal: alacritty." and other weird things. #3360 which then turned out to avoid the other E558: Terminal entry not found in terminfo as well.

Run:

TERM=xterm-256color

if you are already on the server.

Run:

TERM=xterm-256color ssh

if you want to make an environment variable already on your local machine that you want to pass to any ssh command.

Mind that you will use the terminal "xterm" then, which has less features than Alacritty. I use the xterm only for htop and top commands and other commands that do not accept Alacritty and throw 'alacritty': unknown terminal type. If you want to use Alacritty afterwards again, for example for the nice mouse-based copy feature so that you can copy more text than just what can be seen in the terminal page, see How to copy a large terminal history from Alacritty to the system so that I can search and document - the clipboard seems to get cut, change back to:

TERM=alacritty

I also get other terminals listed when I open a file in vim, mind that this is a legacy server.

Available builtin terminals are:
    builtin_amiga
    builtin_beos-ansi
    builtin_ansi
    builtin_pcansi
    builtin_win32
    builtin_vt320
    builtin_vt52
    builtin_xterm
    builtin_iris-ansi
    builtin_debug
    builtin_dumb
defaulting to 'ansi'

Thus, you might try those on your server, for example with the one to which it should default anyway:

TERM=ansi

Not all of the terminal names of the list work directly, for example, TERM=amiga does not work for me although it is built-in.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.