logoalt Hacker News

awkwardleon • yesterday at 6:32 PM • 3 replies • view on HN

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>.


Replies

kccqzy • yesterday at 6:42 PM

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.

➕ show 3 replies
iknowstuff • yesterday at 8:06 PM

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.

➕ show 1 reply
seanw444 • yesterday at 7:05 PM

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

    Host ...
        SetEnv TERM=xterm-256color
➕ show 1 reply