Error on Tmux.

#19 · closed · 5 comments

View on GitHub ↗

ghost

Apparently the underlying library has no compatibility with Tmux (although it is only superficial), this is because Tmux sets the environment variable to `tmux-256color`, so it will end up with an unknown terminal error, instead, if the environment variable is changed to `xterm-256color`, the program works as expected. This is the error I get: ``` failed to run catnip: termbox: error while reading terminfo data: termbox: unsupported terminal ``` But if I run it this way, the problem is solved: ``` TERM=xterm-256color catnip ```

Comments

noriah

I think it will be reasonable enough to check the env for the tmux value, and replace it before starting termbox.

noriah

@ALizarazoTellez I am unable to reproduce any error. I tried in tmux, with the tmux TERM value, and a combination of both. What version of tmux are you using? ```shell > tmux -V tmux 3.3 ```

ghost

The versions I have installed: ``` $ tmux -V tmux 3.3a ``` ``` $ catnip --version Version: git $ git describe v1.8.0-12-g8071546 ```

ghost

I just did several tests on other terminal emulators and got a strange pattern (I apologize for my English, I am not a native speaker): https://github.com/noriah/catnip/assets/65132831/4b79db2a-b2b6-4adf-8873-30825f9dea7c

ghost

I think I found the error... If I invoke the program this way, it will fail, apparently it does not recognize the combination of these two variables: ``` TERM=tmux-256color TERMINFO=/usr/lib/kitty/terminfo catnip ``` What happens in the video, is that if I close all my _Tmux_ instances, and open _Kitty_ first, Tmux will share the value of the `TERMINFO` variable with the one that _Kitty_ provides in all sessions from now on, that's the reason why it then fails in _Foot_. But if I close all sessions and start with _Foot_, _Tmux_ will use the value that _Foot_ provides for `TERMINFO` (none in this case) and will use it in all sessions, including those started by _Kitty_, that's the reason why it doesn't crash later on _Kitty_. I hope I made myself understood...