On Sa, 01.10.22 15:46, Nils Kattenbeck (nilskem...@gmail.com) wrote:

> I am logging in on a PC using SSH and need to access some peripherals
> which are attached to seat0.
> loginctl shows that my session is not attached to any seat:
>
> SESSION  UID USER      SEAT TTY
>      50 1000 septatrix      pts/0
>
> The devices are added to the seat using udev rules
> and I explicitly want to avoid making the device world read-/writeable
> or adding it to a group.
> Reading through the man pages for systemd-logind, pam_systemd etc
> did not lead me anywhere helpful but only confirmed the fact
> that virtual sessions are not assigned any seat by default.
> However I was unable to find information on how it is determined
> if a session is "virtual" or whether it can be configured for 
> pam/logind/udev...

So in logind "seat" is a way to group hw, and that hw-bound sessions
hence associate with one of these "seat"s. Non-hw-bound sessions
don't. It's how this was designed.

There's simply no way to say "hey, I am non-hw-bound session with a
seat", and I am not convinced the usecase is convincing enough to add
such a concept.

So, you might get quite far via setting XDG_SEAT env var in the PAM
session, but it's really a mess, I am pretty sure this will not work
properly, because it's not designed like that. i.e. multiple sessions
on the same seat are supposed to be session switchable, i.e. one in
the fg and all others in the bg, but any of them could be put in the
fg any time. but that simply makes no conceptual sense if an SSH
session is in the mix.

Sorry if that's disappointing.

Lennart

--
Lennart Poettering, Berlin

Reply via email to