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

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

Open
tristan957 opened this issue Jul 26, 2024 · 3 comments
Open

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

tristan957 opened this issue Jul 26, 2024 · 3 comments
Labels
1. Bug Something isn't working

Comments

@tristan957
Copy link

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:

if [ "$TERM" != "" ]; then
error_message="Error: terminfo entry not found for $TERM"
term_without_first_character="${TERM#?}"
term_just_first_character="${TERM%"$term_without_first_character"}"
terminfo_sub_directory="$term_just_first_character/$TERM"
if [ "$TERMINFO" = "" ]; then
! [ -e "/usr/share/terminfo/$terminfo_sub_directory" ] \
&& ! [ -e "/lib/terminfo/$terminfo_sub_directory" ] \
&& ! [ -e "$HOME/.terminfo/$terminfo_sub_directory" ] \
&& echo "$error_message" >&2
else
! [ -e "$TERMINFO/$terminfo_sub_directory" ] \
&& echo "$error_message" >&2
fi
fi

@tristan957 tristan957 added the 1. Bug Something isn't working label Jul 26, 2024
@tristan957
Copy link
Author

tristan957 commented Jul 26, 2024

image

@tristan957
Copy link
Author

openssl is the container. gonk is the host.

@tristan957
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant