From 0c63044066440db43002e77ae7b06b9cf388809a Mon Sep 17 00:00:00 2001 From: Ryan Hughes Date: Thu, 21 May 2026 00:39:39 -0400 Subject: [PATCH] chroot_run_as_user: unset XDG_RUNTIME_DIR The live ISO runs as root with XDG_RUNTIME_DIR=/run/user/0; arch-chroot -u ryan switches the UID but doesn't reset the env, so tools running as ryan tried to write to root's runtime dir (dconf failed to commit, omarchy-theme-set's flock target hit Permission denied). Drop the var so tools fall back to no-runtime-dir behaviour, which works inside the chroot. --- configs/airootfs/root/.automated_script.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configs/airootfs/root/.automated_script.sh b/configs/airootfs/root/.automated_script.sh index 78215fe..672826a 100644 --- a/configs/airootfs/root/.automated_script.sh +++ b/configs/airootfs/root/.automated_script.sh @@ -186,9 +186,14 @@ EOF # Run a bash command inside the chroot as the install user, with the env the # offline installer expects. chroot_run_as_user() { + # --unset XDG_RUNTIME_DIR because the live ISO inherits /run/user/0 (root's + # runtime dir) and arch-chroot -u doesn't reset it. Without this, dconf, + # flock targets under XDG_RUNTIME_DIR, etc. would fail with Permission + # denied trying to write to root's runtime dir as ryan. HOME=/home/$OMARCHY_USER \ arch-chroot -u "$OMARCHY_USER" /mnt/ \ - env OMARCHY_INSTALL_MODE=offline \ + env --unset=XDG_RUNTIME_DIR \ + OMARCHY_INSTALL_MODE=offline \ OMARCHY_USER_NAME="$(