Summary: | x11/sddm: sddm_lang variable in rc.d script does not affect anything | ||||||
---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Serge Volkov <sv> | ||||
Component: | Individual Port(s) | Assignee: | freebsd-kde (group) <kde> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | CC: | arrowd, d8zNeCFG | ||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(kde) |
||||
Version: | Latest | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Serge Volkov
2020-02-23 17:32:31 UTC
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. :-) -- Martin 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.
-- Martin
(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. -- Martin Maybe this can be done on Qt level? Like, first save whole QProcessEnvironemnt::systemEnvironment(), do login_* magic, then restore? A commit references this bug: Author: arrowd Date: Thu Mar 5 13:38:01 UTC 2020 New revision: 527832 URL: https://svnweb.freebsd.org/changeset/ports/527832 Log: lang/sddm: Make SDDM honour sddm_lang rc variable again. PR: 244341 Submitted by: Martin Birgmeier <d8zNeCFG@aon.at> (initial patch) Changes: head/x11/sddm/Makefile head/x11/sddm/files/patch-src_helper_Backend.cpp Done this right way (tm). Thanks Martin for initial patch and Serge for the report. |