Hacker News
points by kccqzy 2 days ago | 0 comments
It’s rude to install a terminfo on a remote machine (which you may not be the owner of). It’s a preposterous for a terminal emulator to install things on a remote machine just to make it work.
[–] rocmcd 2 days ago
It's actually the remote machine that isn't working, but I get the frustration. What I did to fix this is to override the environment variables in your SSH config like this:

Host * SetEnv TERM=xterm-256color

[–] spurgu 13 hours ago
For me that wasn't enough, I added:

    Host *
        SetEnv TERM=xterm-256color
        SendEnv COLORTERM TERM_PROGRAM TERM_PROGRAM_VERSION
[–] exographicskip 1 day ago
That’s a neat trick! Didn’t know setting env vars was possible in ssh configs
[–] nasretdinov 1 day ago
Not all environment variables will be passed through (depends on the server configuration), but stuff like TERM should
[–] adrian_b 2 days ago
If you want to use in a terminal emulator features that do not exist in any xterm variant and the remote computer does know only xterm, there is no way to do that without installing data into the terminfo database.

Otherwise, there is no need to install anything, you should just set the environment variable TERM in the remote computer to one of the xterm variants and then modern terminal emulators like kitty or ghostty will still work fine, but of course only as long as you use the xterm-compatible subset of their features.

[–] mprovost 2 days ago
It's not a VAX that you're physically plugging a terminal into. The remote machine is totally capable of communicating with a newer terminal, it just needs to know how. You're being nice by giving it that information. You can also just install it locally in your home directory (~/.terminfo). (You used to be able to stuff the entire entry into the TERMCAP environment variable and not install anything.)
[–] jcgl 1 day ago
I presume though that the mentioned fix only installs the terming for the user, rather than system-wide. I don’t see how that’d be rude (assuming it’s some non-root user that you should reasonably be considered to have control over).
[–] otterley 2 days ago
If the remote machine doesn’t have the right support for your terminal, what do you suggest?
[–] skydhash 2 days ago
You can install stuff--with tic(1)--inside your user account (you do have one, right?) and be happy that way.
[–] anamexis 1 day ago
That is exactly what Ghostty's SSH integration does, if you enable it.