Re: s6 xinit replacement?

From: Samuel Holland <samuel_at_sholland.org>
Date: Sun, 22 May 2022 11:33:30 -0500

On 5/22/22 10:07 AM, Guillermo wrote:
> Hello, Samuel.
>
> El sáb, 14 may 2022 a las 23:44, Samuel Holland escribió:
>>
>> X is started at boot from my user supervision tree[1], which is started by the
>> user-* services in my system supervision tree[2].
>>
>> [1]: https://github.com/smaeul/rc-user
>> [2]: https://github.com/smaeul/rc
>
> I had a look at your s6-rc service definitions, and it seems that you
> don't have one for the system-wide message bus (D-Bus) and elogind.
> That, in addition to having the tmpfs whose path is stored in
> XDG_RUNTIME_DIR mounted by a "user-setup_at_<your user>" system service,
> makes me think that you are not running those. On the other hand, IIUC
> the Xorg process is part of a supervision tree that runs with your
> (unprivileged) user and is launched by service "user-services_at_<your
> user>", and I suppose that Xorg is not a suid binary, so unless you do

Yes, all of those inferences are correct.

> something else, your Xorg*.log file should contain something like:
>
> (EE) systemd-logind: failed to get session: PID <Xorg's PID> does not
> belong to any known session
> ...
> (EE) open /dev/dri/card0: Permission denied
> ...
> (EE) Screen(s) found, but none have a usable configuration.
>
> So, what did you do? Did you also grant your user privileges for
> opening the /dev/dri/card* character special files?

Yes, I do that the "old-fashioned" way, by adding my user to the `video` group.
There's a rule shipped by default with udev that changes the group of the DRM
devices:

SUBSYSTEM=="drm", KERNEL!="renderD*", GROUP="video"

For multi-user systems, I would probably use something like seatd:

https://git.sr.ht/~kennylevinsen/seatd

Regards,
Samuel
Received on Sun May 22 2022 - 18:33:30 CEST

This archive was generated by hypermail 2.4.0 : Sun May 22 2022 - 18:34:02 CEST