Skip to content

Instantly share code, notes, and snippets.

@costis
Last active January 30, 2026 10:15
Show Gist options
  • Select an option

  • Save costis/5135502 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown

docwhat commented Mar 1, 2018

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

@smason
Copy link
Copy Markdown

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