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 26CD21564E; Tue, 09 Dec 2025 08:56:58 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id D68431555D; Tue, 09 Dec 2025 08:56:50 +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.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fout-a5-smtp.messagingengine.com (fout-a5-smtp.messagingengine.com [103.168.172.148]) by atuin.qyliss.net (Postfix) with ESMTPS id 54BC5154E3 for ; Tue, 09 Dec 2025 08:56:47 +0000 (UTC) Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfout.phl.internal (Postfix) with ESMTP id 25D6EEC0627 for ; Tue, 9 Dec 2025 03:56:44 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Tue, 09 Dec 2025 03:56:44 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=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=1765270604; x= 1765357004; bh=l6QElxjjQg9NpLZUXkm31ADyiNHo3owWriBs763ku3Y=; b=k hMRqOK/QF4RdT9kQ/WI0erwI5pCKFvdxGpzIovrndcY2UdFftbsgGbIyDBYbz3HV ao1wgzZ1dWHWt8T3ugxxU2YZnsuc2i9l85LBPidPVs42XbHRao3mDJeEyFm4TFkY G6jn9L6CccCD+2RAJV/Dlp0XkBpYUL3ZtSh7DRHqtchpCAZyUeopXv4K9ACfH45L y9dAMh77nGNPCsHmq3Kj4sZje1krHdv2qX+y2fJ0dlUC2Guvyb6VVdWsyLCuauqm KnCXliJKN1crhsujvj3Z2qNd1CWDBzgR6tTMhISG/tH6y1s7+1+Jnk9kKb/+dYLb RfsmULbwKb7k/E1IFrxOQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=1765270604; x=1765357004; bh=l6QElxjjQg9NpLZUXkm31ADyiNHo 3owWriBs763ku3Y=; b=QXCqfz4uW76ZTp9Ahy3u16AMjKVPnSi76dd7bbJfxQV/ 41RFoPKlItZMradke5yNxNKJonbjR3TJ+/kExbYut/OLPxV5Xnj/xyXppWNDQ2Zn s+wPeAJWxzrQuMCRSW1QR6l2bjeNeTEQecRf2rMrDKMGas6Uf6AFgkKn0UZH2ohz SnuIDGMzTQN9SpgcTdAZuutiaFh4sjLWhPcBoMdsbcY3+NoOF/T1ZYfkIc75In4F mSR8bLLbkdG/jKBCfTXi40tjR9yvHJ8Cljhkj/YdIX73JNxm0SDFY/CSAQAmtl3v x9VNr++O159DyJo1jI4vPe/4U1UAJqFoaPpCcWtJ3A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduledugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertdertd dtnecuhfhrohhmpeetlhihshhsrgcutfhoshhsuceohhhisegrlhihshhsrgdrihhsqeen ucggtffrrghtthgvrhhnpefgfedukedvleeileeludefveehgeelgfegvddujedvtdffue euveffheeljeekvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehhihesrghlhihsshgrrdhishdpnhgspghrtghpthhtohepuddpmhhouggvpe hsmhhtphhouhhtpdhrtghpthhtohepuggvvhgvlhesshhpvggtthhruhhmqdhoshdrohhr gh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Tue, 9 Dec 2025 03:56:43 -0500 (EST) Received: by fw12.qyliss.net (Postfix, from userid 1000) id 819BF5EFA734; Tue, 09 Dec 2025 09:56:32 +0100 (CET) From: Alyssa Ross To: devel@spectrum-os.org Subject: [PATCH 3/5] host/rootfs: move Wayland out of XDG_RUNTIME_DIR Date: Tue, 9 Dec 2025 09:56:26 +0100 Message-ID: <20251209085628.603316-3-hi@alyssa.is> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251209085628.603316-1-hi@alyssa.is> References: <20251209085628.603316-1-hi@alyssa.is> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-ID-Hash: XFBHOHYYJGIJWA3MGVUPRNBIT4CJCRWI X-Message-ID-Hash: XFBHOHYYJGIJWA3MGVUPRNBIT4CJCRWI 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 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 --- 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 5ff1a40..bbd390c 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 73d6cae..6ee9959 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 41e42e6..1647990 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