kitty is my current favorite terminal emulator for desktop Linux. The one thing I dislike about it is that it is its own new terminal type, xterm-kitty and most remote hosts don’t detect it appropriately. So escape sequences and the like are a mess, and ncurses (and similar) apps get really angry.

This is fairly easy to fix on most systems. First, use the ssh kitten to set up terminfo in your remote home directory:

kitty +kitten ssh myserver

When that completes, things should be as normal for your usual user. If sudo is not configured to pass TERMINFO along to its children, though, you will still see funky behavior those of its child processes that are interactive.

Three reasonable approaches are:

  1. Edit sudoers using visudo so that TERM and TERMINFO are included in env_keep.
  2. Install the terminfo file system-wide.
  3. Install the terminfo file for root also.

On CoreOS, due to its unconventional sudoers configuration, the path of least resistance is to install the terminfo file for root also.

sudo -i
cp -rv ~core/.terminfo ~/
chown -R root ~/.terminfo

This is far from necessary, but it’s nice not to need to think about which host you’ll be connecting to when you open your terminal.