error: unable to open TUI reason: the TERM environment variable is set to an unknown value: alacritty
Thanks so much for making this! I used this for the first time today on MacOS with iTerm2 and it was amazing for what I was working on.
I just noticed what is an issue when using lnav within an alacritty terminal (on Debian bookworm, but I assume it happens on any OS using alacritty), where it looks like lnav is refusing to open because it doesn't recognize alacritty as a valid TERM value.
lnav version v0.12.4
Describe the bug
I'm not able to use lnav to view a log file, while using alacritty
To Reproduce
- On Debian Bookworm, install
lnavusing snap:sudo snap install lnav - Follow the instructions listed in alacritty docs to build
alacrittyfrom the source - Open an
alacrittyterminal - Try to open a log file,
lnav config.log - See that you get an error message
❯ lnav config.log
✘ error: unable to open TUI
reason: the TERM environment variable is set to an unknown value: alacritty
You might be able to workaround by setting TERM to xterm-256color.
Sounds like the alacritty terminfo file is missing. Not sure if it's an issue with the snap build or something else.
Thanks @tstack - Just wanted to confirm I was able to open lnav after setting TERM to xterm-256color like you suggested
I am seeing same error. It was working fine but started seeing this error since a day ago.
λ lnav
✘ error: unable to open TUI
reason: unable to initialize notcurses Unknown error: 316
= help: The TERM value of “xterm-256color” is not known. Check for your terminal in https://github.com/dankamongmen/notcurses/blob/master/TERMINALS.md or use “xterm-256color”
MacOS Monterey 12.7.6 Terminal: Warp v0.2025.03.12.08.02.stable_03 lnav: Homebrewed version lnav 0.12.4
:/> env | grep -E 'term|COLORTERM'
Output:
COLORTERM=truecolor
TERM=xterm-256color
lnav works fine on iTerm2 and Mac Terminal.app.
I've posted this issue on Warp GH. Searching here found similar issue has been filed already.
Thank you.
@gigaimage I was able to replicate this and it seems like the DA1 response from the terminal might've changed and it was not recognized by lnav.
I'm experiencing the same problem with Rio terminal and tmux, with COLORTERM=truecolor and TERM=tmux-256color (and other combinations I've tried), on Linux.
@AndydeCleyre
I'm experiencing the same problem with Rio terminal
Can you try a recent beta release to see if the problem persists -- https://github.com/tstack/lnav/releases/tag/v0.13.0-beta4
@tstack Yes, thank you, the beta indeed does not have the problem.
@tstack : tested 0.13 beta4 Warp term (v0.2025.04.23.08.11.stable_01). It's working now. Thank you!
Sounds like things are working better now, going to close. Open a new issue if the latest releases are problematic.