kitty icon indicating copy to clipboard operation
kitty copied to clipboard

open terminal failed: missing or unsuitable terminal: xterm-kitty

Open Ulrar opened this issue 8 years ago • 13 comments

Hi,

I've just installed kitty on my system and it seems to work fine. If I ssh on a server though, tmux gives "open terminal failed: missing or unsuitable terminal: xterm-kitty", and using the shell is a bit of a pain (backspace for example seems to produce a space).

The system in both case is a fully up to date Gentoo, not sure why my local one likes kitty fine but the remote one doesn't. In both case the shell is zsh with zkbd, and I've re-created the zkbd file twice just to be sure I didn't mess up the first time.

Thanks

Ulrar avatar Feb 11 '18 20:02 Ulrar

Because you have to make the terminfo file available on the remote computer. https://wiki.archlinux.org/index.php/Secure_Shell#.22Terminal_unknown.22_or_.22Error_opening_terminal.22_error_message

kovidgoyal avatar Feb 12 '18 03:02 kovidgoyal

And I have added an entry to the FAQ for this.

kovidgoyal avatar Feb 12 '18 04:02 kovidgoyal

Link to the FAQ since the arch wiki looks to be different than originally linked: https://sw.kovidgoyal.net/kitty/faq.html#i-get-errors-about-the-terminal-being-unknown-or-opening-the-terminal-failing-when-sshing-into-a-different-computer

paul-english avatar Jan 03 '19 04:01 paul-english

I get this in tmux on the local computer, not via SSH. What is the solution here?

themightyoarfish avatar Jan 04 '22 12:01 themightyoarfish

Solution: Kill tmux if it's in use by other terminal emulators.

themightyoarfish avatar Jan 04 '22 12:01 themightyoarfish

Solution: Kill tmux if it's in use by other terminal emulators.

It's works.

dattran1232003 avatar Feb 14 '22 07:02 dattran1232003

This ssh kitty looks very complicated, and it doesn't work out of the box with autossh for example or with a program I was using to change SIGHUP to SIGINT to make sure that connections are rapidly dropped when I close my laptop. Couldn't kitty just use a normal value for TERM like xterm?

greaber avatar Feb 19 '22 14:02 greaber

... it doesn't work out of the box with ...

You only need to transfer terminfo once (this needs to match the current version of kitty), and then just use ssh.

Couldn't kitty just use a normal value for TERM like xterm?

kitty does not support all xterm features. To ensure that all features are used correctly by command line programs, its own terminfo is required. If you change this on your own, then you need to know what you are doing.

page-down avatar Feb 19 '22 15:02 page-down

Thanks, @page-down. It does seem to work now although I do notice that when I run tmux the TERM variable gets set to screen; hope that won't cause issues

greaber avatar Feb 19 '22 16:02 greaber

I actually did reverse, export TERM=screen works

saranshkarira avatar Nov 16 '22 11:11 saranshkarira

I had this problem when working on remote servers via bastion hosts. My workaround is to add SetEnv TERM=xterm to .ssh/config.

Eyjafjallajokull avatar Jan 10 '23 08:01 Eyjafjallajokull

In my case, when SSH to a remote server, I use kitten ssh instead of ssh :

   kitten ssh myserver

linux-root avatar Apr 05 '24 12:04 linux-root

The solution is to switch to Alacritty since the Kitty developer seems to hate Tmux.
The Kitty developer has obviously never managed remote servers with a jumphost before.

ghost avatar Jul 08 '24 18:07 ghost