Log the live Hyprland session to a user-writable path
All checks were successful
Mirror to GitHub / mirror (push) Successful in 4s

liveuser can't write /var/log, so the .bash_profile redirect
(Hyprland &>/var/log/hyprland-live.log) failed and bash aborted the line
without ever launching the compositor. Log to /tmp/hyprland-live.log,
which the live user can write.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Breadway 2026-06-14 04:24:52 +08:00
parent 6c3c33e4ae
commit 2cbf46a836

View file

@ -45,8 +45,10 @@ cat >/home/liveuser/.bash_profile <<'EOF'
if [[ "$(tty)" == /dev/tty1 ]] && [[ -z "$WAYLAND_DISPLAY" ]]; then
export WLR_RENDERER_ALLOW_SOFTWARE=1
export WLR_NO_HARDWARE_CURSORS=1
Hyprland &>/var/log/hyprland-live.log
echo "Hyprland exited (rc=$?). Log: /var/log/hyprland-live.log"
# Log to a user-writable path (/var/log is root-only; redirecting there
# would fail and silently keep the compositor from ever launching).
Hyprland &>/tmp/hyprland-live.log
echo "Hyprland exited (rc=$?). Log: /tmp/hyprland-live.log"
exec bash -i
fi
EOF