I have described several ways to handle terminal capabilities and queries: distributing Ghostty’s terminfo through ncurses, setting it up automatically over SSH, querying color palettes with xterm-supported queries, and ultimately moving shells beyond terminfo.
Ghostty’s terminfo entry for "xterm-ghostty" was merged into ncurses.
As distros update their ncurses dependency, Ghostty's terminfo will be available by default on most Linux machines out there.
The rollout will take anywhere from weeks to years depending on the distro.
I described Ghostty’s automatic SSH terminfo setup as opt-in because modifying ssh by default is sus.
The automatic SSH terminfo setup makes ssh work without all the fiddly manual steps until our terminfo is installed by default on more machines.
Jason Rayne contributed the automatic SSH terminfo setup feature.
There are still edge cases we're ironing out, and we plan to make this even smoother over time.
I said xterm supports other queries to retrieve the whole terminal color palette, so there is no need to use dbus.
I argued that the RIGHT solution is for shells to fully abandon terminfo.
I said xterm itself built a modern solution to this problem for like 15 years.
I argue that shells should fully abandon terminfo; I call this the RIGHT solution.
I explain that XTGETTCAP is an escape-sequence based protocol for requesting terminfo information.
I explain that XTGETTCAP uses in-band signaling, so it works via SSH.
I explain that XTGETTCAP lets the terminal respond directly in-process rather than relying on well known filesystem paths.
Related: terminal app extensibility, terminal apis and capabilities, apps built with libghostty