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

ENV lost when executing htop #2

Closed
pachulo opened this issue May 27, 2018 · 3 comments
Closed

ENV lost when executing htop #2

pachulo opened this issue May 27, 2018 · 3 comments
Assignees

Comments

@pachulo
Copy link

pachulo commented May 27, 2018

I think that something is wrong with the ENV when executing htop, because, for example, when I choose the "Tree" view, the "lines" are drawn using ASCII:
image

But if I execute the binary directly, like this:

$ /snap/htop/current/bin/htop

UTF-8 characters are used:

image

@maxiberta
Copy link
Owner

Hi! Thanks for the report. The environment is not lost when running the snap, as shown by snap run --shell htop -c env. But what's missing seems to be the precompiled locale definitions for all locales, except the default C, C.UTF-8 and POSIX (as shown by snap run --shell htop -c "locale -a").

I've (hopefully) fixed it by bundling all base text locales with the htop snap, and adding a small wrapper script that generates the binary locale on the first run if needed (from the LANG envvar), and caches it in $SNAP_USER_COMMON/locale (i.e. $HOME/snap/htop/common/locale). This is now published in the candidate channel, waiting for feedback before promoting to stable. Please let me know if it works for you :-)

Thanks again!

@pachulo
Copy link
Author

pachulo commented May 28, 2018

Wow, that was fast!
I was wrong then: tested it and it works OK now, thanks a lot!!!

@maxiberta maxiberta self-assigned this May 28, 2018
@maxiberta
Copy link
Owner

The updated snap is now published on the stable channel.

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

2 participants