weston-launch: Provide a default version that doesn't require PAM
weston-launch requires PAM for starting weston as a non-root user.
Since starting weston as root is a valid use case by itself, if PAM is not available, provide a default version of weston-launch without non-root-user support.
Signed-off-by: Tom Hochstein tom.hochstein@nxp.com Signed-off-by: Jussi Kukkonen jussi.kukkonen@intel.com Signed-off-by: Denys Dmytriyenko denys@ti.com Signed-off-by: Ming Liu ming.liu@toradex.com
Merge request reports
Activity
Third,
weston-launch
is going to be removed: #488 (closed)As @daniels said, we allow distros without PAM support. We currently use
weston-launch
because we supportsysvinit
as an alternative in minimal systems or license-sensitive environments.Why do you still need
weston-launch
withsysvinit
when you do not have PAM? Why do you not disable buildingweston-launch
completely in that case?You could as well just run
weston
directly as far as I can imagine, there should not be any need forweston-launch
. This is what puzzles me. Is it just cargo-cult to useweston-launch
, or is there an actual reason?You don't need logind or any logind replacement daemon either to run
weston
directly as root or as any statically configured user.@pq, it has been a while since the last time I played with it, so I don't recall the details. However, if you say it'd work, I trust you. It'd be great if there is a doc describing it, though.
That's the problem: I am not absolutely sure it will work, because I probably cannot imagine what you are doing. So I want to learn exactly what you are doing and how it doesn't work, not commit a "blind fix". Maybe you can do your thing in a better way, or maybe we do need to fix something upstream.
I recall a long time ago having a look at some Yocto related Weston integration and being so horrified of all the cruft there that I just walked away. Hence I prefer the people actually working on that stuff to tell me what goes wrong if they do things the way I imagine it should work.
Nowadays we do have some docs in https://wayland.pages.freedesktop.org/weston/toc/running-weston.html but I don't know if they cover your use case. You can find those docs via the Wayland main site: https://wayland.freedesktop.org/ → Software → Weston documentation.
FWIW, I do not have any strong feelings for this patch; if its authors do not speak up, I will simply drop it from yocto, and adjust configurations and tests so the yocto CI doesn't fail. We try to enforce 'upstream first' policy for invasive changes like this, but sometimes they slip through.
Ok, great! I would like to hear how that works out. To clarify, instead of adding "disable PAM" you would just use "do not build weston-launch" in the Weston build configuration. The net effect should be the same, with the exception that
weston-launch
won't be available, but one should be able to replace that withweston
and maybe little scripting around it.I wouldn't call this invasive but more a matter of policy. We try to keep the number of different supported ways to run Weston small upstream to make it more manageable and to promote best practices.
Currently I think we have these options:
- with logind, for full-fledged multi-user OS
- with seatd, for multi-user OS without logind
- as root without any daemon, for developer testing and maybe for systems without users
I guess "without any daemon but as a non-root user" could be another case, but it feels like a half-way house that does nothing well: you are playing around with separate users, but you still need to allow that user access to input devices which means you may be vulnerable to input spying.
Sounds like people are happy to try things without
weston-launch
, so I will close this MR for now. If you get new information about needing this patch, please do not hesitate to re-open and comment here. Thanks!Also remember that
weston-launch
is going to be removed completely from upstream, probably after the next release cycle. I would recommend looking into libseat particularly if you are not using systemd-logind.I've sent RFC patches for weston 10.0.0 in yocto, pls take a look:
https://lists.openembedded.org/g/openembedded-core/message/161155
https://lists.openembedded.org/g/openembedded-core/message/161156
Upstream has deprecated both weston-launch and fbdev backend, so let's not delay the inevitable and find replacements. Fbdev can be replaced by passing --use-pixman to drm backend; this will bypass the opengl paths and use CPU for rendering. Apply where GL is too slow or unavailable. weston-launch can be replaced by starting weston directly, with a seat management daemon for support. This is provided either by systemd, or on systemd-less systems, by seatd. The sysvinit startup scripts and tests have been rewritten accordingly. Bonus fix: under sysvinit weston now starts under weston user as it should, and not under root.
Edited by Alexander Kanavin