0

I cannot get commandline tools that use ncurses to work in iTerm2. They either fail or fall-back to some other UI if they have it (e.g. text only).

Example for VLC (installed via Homebrew):

% /Applications/VLC.app/Contents/MacOS/VLC -I ncurses
VLC media player 3.0.16 Vetinari (revision 3.0.16-0-g5e70837d8d)
Error opening terminal: xterm-256color.

I have tried with different values for the TERM (xterm, rxvt, vt100) env variable and got the same error.

More details about the iTerm2 session settings:

% env | grep -i term
LC_TERMINAL_VERSION=3.4.9beta1
ITERM_PROFILE=Default
__CFBundleIdentifier=com.googlecode.iterm2
TERM_PROGRAM_VERSION=3.4.9beta1
TERM_PROGRAM=iTerm.app
LC_TERMINAL=iTerm2
COLORTERM=truecolor
TERM=xterm-256color

Worth mentioning that this is only happening in an M1 MacBook Pro running macOS BigSur 11.5. With the same iTerm settings ncurses apps work fine in an Intel Macbook Pro running the same OS version.

0

1 Answer 1

0

This should be a duplicate, because I answered it in TERM=tmux-256color causes “Error opening terminal”.

If you happen to read the release notes for ncurses 6.1, you might notice this comment:

This release provides a new binary format for terminal descriptions that use extended numeric capabilities.

(older versions of ncurses cannot read that format, and if your application happens to try to read those, it will fail).

also, in the ncurses FAQ:

Due to its age, ncurses 5.7 may not work as expected. For instance, the command tput ed was seen to not work with MacOS. Additionally, 256-colors and direct-colors are not supported by the ncurses library (done in ncurses 6.0 and 6.1, respectively), and some extensions are known to malfunction even when using just the low-level terminfo or termcap interfaces (see ncurses 6.2 release notes).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .