a very recent update to base-files-osmc, more specifically to /etc/profile.d/103-generate-locale.sh, sets by default the locale “C” for all users except osmc. This overrides anything that may be set in /etc/profile or /etc/environment, and has become a bit of a pain for me. I have fixed it by tinkering with that file to revert the change. I know I could override this in each user’s personal ~/.profile file, but it is not practical if several users are on the system, plus I have several osmc systems in the house (yes I do like and appreciate your work!).
I would like to suggest to revert the change and delete the first three lines.
However, if this latest change is important for reasons that I simply don’t understand, another suggestion would be to check if LC_ALL or LANG are already set before changing them.
Suggested code to replace line 2:
if [ "$user" != "osmc" ] && [ -z "$LC_ALL" ] && [ -z "$LANG" ] ; then
Somewhat but not quite. I now understand why the change was introduced, thanks for pointing me in that direction.
I wasn’t having any problem in invocation of the sudo command. So the fix for the issue raised by aldehoff has the unintended consequence of overriding locales already set for non osmc users.
I think my suggested code could make everyone happy?