Kron4ek / Conty

Easy to use unprivileged Linux container packed into a single portable executable
MIT License
776 stars 45 forks source link

Use locales from the host system to save space #155

Closed ivan-hc closed 3 months ago

ivan-hc commented 3 months ago

Here I've only disabled the locale-gen functions in the bootstrap script and added a --bind-try to /usr/lib/locale

If this works for you, you can also completelly remove the locale-gen functions.

If not, we need to add this step to the bootstrap script

# Use locale from host
run_in_chroot rm -f "${bootstrap}"/etc/locale.conf
run_in_chroot sed -i 's/LANG=${LANG:-C}/LANG=$LANG/g' /etc/profile.d/locale.sh

this is all I do to let all my Arch Linux-based AppImages talking my language.

Generated locales may take more unneeded disk space, in particular with chinese and other big translation packs.

The only AppImage that I have that still talks in english is Virtualbox KVM, but I think that this is an issue of the program itself, it is not the upstream VirtualBox release, but a fork. No other Appimage gives me this problem.

PS: your software is perfect as is, mine is a tip that you may safely ignore.

Kron4ek commented 3 months ago

Thanks, but I'd prefer to have locales inside the container. Otherwise it might be an issue, for example, on musl-based systems where locales are not exactly the same as in glibc, at least in theory.

ivan-hc commented 3 months ago

I close this PR because I'm working on other things that will conflict with your branch.

Thank you for the attention.