4 ms·
Yet another terminal that insists on having its own terminfo. This isn't a big deal if you only need to interact with a few machines via ssh, but when you are
by yokem55 5y ago
Yet another terminal that insists on having its own terminfo.
This isn't a big deal if you only need to interact with a few machines via ssh, but when you are working with 100+, including networking gear that has no hope of using a custom terminfo, it really gets to be a gnarly pain.
I must be getting old.
- Seirdy 5y agoFoot's terminfo package is available separately on most distros. Foot has many advanced features like some Kitty protocols (for features adjacent to OSC-8 sequences) and sixel graphics, so it makes sense to use one. If you don't want this, you can just use xterm-256color instead.
- vidarh 5y agoXterm supports sixel if compiled with support for it enabled, but it's behind a command line switch. "xterm -ti vt340" will get you an xterm with sixel if it's compiled in. The TERM env var when xterm is started that way is still "xterm" (just checked) so presumably you shouldn't need an updated terminfo for sixel?
- hpfr 5y agoYou'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.
- yjftsjthsd-h 5y agoWhat else would you have it do? If you use any other terminal's TERM value, you'd better implement it perfectly or you're going to create compatibility bugs, and for bonus points you can't do anything the original couldn't do (see sibling comment about sixel, etc.)
- larschdk 5y agoXTGETTCAP is implemented in many terminals which replaces the need for terminfo, but it's not used yet by client libraries except for notcurses afaik.
- jeroenhd 5y agoThat seems like the right thing to do to me. You can override the default for your remote hosts, but any nonstandard terminal emulator should probably not pretend to be a standard terminal emulator that secretly knows a bunch of tricks. If you're using such a terminal, adding alias ssh="TERM=screen ssh" would probably fix most of your issues without sacrificing functionality in the rest of the system or relying on applications assuming your terminal is more capable than it says to be.
- vidarh 5y agoYeah, I tend to force TERM to xterm or similar irrespective of the terminal. If a terminal can't handle the subset of xterm's behaviour that the apps I use rely on, I just won't use that terminal. It takes really little to make most apps work fine with TERM set to one of the common choices - I know, I hacked together a simple terminal to explore some things and getting most things running took a really small subset of mostly vt100. They need to support the common subset anyway because a lot of software looks at terminfo and assumes "mostly vt100" no matter what.
- ende42 5y agoIt's in the docs … on my servers this fixes things as well: S=my_server ; ssh $S 'mkdir -p ~/.terminfo/f/' ; scp /usr/share/terminfo/f/foot $S:~/.terminfo/f/foot PITA still.