Re: s6 xinit replacement?

From: <dallinjdahl_at_gmail.com>
Date: Sat, 14 May 2022 17:45:24 -0600

Hello,

Guillermo <gdiazhartusch_at_gmail.com> wrote:
> If the Xorg process does not run as root, the tty specified in the vt
> argument must be its controlling terminal. It works if you run X from
> an interactive shell (perhaps indirectly through 'startx'), because it
> inherits the shell's controlling terminal. It doesn't when run by
> s6-supervise, because s6-supervise executes the 'run' file in a new
> session, so there is no controlling terminal.
>
> You can see Xorg fail in the same way if you do:
>
> $ setsid startx
>
> Using util-linux' setsid(1), or:
>
> $ execlineb -Pc 'background { s6-setsid startx } exit'
>
> G.

Is the purpose of executing setsid() in s6-supervise to allow for the
services to continue beyond the termination of the supervision tree?
If that's the case, could there possibly be a flag to disable that,
with the understanding that something like nohup or even s6-setsid would
be necessary to replicate that behavior? That would enable a non-root
Xorg to be managed by s6.

I don't know if that has any other implications, other than the fact that
it would add a flag to s6-svscan, and maybe to s6-supervise? I don't
know if that cost is worth it, but I'm also not sure it warrants having
2 projects that duplicate the effort. Xinit seems to try to do what s6
does, but poorly.

Thanks!
--Dallin
Received on Sun May 15 2022 - 01:45:24 CEST

This archive was generated by hypermail 2.4.0 : Sun May 15 2022 - 01:45:50 CEST