From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 76ECHqRvA2UmQwEAauVa8A:P1 (envelope-from ) for ; Thu, 14 Sep 2023 22:40:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 76ECHqRvA2UmQwEAauVa8A (envelope-from ) for ; Thu, 14 Sep 2023 22:40:04 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D9BAE467A6 for ; Thu, 14 Sep 2023 22:40:03 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=osTicVsG; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694724004; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eP9t8lwgvduY1UDpYJv409zxnCx2kRikV2618dbucKQ=; b=Jut8O3rfS2LNjbzR94dLHMBUJL5Ezj3vt4W83/Ub9I1O9GkshHljIWu6ryOT9g1PlWhkNq gB8IcRP2IiRRlw/MO7ui0QeHTmQRmrVy6RqAvzsCjVer4ZvkdS6mdK9Ztj9S4Kqm/IThft aPerw++V7CdDhQGbcoVjx1uNjQ2nSvEumzd771LZ6UJBoPDEj7Gert5pACTfQgE8fJz3pF R38eYuX08C8lvheqRKpQpvXSviAbyn5LAdzx5GPF2d8O3jVB38iH/70Sw04mYA3h9ifKpW isWgMYI4ppbgJrAV2QnqfA6fGUo/8B4/z6EVQTA264bXMHTXXg15Ntl0N3jXXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=osTicVsG; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694724004; a=rsa-sha256; cv=none; b=K1sRnNjlHogA3tWR3/3RLtoIGHZTFOrelKgtsxVNFVDVrk7odurtH4KTnsQkN+Jy+EG74m +Wbe3ZdTwGVHti9lZRAFtCa0F0HA97Y5f4w5gfFi7+wAFJ6bX0DzI1FYKUvqfqlyf7VvPT OvNLX7gnX+Ta+iT/eNdvff0BnPic2cx9g0lIALhYLYkvv/Q6fZK2iMjlcbPZycdQgLK757 6WQPKYRFAFBF327qFyaiDSV/ICdpkHdKnNAWatf96/p7x2kh7UNqjp6dxRXBdp1XSKT+y7 eR+S9vXXl1X4xhogvzuvWcLuBZhG/NEi7NNYuihdgbTKgk6syO8QDG/QSGQiPQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qgt82-0001NW-Bz; Thu, 14 Sep 2023 16:39:58 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgt80-0001JM-8m for guix-patches@gnu.org; Thu, 14 Sep 2023 16:39:56 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgt7z-0005P8-V3 for guix-patches@gnu.org; Thu, 14 Sep 2023 16:39:56 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qgt85-000498-R8 for guix-patches@gnu.org; Thu, 14 Sep 2023 16:40:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65343] [PATCH] home: services: Add 'x11-display' service. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Sep 2023 20:40:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65343 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Brian Cully Cc: Oleg Pykhalov , Andrew Tropin , 65343@debbugs.gnu.org, paren@disroot.org Received: via spool by 65343-submit@debbugs.gnu.org id=B65343.169472394815862 (code B ref 65343); Thu, 14 Sep 2023 20:40:01 +0000 Received: (at 65343) by debbugs.gnu.org; 14 Sep 2023 20:39:08 +0000 Received: from localhost ([127.0.0.1]:41253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgt7D-00047m-Ib for submit@debbugs.gnu.org; Thu, 14 Sep 2023 16:39:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgt7B-00046M-1G for 65343@debbugs.gnu.org; Thu, 14 Sep 2023 16:39:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgt6z-0005DA-2L; Thu, 14 Sep 2023 16:38:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=eP9t8lwgvduY1UDpYJv409zxnCx2kRikV2618dbucKQ=; b=osTicVsG0xbSvAKk3JOF xIU9cn5h4ubIAsTK93p6dhB+rl+458ury2CLgqbAx8txD5CaaBpL7k1qdlHBDufS+hbLyLa+X1x1c K6i8kJXqKMqE0ydvDiI63IN71ZwHB8s99hyIadSNvHUdZhJYcT5ZqHB2TUlSiM2kyfG/HYadde6E3 HkDZ9zjkp4x/+EwADN+lOKtPzefpigfvk0BQUBd6HdjhfkiToC5a/1W0rBfmwfwmNuaSuDx1qYIyz qRKm0352TbVKKbMWAKu2rwvVL/Oo8XkDdtuhtsFWQcKNIsevVjaHePXyV0OM3YCEjbNP/hTsVcvKp DYbvj2Id0RamuQ==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <877cpuernh.fsf@gmail.com> <87a5uqwvva.fsf@spork.org> Date: Thu, 14 Sep 2023 22:38:46 +0200 In-Reply-To: <87a5uqwvva.fsf@spork.org> (Brian Cully's message of "Wed, 16 Aug 2023 16:55:05 -0400") Message-ID: <87msxo5w2x.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -0.61 X-Spam-Score: -0.61 X-Migadu-Queue-Id: D9BAE467A6 X-TUID: 1/q69DGR1x6Q Hello Brian & Oleg, Brian Cully skribis: > If, for instance, I start an X session on the console, allocating the > first display (:0), everything will start up correctly. If I then log in > from a remote host with SSH using X forwarding, I'll get another display > allocated (:1), but this isn't accounted for. If I do these operations > in reverse, first starting my X-forwarded SSH session, then logging in > via console, it will almost certainly not do what just about anyone > wants. Yeah, and similarly with the scenario Oleg describes. > This does presume the Shepherd can be started multiple times for a given > user, No no, but it assumes simple scenarios: when you first login locally, X is not running yet, but you eventually start it and that=E2=80=99s the disp= lay you want your services to use. Anything beyond that won=E2=80=99t work, as= you point out. A simple improvement would be to stop the service when the relevant /tmp/.X11-unix socket disappears. As for which display to use when several are available (the SSH example above), I don=E2=80=99t know. Apparently elogind doesn=E2=80=99t know whic= h display corresponds to a =E2=80=9Cseat=E2=80=9D. Maybe we shouldn=E2=80=99t try to= guess and instead let users specify it, for instance with =E2=80=98herd start x11-display :42= =E2=80=99? Now, without this service the situation is even worse: shepherd and its sub-processes inherit whatever =E2=80=98DISPLAY=E2=80=99 value was in its e= nvironment, if any, and that=E2=80=99s it. This service is a hack, but might still do = more good than harm? Ludo=E2=80=99.