supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Dallin Dahl <dallinjdahl@gmail.com>
To: supervision@list.skarnet.org
Subject: Re: s6 xinit replacement?
Date: Fri, 27 May 2022 22:07:48 -0600	[thread overview]
Message-ID: <3JCXXE0TNCBBU.2ZBCDXAHJIIXZ@oak.localdomain> (raw)
In-Reply-To: <727c2c8b-2b5e-24b4-f9e5-17e651217cc9@sholland.org>

Samuel Holland <samuel@sholland.org> wrote:
> It also works if X has permission to open the tty device read/write. Opening a
> tty as a session leader without a controlling terminal will set the controlling
> terminal to that tty. Relevant kernel code:
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/tty_jobctrl.c?h=v5.17#n129
> 
> And X will try to do that at startup (after failing to play with process groups
> because it is already group leader):
> 
> https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/hw/xfree86/os-support/linux/lnx_init.c#L207
> 
> I use a udev rule to set the tty owner:
> 
> $ cat /etc/udev/rules.d/99-tty.rules
> SUBSYSTEM=="tty", KERNEL=="tty1", OWNER="samuel", GROUP="samuel", MODE="0600"
> 
> And everything Just Works.

I currently have my tty owned by me whenever I login, with the group
set to tty.  The permissions are 600, so I would expect it to work
as long as I run X as my user, right? Unfortunately, I tried:
s6-setsid X :3 vt3
(on tty3), and had the same issue.  It's still trying to switch the vt.
Would I have to switch the group as well?  It seems that wouldn't
grant any additional privileges, especially since I am in the same
(supplementary) group as the tty?

It seems like a good option, I'm just unsure why it's not working?

Thanks!
--Dallin

  parent reply	other threads:[~2022-05-28  4:07 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-11  3:36 dallinjdahl
2022-05-14  3:47 ` Guillermo
2022-05-14 23:45   ` dallinjdahl
2022-05-15  1:52     ` Laurent Bercot
2022-05-15 15:02       ` Guillermo
2022-05-17  4:10         ` Rio Liu
2022-05-15  2:44   ` Samuel Holland
2022-05-22 15:07     ` Guillermo
2022-05-22 16:33       ` Samuel Holland
2022-05-23 10:05       ` yianiris
2022-05-23 23:40         ` Guillermo
2022-05-27  2:04         ` Steve Litt
2022-05-28  4:07     ` Dallin Dahl [this message]
2022-05-28 17:15     ` Dallin Dahl
2022-05-28 19:43       ` Samuel Holland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3JCXXE0TNCBBU.2ZBCDXAHJIIXZ@oak.localdomain \
    --to=dallinjdahl@gmail.com \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).