From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 2485 invoked from network); 28 May 2022 04:07:45 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 28 May 2022 04:07:45 -0000 Received: (qmail 16022 invoked by uid 89); 28 May 2022 04:08:10 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 16015 invoked from network); 28 May 2022 04:08:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:to:subject:references:in-reply-to:message-id:user-agent:from :mime-version:content-transfer-encoding; bh=lewdEPAz1KDzyJ8OJUJKkIZ0oB0piVxRD15DKjmz/bM=; b=nOybBS3hbxZew3WKDYMSDuYqwg+yROuCr+cOFdJ8+uODOZyvQsnGvDOH41sjHVIwCf slMH4AOaAUx9E8bxySBOMLXhnstsKR+Yd43j+OaBAUCiNlk5IYg4yfa4NtGQRByERqeM /zy9gb6kprwiKAzV7uUHlbWpuI0fOdQaSia4t83xzuf5VsQpyb6NO/p3uHIFJptN6dyL +ZCubPIUMOhNVObmv32W7TO3XQN4PU8veW3oxFB9maRGkfNvrgXCgOyay6HmR0S/LyLZ ZOF06TL0SidyyfWIl9sTy5H2gT0XiD5tmBNOLM+J9mwONev7j3Oti2cRpD/QDP+eHlDa PsTw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:to:subject:references:in-reply-to :message-id:user-agent:from:mime-version:content-transfer-encoding; bh=lewdEPAz1KDzyJ8OJUJKkIZ0oB0piVxRD15DKjmz/bM=; b=3I4rPyW4csl4cbumX4sIx1CF/KtOQUpUfnq/Snb+SLkv6bInYImBzQqjIqYTI0nHSO b+3l4lnPN3Z35XupPHF19RWMA0x8lT9EdWKeVfk9zKFOt9/LDqCjiKIKLNcnd/WQVvaz 3jNVsVvVGfPsTU3LICHt5lggkXcyaSNnxdd724AM95cSou/9FZBP+2us+D3kuU/muJgX uY9lBe5kjfAIR+qKC7Os91Y+7WO7bs3qqFkxeiZSssMY1EqEIdhSBRjylvSasGLZrXwX iaRwCuRrKGrFtMyO8JCa2GqyPIqD7xdSyHluLuGzyhtRZ6h0sOJ0aaIajBnFMxEyB7jn xsvA== X-Gm-Message-State: AOAM5337Ya8aIFBHrfttkSuH+MwpAZTBfcLFG6p5jU0Fe7xycgFK99wY G23BsRaGM6WgZG20qBNaWZhhuoOpoI1gkQ== X-Google-Smtp-Source: ABdhPJydJqjBpSQ2NWRQN+o2mWrG3ynBoyWj5NBRRNQnAPlc+a9Npjyk4jE6nrOh83hsdSOU5mkYUA== X-Received: by 2002:a17:902:b90b:b0:15f:bd0:18b5 with SMTP id bf11-20020a170902b90b00b0015f0bd018b5mr47107156plb.97.1653710861669; Fri, 27 May 2022 21:07:41 -0700 (PDT) Date: Fri, 27 May 2022 22:07:48 -0600 To: supervision@list.skarnet.org Subject: Re: s6 xinit replacement? References: <3VJC4G8PXTKVS.3RQFDLXYQABMW@oak.localdomain> <727c2c8b-2b5e-24b4-f9e5-17e651217cc9@sholland.org> In-Reply-To: <727c2c8b-2b5e-24b4-f9e5-17e651217cc9@sholland.org> Message-Id: <3JCXXE0TNCBBU.2ZBCDXAHJIIXZ@oak.localdomain> User-Agent: mblaze/1.2-7-gbb3dacc From: Dallin Dahl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Samuel Holland wrote: > It also works if X has permission to open the tty device read/write. Open= ing a > tty as a session leader without a controlling terminal will set the contr= olling > terminal to that tty. Relevant kernel code: >=20 > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/d= rivers/tty/tty_jobctrl.c?h=3Dv5.17#n129 >=20 > And X will try to do that at startup (after failing to play with process = groups > because it is already group leader): >=20 > https://gitlab.freedesktop.org/xorg/xserver/-/blob/master/hw/xfree86/os-s= upport/linux/lnx_init.c#L207 >=20 > I use a udev rule to set the tty owner: >=20 > $ cat /etc/udev/rules.d/99-tty.rules > SUBSYSTEM=3D=3D"tty", KERNEL=3D=3D"tty1", OWNER=3D"samuel", GROUP=3D"samu= el", MODE=3D"0600" >=20 > 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