[systemd-devel] Creating a fake logind seat with no devices [Experiment]
nerdopolis
bluescreen_avenger at verizon.net
Thu Jul 30 03:17:51 UTC 2020
On Wednesday, July 29, 2020 7:13:23 AM EDT Lennart Poettering wrote:
> On Mi, 29.07.20 00:11, nerdopolis (bluescreen_avenger at verizon.net) wrote:
>
> > Hi
> >
> > Sorry about the length.
> >
> > I have a unique thing I am trying to solve, is that if I have a service that calls /sbin/logind under
> > something like tmux, and I set `Environment=XDG_SEAT=seat0` in the service file, upon logging in,
> > pam_systemd fails to create a session, as it's seat0 and it's expecting a valid TTY number, as it's
> > seat0. One of the side effects is that you lose the credential prompt that you usually get if you
> > run a command like `systemctl restart foo.service`, and there could be other things too?
>
> Seats are a concept of grouping hardware. A seat without hardware
> is pointless. If you have no hardware associated with a session then
> the session is seat-less, which is totally fine.
>
> I don't get what you are trying to do?
>
> Lennart
>
> --
> Lennart Poettering, Berlin
>
Hi
I am pretty much trying to cobble together tmux, cage, and vte, to create a full screen VT-like
console lookalike. (as the kernel one takes input from all devices from all seats on a multiseat
system). Mostly experimental.
(tmux server/client being used to avoid having to start vte and cage as root for /sbin/login)
The problem is that the tmux PTY running /sbin/login , those sessions don't properly create a full
pam_systemd sessions on seat0, as I get "VT number out of range", because as I understand seat0
sessions need to be on a valid TTY. Non-seat0 seats don't have this restriction, but non-seat0
seat hardware is far from a guarantee
However I will note so far the only major side effect I notice to not having (sd-pam) started in
this session is, for instance `pkexec` won't work, without sudo. And systemctl doesn't try to use
PolicyKit and whatnot, as from what I understand, that needs to be on a session assigned to a seat
to work I think
Thanks
More information about the systemd-devel
mailing list