Skip to content

Instantly share code, notes, and snippets.

@costis
Last active October 1, 2020 20:32
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save costis/5135502 to your computer and use it in GitHub Desktop.
Save costis/5135502 to your computer and use it in GitHub Desktop.
Copy terminfo entries to remote host

You can copy the necessary terminfo descriptions to remote hosts.

  • On the local system, dump the description to text format:

    infocmp xterm-256color > xterm-256color.ti

    infocmp screen-256color > screen-256color.ti

  • Copy to the remote host and compile:

    tic xterm-256color.ti

    tic screen-256color.ti

The descriptions will be stored in ~/.terminfo.

(infocmp and tic are part of the ncurses or ncurses-bin packages in most Linux distributions, as well as most BSDs that use ncurses.)

@docwhat
Copy link

docwhat commented Mar 1, 2018

send-ssh-term can do this via one command.

@smason
Copy link

smason commented Sep 10, 2020

golfing this down to one line I've used

infocmp | ssh $HOST tic -

to do the "current terminal". this works because infocmp uses the current terminal by default (but you can pass a name as the OP does) and tic is happy taking input from stdin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment