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

Unknown TERM: /usr/share/terminfo/x/xterm #3

Open
scherrey opened this issue Dec 6, 2019 · 4 comments
Open

Unknown TERM: /usr/share/terminfo/x/xterm #3

scherrey opened this issue Dec 6, 2019 · 4 comments

Comments

@scherrey
Copy link

scherrey commented Dec 6, 2019

x4 doesn't understand my terminals. I get the following messages:

kde konsole:
scherrey@satriani:~/projects/forth/x4$ ./x4
Unknown TERM: /usr/share/terminfo/x/xterm

Au Revoir!

rxvt:
scherrey@satriani:~/projects/forth/x4$ ./x4
Unknown TERM: /usr/share/terminfo/r/rxvt

Au Revoir!

This is running on a Kubuntu 14.04 host:
scherrey@satriani:~/projects/forth/x4$ uname -a
Linux satriani 4.9.119-first-custom #1 SMP Mon Aug 13 18:33:19 +07 2018 x86_64 x86_64 x86_64 GNU/Linux

@scherrey
Copy link
Author

you are using a debian based distro it seems
#3
you do not have /usr/share/terminfo/anything
$ dir /usr/share/terminfo/
1/ 2/ 3/ 4/ 5/ 6/ 7/ 8/ 9/ a/ A/ b/ c/ d/ e/ E/ f/ g/ h/ i/ j/ k/ l/ L/ m/ M/ n/ N/ o/ p/ P/ q/ Q/ r/ s/ t/ u/ v/ w/ x/ X/ z/
debian based distros STUPIDLY put terminfo in /var/lib/terminfo
and i never added the code to look there
it annoys me lol
one quick fix would be to cp -r /lib/terminfo /usr/share
ive done that before
haha what distro do you use?
technically i should look in /etc/terminfo and in the utterly MORONIC /lib/terminfo and also in ~/terminfo
gentoo
occasionally i use mint
oh wow haven't used that in ages. I tried funtoo for a few years but, as a developer, it's so hard to keep the system consistent.
another fix you could do is edit src/ext/terminal/term.f and edit the path specified in there to where your terminfo files are
cool I'll give it a try some time.
personally i think debian based distros putting terminfo in /lib is DUMB
i always copy them into their correct location as defined by the FSHS

@thamesynne
Copy link

thamesynne commented Jul 1, 2022

I'm getting this too, and I'm using a distribution (Void Linux) with a fully populated /usr/share/terminfo.

But I'm only getting it happen when I start x4 under tmux. Under dvtm or mtm it's fine; I haven't tried screen.

I'm using the x86_64-musl variant of void, if that makes a difference. The message I get is

Unknown TERM: /usr/share/terminfo/3/3.3a

which is strange, because my TERM is set to 'tmux-256color' (although the same message pops up whatever I set it to).

@thamesynne
Copy link

Ah.. it turns out that tmux is setting TERM_PROGRAM_VERSION to 3.3a. If I unset this, x4 starts up just fine. Which implies that envcmp is only comparing the prefix of a name, not ensuring that they're both the same length. I fixed it by changing envcmp to

: envcmp        ( a1 a2 --- a2 n1 t | f )
  2dup swap count comp 0=
  if
    swap c@ + dup c@ '=' = if
      1+ strlen true
    else
      drop false
    then
  else
    2drop false
  then ;

but I'm certain there's a more elegant way to do that and avoid nested conditionals.

@mark4th
Copy link
Owner

mark4th commented Jul 13, 2022

I need to fix that bug, i discovered my environment compares were matching xyzzy if i searched for xyz which is wrong :)
Ill try get a push in on that asap

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

3 participants