Page MenuHomeFreeBSD

x11/sddm: Make use of setusercontext(3)
Needs ReviewPublic

Authored by trasz on Sep 23 2018, 1:25 AM.

Details

Reviewers
adridg
Group Reviewers
kde
Summary

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 Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 19762
Build 19317: arc lint + arc unit

Event Timeline

trasz created this revision.Sep 23 2018, 1:25 AM
trasz edited the summary of this revision. (Show Details)Sep 23 2018, 1:27 AM
trasz added a reviewer: kde.
linimon retitled this revision from Make use of setusercontext(3) to x11/sddm: Make use of setusercontext(3).Sep 23 2018, 4:19 AM
tcberner added a subscriber: tcberner.

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?

trasz added a comment.Sep 27 2018, 1:33 PM

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.

This seems sensible, but it should really be submitted upstream as well.

trasz added a comment.Oct 15 2018, 3:40 PM

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.

adridg added inline comments.Jan 18 2019, 1:11 PM
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

trasz added a comment.Jan 18 2019, 3:48 PM

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).