Log the live Hyprland session to a user-writable path

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.
This commit is contained in:
Breadway 2026-06-14 04:24:52 +08:00
parent 937a31732b
commit 08855ecd86

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