5 ms·
You're not getting old; this is a real nuisance. That said, and to add onto the other reply, you're in luck: OpenSSH 8.8p1 includes support¹ for setting TERM i
by hpfr 5y ago
You're not getting old; this is a real nuisance.
That said, and to add onto the other reply, you're in luck: OpenSSH 8.8p1 includes support¹ for setting TERM in your SSH config with SetEnv². In my experience this works fine with just the client OpenSSH being up-to-date connecting to servers with older SSH versions and terminfo databases.
In your case, you might want to use a wildcard host at the end of your file to default to a more compatible TERM variable, and then override to foot's TERM variable value for the hosts you use that do have up-to-date terminfo:
Host my-up-to-date-terminfo-host
SetEnv TERM=foot
Host *
SetEnv TERM=xterm-256color
I've been using Foot for months now and just came across this issue, so it's nice there's now a path to get the full-fledged Foot experience only where it's supported. I usually stay comfortably inside GUI Doom Emacs for most shell workflows, but it's nice to have a modern, Wayland-native, no-nonsense terminal emulator when I do break my config :P.
¹ https://github.com/openssh/openssh-portable/commit/f64f8c00d158acc1359b8a096835849b23aa2e86 https://github.com/openssh/openssh-portable/commit/f64f8c00d...
² https://www.mankier.com/5/ssh_config#SetEnv https://www.mankier.com/5/ssh_config#SetEnv
- yokem55 5y agoThank you! This is exactly what I've been looking for!
- CameronNemo 5y agoI remember trying this and it would get overwritten. Cool to see that OpenSSH is still seeing such careful maintenance.
- mongol 5y agoWill this also work around a similar annoying problem with Kitty? Sorry I am not familiar enough with the workings of terminals to understand if that is the same type of problem.
- dflock 5y agoIt is the same issue, yes.
- seanhunter 5y agoJust to add that if you share your homedir (or just your dotfiles) among hosts I think you should be able to copy a terminfo file containing the right terminfo stuff in your dotfiles and use the same setenv ssh config line to set the TERMINFO env var to point to that file.