s6 xinit replacement?

From: <dallinjdahl_at_gmail.com>
Date: Tue, 10 May 2022 21:36:52 -0600

I had the thought to start up all my personal services with s6, and it's
going well. However, looking at the xinit source code, it appears to
start the X server, wait until it's up, start a client program, wait
until it shuts down, and then kill the X server. It seems to me that
xinit is effectively performing process supervision on the X server and
client program.

I tried to run X under s6 with the following run file:

~~~
#!/usr/bin/execlineb

backtick -E screen {
        pipeline { tty } sed s:/dev/tty::
}

export DISPLAY :${screen}

X :${screen} vt${screen}
~~~

Unfortunately, the server never starts up, although I can run those
commands just fine from the tty. The last few lines of my Xorg log are
the following:

~~~
(WW) xf86OpenConsole: VT_ACTIVATE failed: Operation not permitted
(EE)
Fatal server error:
(EE) xf86OpenConsole: Switching VT failed
(EE)
(EE)
Please consult the The X.Org Foundation support
         at http://wiki.x.org
 for help.
(EE) Please also check the log file at (redacted) for additional information.
(EE)
(WW) xf86CloseConsole: KDSETMODE failed: Operation not permitted
(WW) xf86CloseConsole: VT_SETMODE failed: Operation not permitted
(EE) Server terminated with error (1). Closing log file.
~~~

Does anybody know anything about how s6-svscan and s6-supervise might
change the environment so as to complicate running X? I've also checked
to see if the tty got modified, but running the tty command under s6
from the tty console gives the same output as running it directly from
the console.

Thanks for your help!
--Dallin
Received on Wed May 11 2022 - 05:36:52 CEST

This archive was generated by hypermail 2.4.0 : Wed May 11 2022 - 05:36:54 CEST