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 31359 invoked from network); 28 May 2022 17:15:00 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 28 May 2022 17:15:00 -0000 Received: (qmail 4653 invoked by uid 89); 28 May 2022 17:15:25 -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 4645 invoked from network); 28 May 2022 17:15:25 -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; bh=UP4kayL/Gd382GqTgNr9nOibO2qMA6YelsdkKh1/V/Q=; b=RQlzAIPCJJ2U4Wd9Xu1GBISA84rdpeTCULbPeTZH+hiLiU+iexrv31wmkjAHcfPyhZ 7STWBt6E0gmJZAdjdLY0h2EWQ+NMlxc6hBEztjtzHHSwjjZ224bW9ggLg2HuOIDrvXVt PJS9slYwNlD+EO3z1dvWkFleK/+h9DQEYRdNWoyRynFRLSQMGNSwo92dDfAbRLkYeiwK aS4EY9x5seN2sjP9TpVYxZ8dUw++bfS/xKXKveDvXBhXNCI1y+D3YudzWgqTaQOz49NV pbn1+Rhxej6HD92HPDqfwfL1rZ0mP9KAlMwBgw16GeEnZnAYvbNUau7NePjlHVwhLeNz rsng== 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; bh=UP4kayL/Gd382GqTgNr9nOibO2qMA6YelsdkKh1/V/Q=; b=dTWBxb26Uy9ZrmL62dL4qGtII0LmnTH05e6SkYrJWjYigUVxcpB8mDWVI2OBo0emkK RpWdq8P7SW/BFCbweequ5+xAwb6K2A22Sjli/rRLIN2HNgaUasWvrIdfMb5p+nO3izip EHJT3cJmJXwAmmGRkpu/Lxs+DdsNCQaFruQ0KSnO4WsOJLc0gzM1SB0aAm5GVAqi+lc2 y/MJgC5pHCJlV6hvEPn2v0qXobh3Em8J4ftcdktH9P/LxWSOY0qDO44HEODZPVBI2wue Q4zTVex9MmA7x1BUDB8N+XInPYlanyJkAZm/DE4dIPjkJjpxDYXwUKhEMl2EvauTPYQ+ 0HBA== X-Gm-Message-State: AOAM530HKkn75/DKdnY+joQFEuzYLMfCwKllIHcPdPJQwli4D7xYJbdq njqQO8RerlVFrY1torIJ773h+k3Aa+Rxwg== X-Google-Smtp-Source: ABdhPJzuCVYptng/y07hPIrNW1ezyhA0rONR8uAEpxjFNNtZcz1Xm3b7lvvSus0qlMGlG4/NSuml/A== X-Received: by 2002:a17:90b:4ac9:b0:1e0:ce14:20dd with SMTP id mh9-20020a17090b4ac900b001e0ce1420ddmr14480752pjb.198.1653758096258; Sat, 28 May 2022 10:14:56 -0700 (PDT) Date: Sat, 28 May 2022 11:15:03 -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: <24F5HUEF0UP3F.2ESV518R0KDGL@oak.localdomain> User-Agent: mblaze/1.2-7-gbb3dacc From: Dallin Dahl It turns out I had the same issue as Rio, since my login shell was still controlling my terminal. If I run: exec s6-setsid X :3 vt3 while logged into tty3, I get an X display. However, I still can't seem to get it to work with s6-svscan. If I exec into s6-svscan from my login shell, svscan then controls the tty. If I exec into s6-setsid s6-svscan, it still seems attached to the tty. I thought that maybe using the tiocnotty ioctl call would free the tty for X to pick up, so I wrote the following wrapper program: #include #include #include #include int main(int argc, char **argv) { int tty = open("/dev/tty", O_RDONLY); int res = ioctl(tty, TIOCNOTTY); if(!~res) perror("tiocnotty"); argv++; execvp(*argv, argv); return 0; } and tried to exec into that before s6-svscan, both with and without s6-setsid. Unfortunately, the process immediately exits. I don't think it's my wrapper program, since I can run other programs with it without problems, and they do indeed show up in the output of ps aux without a controlling terminal. So I guess the new question is how can I free the tty after login, allowing X to open it and control it? Thanks so much for your help! --Dallin