Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 30 additions & 28 deletions docs/help/terminfo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,40 +56,26 @@ terminal: xterm-ghostty`, `Error opening terminal: xterm-ghostty.` or
`WARNING: terminal is not fully functional`.

Hopefully someday Ghostty will have terminfo entries pre-distributed
everywhere, but in the meantime there are two ways to resolve the situation:
everywhere, but in the meantime there are two methods to resolve the situation:

1. Copy Ghostty's terminfo entry to the remote machine. The easiest way is using
the following one-liner:
### Method 1: Copy Ghostty's terminfo entry to the remote machine
1. On your local machine, run the following one-liner:
```sh
infocmp -x xterm-ghostty | ssh YOUR-SERVER -- tic -x -
```
2. Configure SSH to fall back to a known terminfo entry using the following SSH
configuration (**requires [OpenSSH 8.7](https://www.openssh.com/txt/release-8.7)
or newer**):
```ssh-config
# .ssh/config
Host example.com
SetEnv TERM=xterm-256color
```
2. On the server, confirm the configuration was saved into
`/usr/share/terminfo/...`.
If not, check `$HOME/.terminfo/...` and move it across.

Ghostty can automate both variants. See [SSH](/docs/features/ssh) for
details on the `ghostty +ssh` CLI action and the `ssh-env` /
`ssh-terminfo` shell integration features, including important
limitations around when the automation applies.
The `tic` command on the server may give the warning `"<stdin>", line 2, col 31, terminal
'xterm-ghostty': older tic versions may treat the description
field as an alias` which can be safely ignored.

<Note>
The `tic` command on the server may give the warning `"<stdin>", line 2,
col 31, terminal 'xterm-ghostty': older tic versions may treat the description
field as an alias` which can be safely ignored.
</Note>

<Note>
`tic` will normally place its results in the system database,
`/usr/share/terminfo`. This location can be overridden with the `TERMINFO`
environment variable. If `TERMINFO` is not set and `tic` cannot write to the
system location, it will place the results in `$HOME/.terminfo` if it exists.
`man tic` for details.
</Note>
`tic` will normally place its results in the system database, `/usr/share/terminfo`.
This location can be overridden with the `TERMINFO` environment variable.
If `TERMINFO` is not set and `tic` cannot write to the
system location, it will place the results in `$HOME/.terminfo` if it exists.
If this happens, `man tic` for details.

<Note>
**macOS versions before Sonoma cannot use the system-bundled `infocmp`.** The
Expand All @@ -101,6 +87,22 @@ limitations around when the automation applies.
`/usr/local/opt/ncurses/bin/infocmp`.
</Note>


### Method 2: Configure SSH to fall back to a known terminfo entry
1. On your local machine, add the following SSH
configuration (**requires [OpenSSH 8.7](https://www.openssh.com/txt/release-8.7)
or newer**):
```ssh-config
# .ssh/config
Host example.com
SetEnv TERM=xterm-256color
```

Ghostty can automate both variants. See [SSH](/docs/features/ssh) for
details on the `ghostty +ssh` CLI action and the `ssh-env` /
`ssh-terminfo` shell integration features, including important
limitations around when the automation applies.

<Warning>
**Fallback does not support advanced terminal features.** Because
`xterm-256color` does not include all of Ghostty's capabilities, terminal
Expand Down