I didn’t know if most of C is US. I’d suspect too many people would not like that if it were true, but I don’t have a concrete answer. Maybe? Maybe not?
Wasn’t getting it to stay set at C but with LANG set at US what you wanted? Or have I completely been confused because it’s late? Then wouldn’t this be closest to that?
i thought C would be the default which would be english language for most programs (i meant the language, not the formats - formats are exactly what i was trying to get rid of)
and yes, that’s what i wanted and that’s what i meant in my previous post. so i said that C is likely pretty close to that.
since apparently it doesn’t matter what i set and it’s just going to take one value.
if i changed LANG to en_US, everything would change to that, including the dates and formats.
also it’s almost 5 in the morning here and i’d kinda prefer sleeping for a while. i might take a look at it later but i’m not sure if i’ll get any better results.
Did you look at the contents of file /etc/profile.d/locale.sh? You could add some log outputs (something like: echo "LANG = '$LANG'" >> /tmp/mylog) there (as the first and last command) to see if that is changing your desired settings.
Maybe i3 has some specific settings that affect the locale variables? I’m not using i3, but here we should have several i3 users that could chime in.
Hello,
I have read through this thread and if I have understood it correctly this is what you want:
I have played around a bit with “localectl” and may have found a solution.
solution.
You just need to extend the command line accordingly with the “LC_*=C.UTF-8” values. It’s a bit of work but it will produce what you want I think.
I thought of that this morning but hadn’t the time to get back here yet. Editing the shell script could definitely work, I saw multiple examples online.
I don’t use i3 either and really know nothing about it. I’d it like other to tiling setups where it uses a different WM or does it have it’s own?
Yes @HPF-84E I do believe that is what @elishka was hoping to achieve. My understanding (way too late in the day for my to work well) was that it was all or nothing. Albeit, it didn’t make sense because my own is a complete mess, but stays that way.
The other thing I haven’t quite figured out is why locale was giving different output than localectl for @elishka. I get same results when I do so.
I don’t think that LC_ALL=… is a good choice. It overwrites your previous input. It should only be run for a certain amount of time during a session. localectl refuses to run that too.
15:48:46^jag@jag-81vr:
~> sudo localectl set-locale LC_ALL=C.UTF-8 LANG=en_US.UTF-8
[sudo] Passwort für jag:
Failed to issue method call: Locale assignment LC_ALL=C.UTF-8 not valid, refusing.
15:49:24^jag@jag-81vr:
/etc/profile.d/locale.sh only sources /etc/locale.conf (i have no other locale configs) and exports the variables. it also says that if LANG is unset then it’s plain C but my LANG is set so that’s unchanged.
i3 shouldn’t have its own locale settings, i don’t see anything like that in ~/.config/i3/config
i’ve read the thread but i still don’t see why LC_ALL=C.UTF-8 is bad if i want a non-regional locale.
i can read and write accents and foreign characters just fine.
i don’t think any of those apply, sorry. i don’t have a desktop environment or a display manager that would change my locale (or at least i don’t think i do, i don’t see anything weird there) nor is this an unofficial locale.
You want to set everything to LANG=C. Is that correct? I tried it and it works. I have not changed the keyboard layout as I am from Germany.
The content of /etc/locale.conf is always reconfigured based on your entries. So it makes no sense to enter anything there.
Here is what I have done:
Check if available:
I have already written that before.
LC_ALL is ignored after a reboot because no setting is possible by default.
The fallback is probably used? I have no idea!
The first entry is created automatically if you follow my instructions.
i don’t think i fully get what you mean by “the first entry is created automatically”
i achieved this by editing /etc/locale.conf last night when i was solving the issue here and i get the same output from locale as you do.
Good question!
Answer: SystemD
No idea what exactly is being written in the background. But since SystemD you have to use “localectl” no matter what you write manually in /etc/locale.conf.
rtfm
now i understand even less. doesn’t localectl just write those settings to locale.conf?
editing locale.conf worked if i set LANG=C.UTF-8.
if it’s yet another systemd fault then i’ll be mildly disappointed.