From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 15EED16C56; Tue, 09 Dec 2025 12:11:38 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id B2C3016BED; Tue, 09 Dec 2025 12:11:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-b6-smtp.messagingengine.com (fhigh-b6-smtp.messagingengine.com [202.12.124.157]) by atuin.qyliss.net (Postfix) with ESMTPS id 0025516C52 for ; Tue, 09 Dec 2025 12:11:35 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 749DE7A009B; Tue, 9 Dec 2025 07:11:33 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 09 Dec 2025 07:11:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1765282293; x= 1765368693; bh=1S+rlihedmnE+aBk66ut9xGEvfTaFAwL1Uh0VsSLqRA=; b=H 5Y/e9aG7Eg+pzu+3nc+0evMnk7NuWfkD97UUwWVi9Deo1RvQy9nOorPJXaLLr78+ 6bfGg3DpWrlVh11hN3Fcf536Sr1NWDB5j83QCR7XlU0IkeFAGG1Y3qUzuI/G3HpJ KxzSEFlkpUrQccD8SG+HrBh2pkpifiFEzMU/4+K6aUtejoS61xOl7Z8q+HZoIxTo 3x1fyfWW170j0DwrOIy7FcJGR1gMcF3gLvcFnPP55kgyov1Lgj+Z08wwm4CQrPyl 2IWw8cIxEuciuoqGszd/4NAc4CcgAHz1LHeQ48N9UgQIvPXtvSzOAmHnTBXmQTjp 5N+s6+uCdJliBKkIEr1Hg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; t=1765282293; x=1765368693; bh=1 S+rlihedmnE+aBk66ut9xGEvfTaFAwL1Uh0VsSLqRA=; b=H3RzMz9rWuWfQgD64 hmm9YTEydAmPfR69BCBm6rEs3VArx3S8Q3U3mtcnRYxqeSf830qqjZJS/8Wg366J xuqQuewgFCXiLWA1hT7FYfYG0khLemKRfbzugxkWBYg3zAahqbNryxX+9g6+ycoJ JdZD1fwmha1zQcjYjXIQ0on7wXhi4BOSVL97z73gPNO57mAdf3BcI2OLkwtYpq5Z SqUD94HM+gPVZakc2rNET5hXzSrWOPFsG2s1AbOgNjul9w4jJOgLsdDsjiRkBAIx Iuta6gRr9+lkB1yeJyYKj6BHbBXK6F3W5ep+vQmFrkfO7WacfLmJwAMWxGfKHShm RfDyQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduleehfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpeegueeiud eukeekiedvteffgeekudfhudevvdelvdekhfefieetkeduudejffefgeenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehhihesrghlhihsshgrrd hishdpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohep uggvmhhiohgsvghnohhurhesghhmrghilhdrtghomhdprhgtphhtthhopeguvghvvghlse hsphgvtghtrhhumhdqohhsrdhorhhg X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 9 Dec 2025 07:11:33 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 71362604E04E; Tue, 09 Dec 2025 13:11:31 +0100 (CET) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH v2 3/6] host/rootfs: move Wayland out of XDG_RUNTIME_DIR Date: Tue, 9 Dec 2025 13:10:23 +0100 Message-ID: <20251209121023.705026-6-hi@alyssa.is> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251209121023.705026-2-hi@alyssa.is> References: <20251209121023.705026-2-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: 6K3AWS4BJOO5KHAHXV4GS6ILMFFVOPAV X-Message-ID-Hash: 6K3AWS4BJOO5KHAHXV4GS6ILMFFVOPAV X-MailFrom: hi@alyssa.is X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Demi Marie Obenour X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: XDG_RUNTIME_DIR doesn't play well with running the compositor as a different user to clients. Signed-off-by: Alyssa Ross Message-ID: <20251209085628.603316-3-hi@alyssa.is> --- v2: no change host/rootfs/image/etc/s6-linux-init/env/WAYLAND_DISPLAY | 2 +- .../vm-services/template/data/service/vhost-user-gpu/run | 6 ++++-- host/rootfs/image/etc/s6-rc/weston/run | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/host/rootfs/image/etc/s6-linux-init/env/WAYLAND_DISPLAY b/host/rootfs/image/etc/s6-linux-init/env/WAYLAND_DISPLAY index 5ff1a409..bbd390c4 100644 --- a/host/rootfs/image/etc/s6-linux-init/env/WAYLAND_DISPLAY +++ b/host/rootfs/image/etc/s6-linux-init/env/WAYLAND_DISPLAY @@ -1 +1 @@ -wayland-1 +/run/wayland diff --git a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run index 73d6caed..6ee99599 100755 --- a/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run +++ b/host/rootfs/image/etc/s6-linux-init/run-image/service/vm-services/template/data/service/vhost-user-gpu/run @@ -5,12 +5,14 @@ s6-ipcserver -1a 0700 -c 1 -b 1 env/crosvm.sock +importas -Si WAYLAND_DISPLAY + bwrap --unshare-all # --unshare-all only implies --unshare-user-try. # Make this more than a "try". --unshare-user - --bind /run/user/0/wayland-1 /run/user/0/wayland-1 + --bind $WAYLAND_DISPLAY $WAYLAND_DISPLAY --ro-bind /usr /usr --ro-bind /lib /lib --tmpfs /tmp @@ -35,5 +37,5 @@ bwrap -- crosvm --no-syslog device gpu --fd 0 - --wayland-sock /run/user/0/wayland-1 + --wayland-sock $WAYLAND_DISPLAY --params "{\"context-types\":\"cross-domain\"}" diff --git a/host/rootfs/image/etc/s6-rc/weston/run b/host/rootfs/image/etc/s6-rc/weston/run index 41e42e6b..16479909 100644 --- a/host/rootfs/image/etc/s6-rc/weston/run +++ b/host/rootfs/image/etc/s6-rc/weston/run @@ -2,7 +2,7 @@ # SPDX-License-Identifier: EUPL-1.2+ # SPDX-FileCopyrightText: 2021 Alyssa Ross -unexport WAYLAND_DISPLAY +importas -Siu WAYLAND_DISPLAY if { mkdir -p -m 0700 /run/user/0 } @@ -18,4 +18,4 @@ importas -i home HOME cd $home if { udevadm wait /dev/dri/card0 } unshare --cgroup --ipc --net --uts -weston +weston -S $WAYLAND_DISPLAY -- 2.51.0