News for hackers. Stuff that matters.
Re:Foot: A fast and minimalistic Wayland terminal emulator by yokem55 on Tuesday December 14, 2021 @08:31PM (#29560871)
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.

Re:Foot: A fast and minimalistic Wayland terminal emulator by hpfr on Tuesday December 14, 2021 @09:04PM (#29561140)
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/f64f8c00d...

² https://www.mankier.com/5/ssh_config#SetEnv

Re:Foot: A fast and minimalistic Wayland terminal emulator by mongol on Wednesday December 15, 2021 @01:45AM (#29562850)
Will 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.
Re:Foot: A fast and minimalistic Wayland terminal emulator by dflock on Wednesday December 15, 2021 @02:31AM (#29563048)
It is the same issue, yes.
Re:Foot: A fast and minimalistic Wayland terminal emulator by seanhunter on Wednesday December 15, 2021 @02:07AM (#29562931)
Just 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.
Re:Foot: A fast and minimalistic Wayland terminal emulator by yokem55 on Tuesday December 14, 2021 @11:40PM (#29562175)
Thank you! This is exactly what I've been looking for!
Re:Foot: A fast and minimalistic Wayland terminal emulator by CameronNemo on Wednesday December 15, 2021 @12:41AM (#29562509)
I remember trying this and it would get overwritten. Cool to see that OpenSSH is still seeing such careful maintenance.
Re:Foot: A fast and minimalistic Wayland terminal emulator by Seirdy on Tuesday December 14, 2021 @08:40PM (#29560966)
Foot'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.

Re:Foot: A fast and minimalistic Wayland terminal emulator by vidarh on Wednesday December 15, 2021 @08:39AM (#29565708)
Xterm 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?
Re:Foot: A fast and minimalistic Wayland terminal emulator by yjftsjthsd-h on Tuesday December 14, 2021 @10:44PM (#29561836)
What 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.)
Re:Foot: A fast and minimalistic Wayland terminal emulator by vidarh on Wednesday December 15, 2021 @08:32AM (#29565626)
Yeah, 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.

Re:Foot: A fast and minimalistic Wayland terminal emulator by jeroenhd on Wednesday December 15, 2021 @06:44AM (#29564644)
That 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.

Re:Foot: A fast and minimalistic Wayland terminal emulator by larschdk on Wednesday December 15, 2021 @04:58AM (#29563893)
XTGETTCAP is implemented in many terminals which replaces the need for terminfo, but it's not used yet by client libraries except for notcurses afaik.
Re:Foot: A fast and minimalistic Wayland terminal emulator by ende42 on Monday December 20, 2021 @07:40AM (#29624211)
It'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.