Remix.run Logo
▲ awkwardleon 4 hours ago

Very likely due to ghostty setting TERM to xterm-ghostty and your destination not recognizing it. Quick temp fix is using the wrapper (ghostty +ssh), see <https://ghostty.org/docs/features/ssh>. More permanently, copy terminfo to the remote machine, see <https://ghostty.org/docs/features/ssh>.

▲kccqzy 4 hours ago | parent | next [-]

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 4 hours ago | parent | next [-]

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

▲adrian_b 3 hours ago | parent | prev [-]

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.

▲iknowstuff 3 hours ago | parent | prev | next [-]

Yea unfortunately eg Ubuntu’s bashrc has a script which will make it drop colors regardless of the presence of ghostty’s terminfo. Its `screen` will also fail, so e.g. it will refuse to upgrade to a new distro release.

Lots of jank due to this custom terminfo.

▲mprovost 6 minutes ago | parent [-]

Every terminfo is custom, to the terminal it applies to. It's just that most entries are 20+ years old and even glacial distros have converged on some version of the database that mostly worked, until the recent resurgence of interest in actually writing new terminal software.

▲seanw444 4 hours ago | parent | prev [-]

You can also just add this to your SSH config to get the typical functionality working:

    Host ...
        SetEnv TERM=xterm-256color
▲andy_ppp 5 minutes ago | parent [-]

[dead]