After upgrading to the version 0.18.1, I got a problem.
In the file /etc/rc.conf I have a variable sddm_lang="ru_RU". This variable is described in the file /usr/local/etc/rc.d/sddm. Previously, the SDDM interface was in Russian. Now the value of this variable does not affect anything. SDDM interface is now always in English.
pw usermod sddm -L russian
Thus, I changed the SDDM interface language to Russian.
It may be necessary to remove the use of the sddm_lang variable in the /usr/local/etc/rc.d/sddm file.
It may be necessary to add help information on how to change the SDDM interface language.
Solving this would be really tough... basically, the process model differs very much between Unix and QT5.
The patch in issue 241519 basically mis-uses the SDDM process environment to prepare the future child process environment because setclassenvironment() only allows to modify the current process environment - which normally would already be the child's environment.
To really correct this, a variant of setclassenvironment() would have to be written which allows to specify an independent environment to modify.
Maybe it would instead be possible to just save the current environment, create an empty one, do the setclassenvironment() stuff, then call env.insert() on it, and finally restore SDDM's correct environment.
Maybe this would then also address the issue of starting with a clean environment for the user, as described in https://github.com/sddm/sddm/pull/1234.
And don't ask me when I might find the time to look into this. :-)
Created attachment 211999 [details]
patch to use setclassenvironment() without mangling SDDM's environment
Can you try the attached patch? - It should replace the one from issue #241519.
(In reply to Martin Birgmeier from comment #2)
I tried this patch. Works as expected. The interface language is taken from the 'sddm_lang' variable, and the user environment is taken from login.conf. Probably this patch is more correct.
There is still a problem - we are leaking the temporary environment on each login.
Probably a problem only after hundreds of logins.
Maybe this can be done on Qt level?
Like, first save whole QProcessEnvironemnt::systemEnvironment(), do login_* magic, then restore?
A commit references this bug:
Date: Thu Mar 5 13:38:01 UTC 2020
New revision: 527832
lang/sddm: Make SDDM honour sddm_lang rc variable again.
Submitted by: Martin Birgmeier <d8zNeCFG@aon.at> (initial patch)
Done this right way (tm).
Thanks Martin for initial patch and Serge for the report.