toolbox icon indicating copy to clipboard operation
toolbox copied to clipboard

profile.d/toolbox.sh doesn't take into account TERMINFO_DIRS

Open tristan957 opened this issue 1 year ago • 3 comments

Describe the bug TERMINFO_DIRS is another way to inform tools like tput(1) of terminfo(5) entries. Because the script doesn't take it into account, you get an error on startup like Error: terminfo entry not found for xterm-ghostty.

Steps how to reproduce the behaviour

  1. Store a terminfo entry in a non-default directory, like $XDG_DATA_HOME/terminfo
  2. Enter a toolbox container

Expected behaviour The script should read TERMINFO_DIRS.

Actual behaviour TERMINFO_DIRS is not read.

Output of toolbox --version (v0.0.90+) Current main branch at time of writing. See: https://github.com/containers/toolbox/blob/cb6eee85ef88a0dc8694707d29737f61fa0ac330/profile.d/toolbox.sh#L86-L101

tristan957 avatar Jul 26 '24 18:07 tristan957

image

tristan957 avatar Jul 26 '24 18:07 tristan957

openssl is the container. gonk is the host.

tristan957 avatar Jul 26 '24 18:07 tristan957

Although I guess this script is source before my bashrc where I set the relevant environment variables. Hmm. Interested to hear the thoughts of others.

tristan957 avatar Jul 26 '24 18:07 tristan957

Looks like it's deliberate, but honestly I'm not sure what the point of this error message is? It should be pretty obvious if you're missing the terminfo entry. If the code is knowingly not checking this properly then it would probably be better to just remove the check.

I see it was introduced due to some confusion but I guess my feeling is that now it's just confusing me instead. I've set TERMINFO_DIRS and it works, but this message is telling me it's not. So I had to come here to find out why and I just have a misleading error message that I can't get rid of.

kj avatar May 31 '25 13:05 kj