Make use of setusercontext(3). This makes SDDM apply limits, CPU bindings, login class, and all the other stuff expressed in login.conf(5).
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 19762 Build 19317: arc lint + arc unit
Event Timeline
Intersting, with this, we could probably also get rid of the second hunk in patch-src_common_Configuration.h -- the somewhat fix to $path, right?
I'm not sure. I think the path is a kind of SDDM-specific override, and the current behaviour makes sense: just update it to the differences between Linux and FreeBSD, like it's done in patch-src_common_Configuration.h right now.
I'd need some help with pushing it upstream - the libutil CMake patch is FreeBSD-specific and I'm not sure how to rewrite it properly.
I'll handle the upstreaming part, although I'll comment a bit on what needs to change in this Phab review.
But more generally: how can I test if this actually works / does something? For instance, I have set ~/.login_conf to set LANG, and on ssh-ing to my workstation, LANG is set. But after logging in via SDDM, it isn't.
x11/sddm/files/patch-src_helper_CMakeLists.txt | ||
---|---|---|
8 | https://github.com/sddm/sddm/pull/1127 (that is only the CMake part, not the changes to UserSession.cpp below) | |
x11/sddm/files/patch-src_helper_UserSession.cpp | ||
30 | More typical in Qt code would be Q_OS_FREEBSD |
Thank you! As for testing - there's a number of things to check, such as resource limits (when you have them configured in login.conf), or the login class, if you have it set for your user in master.passwd (you can check it using 'ps auxwww -o class').
I'm afraid I can't help with testing it right now, as my FreeBSD laptop got squashed (like, mechanically).