-
-
Notifications
You must be signed in to change notification settings - Fork 158
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
Locale broken when osh is set as default shell #318
Comments
Thanks for the report! What distro are you on? I was not able to reproduce on Ubuntu 16.04. However I think this would be a good thing to document for people switching to OSH, as it appears it varies by distro. I'm not sure how the locale / LANG gets set to be honest! I thought it might have been in
|
I'm running Arch, where to set up localization you edit Do you have a file at
It's worth noting that osh does pick it up if you set the variable in According to the ArchWiki Bourne-compatible shells should source So I think osh just needs to source /etc/profile on startup? If I source it manually it looks like it works. I also tried adding
|
OK that makes sense. OSH intentionally doesn't source anything but one file: https://github.com/oilshell/oil/blob/master/doc/osh-manual.md As explained, that's to avoid this rat's nest: https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/ The way I see it, sourcing I will put a note about But I'm still not sure how it gets set on my system... my
|
I added more detail here: https://github.com/oilshell/oil/blob/master/doc/osh-manual.md Let me know what you think. The manual is not in great shape yet, but I expect setting up |
Ah, I think that explains the entire issue! I do feel like I'm not the only one who will encounter this problem and it might be worth adding a commented out Maybe it's because I'm not using a Display Manager like GDM or SDDM? I'm pretty sure when I was using SDDM with osh as my default shell I didn't have this problem. |
Closing since the cause for the issue has been found. |
When oilshell is set as the default shell (via any method: chsh, usermod, or making a new user with osh as default shell)
LANG
becomes unset (or never gets set?)If the shell is set to Bash
locale
will print the desired results, but if you use chsh to change the shell to osh and reloglocale
tells meLANG
and the other relevant variables are not set. Running osh from inside bashstill results in the correct variables being printed.
With bash as the default shell:
With osh as the default shell:
I feel like if the locale is set from KDE's settings this issue doesn't appear, but I no longer have KDE around to test it out.
Edit: I used this script to add osh to the shell list
The text was updated successfully, but these errors were encountered: