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 uAs5NZ0Y92S+awEAauVa8A:P1 (envelope-from ) for ; Tue, 05 Sep 2023 14:01:34 +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 uAs5NZ0Y92S+awEAauVa8A (envelope-from ) for ; Tue, 05 Sep 2023 14:01:33 +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 52EDB5B92C for ; Tue, 5 Sep 2023 14:01:33 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=WB1mXjn6; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1693915293; 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: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=q3vdKyvOR3c9DKF5g3t4s4jda8CSzRPjZysVJmDDBt8=; b=s+caYuSWuNc2+zTZts3/KA/d+t4b3pWLc2/fgzOqFysJ622XKAxMC8MMkAn0tVS/flrj1p G9omKqWVUAUA3MElIzIYnkHI0t7+vuH03gmjKXdGg0XQGZi73ADPKD0np4tDiU13VYFIoq KSfRjrIiY6YIh3ISNwGhvNRIxhuFHE7ptp80YDnyn3eoPFZpHdnfzrYVwv4OyuPE5Dt7u1 Bkrn5AKhqGjhc+qyA8zHdKK8RRK6fQwNU3bXSPK9oPkHMLR/WYfZ0ABuLFY9b5WtdxxerI s5gOjVippWonv5Z+PYF4eycFY5x/bVrCLlmmhAPcq8jwO56sHMhJuyDXuiKpOg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=WB1mXjn6; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693915293; a=rsa-sha256; cv=none; b=lLxdjuyFZHCUpXPzy7JX5rJ8uGfV3XGkA+lPXuudhZjo9N2r6DjEqNj8rnq86adhghqIR5 SUHpDmevaoebbw0Kg9GzxJtYzeT9VjOuc0/n4b1eNZy8NPdqTejZhMV+1Z6g7fXbPivKAK 3zIowMqg4lF2z/owjT8kfPse+X4F7jcPGqWBXK4i5BsPcB4XMZ8mQhrpFQAm+92BOsr23h dn7A3EVRIfhT5DiCjdyyBjs0a6h8hnvu004n7K0f3y4vHxOYZhIQoR3qsXJ5unIaSTwhLE Z9lG+b5z8V08j3ihocD3pVfOilZ5Ojv+hKpK90jwwFc+KrtNtpvbOogN5cqq/A== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdUjw-0006i7-5v; Tue, 05 Sep 2023 08:01:04 -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 1qdUju-0006fG-4T for guix-patches@gnu.org; Tue, 05 Sep 2023 08:01:02 -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 1qdUjt-0003is-SA for guix-patches@gnu.org; Tue, 05 Sep 2023 08:01:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qdUju-0006oD-4Z for guix-patches@gnu.org; Tue, 05 Sep 2023 08:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65343] [PATCH] home: services: Add 'x11-display' service. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 05 Sep 2023 12:01:02 +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 , Oleg Pykhalov Cc: paren@disroot.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= , 65343@debbugs.gnu.org Received: via spool by 65343-submit@debbugs.gnu.org id=B65343.169391524126136 (code B ref 65343); Tue, 05 Sep 2023 12:01:02 +0000 Received: (at 65343) by debbugs.gnu.org; 5 Sep 2023 12:00:41 +0000 Received: from localhost ([127.0.0.1]:54653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdUjY-0006nU-UL for submit@debbugs.gnu.org; Tue, 05 Sep 2023 08:00:41 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:55093) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qdUjW-0006nH-Ms for 65343@debbugs.gnu.org; Tue, 05 Sep 2023 08:00:39 -0400 Received: by mail.gandi.net (Postfix) with ESMTPSA id 8DCF820005; Tue, 5 Sep 2023 12:00:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1693915232; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=q3vdKyvOR3c9DKF5g3t4s4jda8CSzRPjZysVJmDDBt8=; b=WB1mXjn6sqwRXc2EwT98JrYyHF9j5uwwzrM7fOUMWtnl7VJPWY2lRpNSR+7v5vMOF/yRC9 A9QoW3HbYS124txYEOSoeR1Zfd84cXHVHkbTBLUdX0bFqp84HGpKoy0wHiNdDr9Hx9rm96 Sus9MyG6nu8PDfv32KHGMQzGqi8gE+SJGzYAQJ3y5s788kmjcADfTe8LKqmOTUs9G9Uh/+ zDISVNMamWXILHCD8ot9OwIyfhAh9VAZAUwbBOc/7b/jhhMAzY35qFUqwIQjp4hepBWaLk B9kZpz0kKvbML6j/U93sUKnprn2bQvzPxRkeQvFCWWRQZM7WcBqC11hfMdMQfQ== From: Andrew Tropin In-Reply-To: <87a5uqwvva.fsf@spork.org> References: <877cpuernh.fsf@gmail.com> <87a5uqwvva.fsf@spork.org> Date: Tue, 05 Sep 2023 16:00:25 +0400 Message-ID: <87o7igzv6u.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-GND-Sasl: andrew@trop.in 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-Queue-Id: 52EDB5B92C X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -1.21 X-Spam-Score: -1.21 X-TUID: 26cq9Fe4wjX6 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On 2023-08-16 16:55, Brian Cully wrote: > The largest issue I see with this patch is that it doesn't correlate the > X11 socket with the session being used in cases where there's more than > one X11 display. > > 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. > > This does presume the Shepherd can be started multiple times for a given > user, and run concurrently, though this does not appear to actually be > the case, since there's a single global location for the socket, which > isn't differentiated by session. But that's a separate issue. > > This also doesn't handle the case of the X11 server going away, either > by crash or user request. If we're starting stuff on behalf of users > when it comes up, it seems to me we should also be stopping stuff on > users' behalf when it comes down. The lack of handling this could easily > lead to resource-churning loops where X11 goes away, but Shepherd > services continuously restart themselves trying to connect to a display > that no longer exists. > > If this is only meant to be used when using a display manager, a la gdm, > then it might be ok. I'm not sure, since I don't use them. When logging > out of an X session started from gdm, is the user's shepherd process > stopped? Is it stopped gracefully? What about sddm? lightdm? I have been seeking for the solution for this for some time and also tried similiar thing as Ludo's patch does and I'm agree with concerns mentioned above by Brian. At the end in rde we decided to start shepherd by Sway (wayland compositor), so all the services have proper environment variables. It has other downsides, but overall works well for usual desktop use cases. I don't have a complete generic answer to this problem yet. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmT3GFkACgkQIgjSCVjB 3rCvVA/+JGJaNzrKRqcALzPNx7KmRH2GWzuKAg704S2arHZ+wyJ8wfTiWnxXM+lE sb7Y5WLFNHHTO6DbE9DyHFX2IMpkjE939JeP7FJhcOWzlALlisPCmXd2FQDgYgNk R/97aACHhT+dxXF0M7BaWXX0bf4yeYoU0i2/zD1n6yuuGTCFPB23PFidQnd2TMuF Z8ou8kcOhh+JeZPA3PNeqsvcSRu0MXbzFroliXjkPK0szpTiXNwW/2g5X/kreP46 WCoH7AQ6hjdOqaqkIHZJdgCt5JaCDPmlPUJdyL34Xn8NXjro4XtoOW8z2l/LIg68 gwg7H6cxTSV2CCXieAFpWw7VQjZKHymWMbaxjaSCmZLOQ9KgQ1ZRNyMgyiY/eh8D a7MzCAJ323qbQQk/30YZYZA5u/QFyUfFaVtBgn5LLrS0m2BG5IBFGGnQIuC/Zrve tfYCsR/6BQ8YtcZTH6w6KL14OQh2A5x25k3yKG50mrj7fQa+lCcB8Kn1rCK+zlgl VuT7uXVaNcaUmroujy+pqHSJnufqmD2YHe9JZtVmfP2T1ve+KJiCyCa7vFSM3Jxw zVF7otTI0PyLvK8hRAGnOiNA95o8TIzCYbpp9VgS1bqUntggUiw5ooOaI32k3FT9 21fXKbJ8DmRAssTLAGTcn53MkJLdMK/JDGU5wcWVOSbjnRwIrss= =dQjN -----END PGP SIGNATURE----- --=-=-=--