Capture live-session Hyprland output and fall back to a shell
All checks were successful
Mirror to GitHub / mirror (push) Successful in 5s

Redirect the live autologin compositor's stdout/stderr to
/var/log/hyprland-live.log, and on exit drop to an interactive shell
showing the return code instead of letting the getty autologin
respawn-loop hide any startup failure behind a blank blinking cursor.
Makes a failed live boot diagnosable and leaves the medium usable.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Breadway 2026-06-14 03:57:27 +08:00
parent cbdeccd03e
commit a7b3f70930

View file

@ -9,5 +9,11 @@ if [[ "$(tty)" == "/dev/tty1" ]] && [[ -z "$WAYLAND_DISPLAY" ]]; then
# Software cursors: hardware-cursor planes are often unusable in VMs and
# show as invisible/garbled; this is the reliable choice for a live medium.
export WLR_NO_HARDWARE_CURSORS=1
exec Hyprland
# Run the compositor, capturing its output so a failed live boot is
# diagnosable (Hyprland also keeps its own log under $XDG_RUNTIME_DIR/hypr/).
# On exit, drop to an interactive shell with the error in view instead of
# letting the getty autologin respawn-loop hide it behind a blank cursor.
Hyprland &>/var/log/hyprland-live.log
echo "Hyprland exited (rc=$?). Log: /var/log/hyprland-live.log"
exec bash -i
fi