error: unable to open TUI | reason: the TERM environment variable is set to an unknown value: xterm-ghostty
lnav version lnav 0.13.2
Describe the bug Using ghostty on mac
✘ error: unable to open TUI reason: unable to initialize notcurses No such file or directory = help: The TERM value of “xterm-ghostty” is not known. Check for your terminal in https://github.com/dankamongmen/notcurses/blob/master/TERMINALS.md or use “xterm-256color”
To Reproduce try lnav with ghostty terminal?
This happens sporadically for me. Not sure what the deal is and it's hard for me to reproduce right now.
This will happen if your TERMINFO or TERMINFO_DIRS environment variables don't include a directory that contains the xterm-ghostty file. They're normally set automatically by Ghostty, but maybe it's being overridden in your shell init files?
You can check these by running env | grep TERM. For example on my machine:
$ env | grep TERM
TERMINFO=/Applications/Ghostty.app/Contents/Resources/terminfo
TERM_PROGRAM_VERSION=1.2.3
TERM_PROGRAM=ghostty
COLORTERM=truecolor
TERM=xterm-ghostty
This will happen if your TERMINFO or TERMINFO_DIRS environment variables don't include a directory that contains the
xterm-ghosttyfile. They're normally set automatically by Ghostty, but maybe it's being overridden in your shell init files?You can check these by running
env | grep TERM. For example on my machine:$ env | grep TERM TERMINFO=/Applications/Ghostty.app/Contents/Resources/terminfo TERM_PROGRAM_VERSION=1.2.3 TERM_PROGRAM=ghostty COLORTERM=truecolor TERM=xterm-ghostty
Annoyingly, even though I followed the steps here to copy it to my remote server, i ended up still facing the same error with lnav: https://ghostty.org/docs/help/terminfo#ssh
So I ended up just reconfiguring the ssh connecting env to use xterm-256color
# .ssh/config
Host example.com
SetEnv TERM=xterm-256color
Given lnav is a modern TUI, it would be cool if it implicitly supported the ghostty xterm as it's getting popular :)
I think that updating the vendored copy of notcurses should pull in native support for ghostty.