Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

static ttyplot-amd64-linux aborts with error "Error opening terminal: xterm-256color." #45

Closed
emk2203 opened this issue Nov 21, 2019 · 18 comments

Comments

@emk2203
Copy link

emk2203 commented Nov 21, 2019

ttyplot-amd64-linux aborts with "Error opening terminal: xterm-256color."

The system has xterm-256color only at /usr/lib/terminfo/x/xterm-256color (Lubuntu install).

A strings /usr/local/bin/ttyplot | grep terminfo shows that the static binary expects it to be at /etc/terminfo:/lib/terminfo:/usr/share/terminfo or ~/.terminfo.

Workaround is to copy it to one of these locations.

Proposed fix: Please add usr/lib/terminfo to the path where ncurses looks for the terminal definition.

@tenox7
Copy link
Owner

tenox7 commented Nov 24, 2019

Interesting. I think the only way to permanently solve it, is to link against a custom build of ncurses with added extra data directories (--datadir or --with-terminfo-dirs).

For a workaround I think simpler may be to specify TERMINFO variable setting it to the correct terminfo folder.

@orbatos
Copy link

orbatos commented Mar 19, 2020

Setting TERMINFO does not seem to affect the issue at all, whether through tmux or not, and it does not appear to even be checking those hard-coded locations.
I attempted to both set valid TERMINFO and provide valid files at the sourced locations, even xterm-256color triggers the error.

This appears (?) to be because ncurses assumes TERMINFO is "broken".

From https://invisible-island.net/ncurses/ncurses-slang.html#env_TERMINFO_DIRS :

While slang's configure script has (since 2007) used the --terminfo option of ncurses scripts ncurses5-config or ncursesw5-config to obtain a suitable default for TERMINFO, it still relies upon a hard-coded set of directories rather using the corresponding --terminfo-dirs option to specify additional directories that ncurses's packager may have found necessary.

@nicedreams
Copy link

Been trying to use this for months, but get same error on Debian 10 stable, Sid, MXLinux, Ubuntu 18 and now Ubuntu 20. Any way to resolve this?

@tenox7
Copy link
Owner

tenox7 commented Nov 15, 2020

Sorry I thought this issue was specific to Lubuntu. I have just tried it on Ubuntu 18, 20 and it works fine. But it doesn't work on Debian. Let me see what can be done about it.

@nicedreams
Copy link

nicedreams commented Nov 15, 2020 via email

@tenox7
Copy link
Owner

tenox7 commented Nov 15, 2020

whats the location of terminfo database on kubuntu?

@tenox7
Copy link
Owner

tenox7 commented Nov 15, 2020

Can you try this build? You need to gzip -d and chmod +x:

ttyplot-linux-test.gz

@emk2203
Copy link
Author

emk2203 commented Nov 15, 2020

I have abandoned Lubuntu, but on Kubuntu 21.04 (dev version), it works as expected. terminfo database is at /etc/terminfo and /usr/lib/terminfo, by the way.

@nicedreams
Copy link

nicedreams commented Nov 15, 2020 via email

@nicedreams
Copy link

Just in case you didn't see the delete and edit of previous post via email I'll send another reply.

ttyplot-linux-test is working. I had a conflict with the older version I tried 2 days ago when did previous post, but it's working on Kubuntu 20.10 now.

@tenox7
Copy link
Owner

tenox7 commented Nov 15, 2020

okay I will make a release with this, thanks for testing!

@tenox7
Copy link
Owner

tenox7 commented Nov 17, 2020

I have updated the release with static build, can you please test again? thanks a lot

@nicedreams
Copy link

nicedreams commented Nov 17, 2020 via email

@tenox7
Copy link
Owner

tenox7 commented Nov 17, 2020

Actually if you could test the binary from 1.4 release would be even better:

https://github.com/tenox7/ttyplot/releases/download/1.4/ttyplot-amd64-linux

@nicedreams
Copy link

nicedreams commented Nov 17, 2020 via email

@tenox7
Copy link
Owner

tenox7 commented Nov 18, 2020

Thanks a lot for testing! In this case lets close the bug. Please feel free to re-open if needed.

@tenox7 tenox7 closed this as completed Nov 18, 2020
@emk2203
Copy link
Author

emk2203 commented Nov 18, 2020

Kubuntu 21.04 also OK here.

@tenox7
Copy link
Owner

tenox7 commented Nov 18, 2020

again thanks a lot for all the testing and reporting the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants