From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SDMiA/033WQwfgEASxT56A (envelope-from ) for ; Wed, 16 Aug 2023 22:56:29 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id KLlYAv033WRqygAAG6o9tA (envelope-from ) for ; Wed, 16 Aug 2023 22:56:29 +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 A1B426D39D for ; Wed, 16 Aug 2023 22:56:28 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=xU7T0R8z; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1692219388; h=from:from:sender:sender:reply-to: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=0ioknHgwcUDOW403FxfoYm+Smd5AGIYuOjT7jXg63CM=; b=UBCQvOa8ETUgSpNTCKZhtIPklyB4eXnXziLCp99QQOo4iKkzuX0ixrP6U8K7wnhXI5BGdo Ze3qtkeYv86M7seUHrSTiZARYeN88SKowI2EIHuINEhq7XQx/gNNlwAJKzc9Ff0uUfqzzp qmI0WjmF06jICKOb8AjAaUgNoI7aWyTjQR3gUKZ/9CoQc3lPvUX83oo7lKq//pbXoqzCvi z8N0P3T+r4+YBZG3XR+rdfDw2r4KgjfIDuEObWD7ypGdkqTTgoawmwIG6HEOtMdZW+7m+F apNpY/+aU0fTM/jWKbz+3GEs8g+vU+mwDcM6NqIIopbj1OcrkAd1bY1sAPLKxg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=xU7T0R8z; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1692219388; a=rsa-sha256; cv=none; b=qXQBOhuUMzNbjAEpzCXETR41+izhnKAYLEO7MHkiPvOqCb+hPZJxgvfUBV4li9I89u+xni sKZpGyLTminlOHAvyGLYnPrYrV3zWR8zHFaEh4OEKRAjkHWlVAn+OeMNOekKQBo/s58bTH upgbTGMuXhQJdfH0mgz4SJJ6v2ylvNDQ2uF8fqVIacr4JKs6+BWjJSuDOYuz1SOpAPsQD/ OavoxljV3PFAcv1zbwsF/Yk5vsaNTq868qBC/qn9XPfNpoavJeXZMGvvEuPZzZtySf10qO 5x7BlEP7Zdzakt09kEhyRMEFHzNvG3nJJPz/R1myoh97lktFK+n0o1Kvh9KyGw== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qWNYj-00016A-AS; Wed, 16 Aug 2023 16:56:05 -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 1qWNYg-00015k-4D for guix-patches@gnu.org; Wed, 16 Aug 2023 16:56: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 1qWNYf-0003In-Po for guix-patches@gnu.org; Wed, 16 Aug 2023 16:56:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qWNYf-0002Y0-Lu for guix-patches@gnu.org; Wed, 16 Aug 2023 16:56:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65343] [PATCH] home: services: Add 'x11-display' service. Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 16 Aug 2023 20:56: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: Oleg Pykhalov Cc: paren@disroot.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= , 65343@debbugs.gnu.org, Andrew Tropin Received: via spool by 65343-submit@debbugs.gnu.org id=B65343.16922193369749 (code B ref 65343); Wed, 16 Aug 2023 20:56:01 +0000 Received: (at 65343) by debbugs.gnu.org; 16 Aug 2023 20:55:36 +0000 Received: from localhost ([127.0.0.1]:42243 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWNYF-0002XA-Os for submit@debbugs.gnu.org; Wed, 16 Aug 2023 16:55:36 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:55428 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qWNYD-0002X0-9B for 65343@debbugs.gnu.org; Wed, 16 Aug 2023 16:55:34 -0400 Received: from psyduck (ool-18b8e9e7.dyn.optonline.net [24.184.233.231]) by mail.spork.org (Postfix) with ESMTPSA id 33874CD5; Wed, 16 Aug 2023 16:55:10 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1692219332; bh=0ioknHgwcUDOW403FxfoYm+Smd5AGIYuOjT7jXg63CM=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=xU7T0R8zpUf7yp5lrt/wvt7BYHN4dqv9FD5fkvSu3PAGosQM5JK8M3KDoYgM3hbyy Qbg6B4k40lqbN+rRskzZaoBRDd2S0N+Hj6j7QgXialHBm0MsC1/fMdd0qyC3EkFMP4 ztcQFm/x7Zq9uEbM54pBgqjXr2VAxamlsGo1OiKM= In-Reply-To: <877cpuernh.fsf@gmail.com> (Oleg Pykhalov's message of "Wed, 16 Aug 2023 22:03:30 +0300") References: <877cpuernh.fsf@gmail.com> Date: Wed, 16 Aug 2023 16:55:05 -0400 Message-ID: <87a5uqwvva.fsf@spork.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain 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: , Reply-to: Brian Cully X-ACL-Warn: , Brian Cully via Guix-patches From: Brian Cully via Guix-patches via 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-Spam-Score: -4.07 X-Migadu-Queue-Id: A1B426D39D X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -4.07 X-TUID: NyocebHAU28Q 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?