| 25 Nov 2022 |
K900 | EXACTLY | 17:34:38 |
psvo | hm, for consideration: I've just switched my default locale cs_CZ.UTF8, but the shell spawned by WSL /init is still having LANG=en_US.UTF-8 | 17:38:08 |
K900 | Oh no | 17:38:19 |
K900 | I think it's worse actually | 17:38:22 |
K900 | LOCALE_ARCHIVE is normally set by PAM | 17:38:27 |
K900 | But we don't have a PAM | 17:38:29 |
psvo | hm, seems the env is correct only for the bash spawn by the /bin/login, so I believe you are right | 17:40:43 |
K900 | I wonder if it'll work if i set the environment on the systemd itself | 17:42:14 |
K900 | Since technically the /init process is its child | 17:43:16 |
psvo | it seem the locale is by /init | 17:44:05 |
K900 | Worst case, we can generate a horrible wrapper script to export environment.sessionVariables and then exec into the normal shell | 17:44:11 |
psvo | * it seem the locale is set by /init | 17:44:13 |
K900 | Oh actually I don't think we can | 17:48:34 |
K900 | That's fun | 17:48:35 |
K900 | Because we have to do it for every user and NixOS modules don't like this kind of recursion | 17:48:48 |
psvo | btw: https://learn.microsoft.com/en-us/windows/wsl/faq#how-do-i-change-the-display-language-of-wsl- | 17:51:14 |
psvo | please disregard, I've misunderstood it, it should not affect nixos probably | 17:52:26 |
K900 | OK I am very confused now | 17:53:18 |
K900 | login -f does invoke PAM | 17:53:31 |
K900 | But WSL doesn't invoke login -f | 17:53:51 |
K900 | Or rather, it invokes it ONCE | 17:53:55 |
K900 | Oh god I have a SUSPICION | 17:55:01 |
K900 | If this turns out to be it | 17:55:19 |
K900 | I will slap someone | 17:55:24 |
Arson Copperflame | From what I learned when I made the horrible runuser hack, systemd --user only works, when the shell is inside a PAM session and the PAM config that is used includes pam_systemd.so | 17:55:39 |
K900 | OK it's not it | 17:55:53 |
K900 | Thank god | 17:55:55 |
Arson Copperflame | So MS did the exact same thing that I did, but they used login instead of runuser | 17:55:56 |
K900 | I think what they're doing is worse actually | 17:56:09 |
K900 | They're spawning exactly one PAM session with login | 17:56:18 |