[PATCH 06/13] img/app: remove XDG_RUNTIME_DIR

Alyssa Ross
2025-11-26T21:34:53Z

Nothing uses this any more, and let's hope it stays that way, because
it makes it difficult to run services as different users. Maybe we
end up finding something that really needs it in the future, but it
makes things much easier to avoid it for as long as we can.

Older applications might not support WAYLAND_DISPLAY being absolute,
but this has been changed in libwayland and GTK. We don't need to
support arbitrarily old applications, and this problem will resolve
itself over time.

Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
img/app/file-list.mk | 1 -
img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR | 1 -
img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR.license | 2 --
img/app/image/etc/s6-linux-init/scripts/rc.init | 3 ---
4 files changed, 7 deletions(-)
delete mode 100644 img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR
delete mode 100644 img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR.license

diff --git a/img/app/file-list.mk b/img/app/file-list.mk
index d63ee76..d452ebd 100644
--- a/img/app/file-list.mk
+++ b/img/app/file-list.mk
@@ -22,7 +22,6 @@ FILES = \
image/etc/s6-linux-init/env/PULSE_RUNTIME_PATH \
image/etc/s6-linux-init/env/WAYLAND_DISPLAY \
image/etc/s6-linux-init/env/XDG_DESKTOP_PORTAL_SPECTRUM_GUEST_PORT \
- image/etc/s6-linux-init/env/XDG_RUNTIME_DIR \
image/etc/s6-linux-init/run-image/service/getty-hvc0/run \
image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/notification-fd \
image/etc/s6-linux-init/run-image/service/s6-linux-init-shutdownd/run \
diff --git a/img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR b/img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR
deleted file mode 100644
index 70a6671..0000000
--- a/img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR
+++ /dev/null
@@ -1 +0,0 @@
-/run/user/0
diff --git a/img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR.license b/img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR.license
deleted file mode 100644
index a941ca4..0000000
--- a/img/app/image/etc/s6-linux-init/env/XDG_RUNTIME_DIR.license
+++ /dev/null
@@ -1,2 +0,0 @@
-SPDX-License-Identifier: CC0-1.0
-SPDX-FileCopyrightText: 2023 Alyssa Ross <hi@alyssa.is>
diff --git a/img/app/image/etc/s6-linux-init/scripts/rc.init b/img/app/image/etc/s6-linux-init/scripts/rc.init
index 0bf350a..762081f 100755
--- a/img/app/image/etc/s6-linux-init/scripts/rc.init
+++ b/img/app/image/etc/s6-linux-init/scripts/rc.init
@@ -13,7 +13,4 @@ if { s6-rc-init -c /etc/s6-rc /run/service }
if { modprobe overlay }
if { mount -a --mkdir }

-# /run/user/0: "$XDG_RUNTIME_DIR"
-if { mkdir -m 0700 /run/user/0 }
-
s6-rc change ok-all
--
2.51.0