On Thu, Jul 16, 2026 at 5:13 AM Philipp Zabel <[email protected]>
wrote:

> On Mo, 2026-07-13 at 14:30 -0600, Joshua Watt wrote:
> > On Thu, Jul 9, 2026 at 2:45 AM Philipp Zabel via lists.openembedded.org
> > <[email protected]> wrote:
> >
> > > On Mi, 2026-07-08 at 17:37 +0300, Leon Anavi wrote:
> > > > Add pam to DISTRO_FEATURES_DEFAULTS in init-manager-systemd.inc.
> > > > This way pam will available if variable VIRTUAL-RUNTIME_init_manager
> > > > has been set to systemd. Otherwise having systemd in conjunction
> > > > with wayland but without pam leads to a conflict with the
> > > > REQUIRED_DISTRO_FEATURES for weston related recipes.
> > >
> > > I think these requirements are partially incorrect, btw.
> > >
> > > Weston itself only requires PAM for the VNC password, so if
> > > PACKAGECONFIG[vnc] is disabled, there is no PAM dependency from
> > > weston_15.0.1.bb at all, and if vnc is enabled, the PAM dependency has
> > > nothing to do with systemd being enabled or used as init system.
> > >
> > > The PAM dependency in weston-init.bb comes from the PAMName=weston-
> > > autologin option in weston.service and the corresponding weston-
> > > autologin PAM configuration. Those files are always installed if
> > > DISTRO_FEATURES has systemd, even if VIRTUAL-RUNTIME_init_manager is
> > > set to something else.
> > > Shouldn't either the pam distro feature depend on the systemd distro
> > > feature, or should the weston.service/weston-autologin files be
> > > installed at all if the systemd distro feature is enabled but
> > > init_manager is set to something else?
> > > I think it wouldn't be even better to remove the PAM requirement from
> > > weston-init if VNC is disabled, as Weston doesn't need the PAM login in
> > > that case.
> > >
> >
> > I believe weston-init needs PAM regardless of VNC being enabled.
>
> Yes. I failed to realize weston-init relies on pam_systemd.so to set
> XDG_RUNTIME_DIR (which weston needs to create the wayland socket) in
> its current state. The weston.service could just as well pass it via
> the environment, though, for example:
>

It does more than that. It creates an entire user session, which does that
(among other things); I don't think just setting XDG_RUNTIME_DIR would
actually fix the problem.

weston-init is as simple as it because uses PAM+systemd to do the session
managment, which means it still behaves like a normal session (like you
would get when you login). It quite simply wouldn't work as expected
without PAM because there would be no more session. Are there session
managers that _don't_ use PAM?

Also, what's the real goal here? Do we want weston to run on startup one
way or another? If so, it probably needs a session manager of *some* kind
(weston-init being one), which will probably use PAM (even though weston
itself does not use PAM). Otherwise, the other option is to just say that
oe-core doesn't support that by default and you have to login on the
console and run weston after login (in which case, we need neither PAM nor
weston-init).


>
> RuntimeDirectory=weston
> Environment=XDG_RUNTIME_DIR=/run/weston
>
> We've used this with an explicit socket path and WAYLAND_DISPLAY
> exported via the systemd environment:
>
> ExecStart=/usr/bin/weston --socket=${RUNTIME_DIRECTORY}/wayland-1 ...
> ExecStartPost=+/usr/bin/systemctl set-environment
> WAYLAND_DISPLAY=${RUNTIME_DIRECTORY}/wayland-1
>
>
> regards
> Philipp
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#241103): 
https://lists.openembedded.org/g/openembedded-core/message/241103
Mute This Topic: https://lists.openembedded.org/mt/120174368/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to