From 0cd352da007a9532fe1952a7d36633f1de440777 Mon Sep 17 00:00:00 2001 From: The_miro Date: Thu, 2 Jul 2026 11:28:15 +0200 Subject: [PATCH] fix(de): disable greetd so ly is the sole greeter on hyprlua/hyprland MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit core.sh enables greetd (tuigreet) on every install, but the ly-based Hyprland DEs only disabled getty@tty1 and enabled ly@tty1 — leaving both display managers enabled and racing for tty1, so the stale greetd/tuigreet greeter could win and show the old text login instead of ly. Add a disable_service helper (mirrors enable_service; best-effort, non-fatal) and call disable_service greetd.service in hyprlua.sh and hyprland.sh right before enabling ly@tty1, so ly owns the login screen. Co-Authored-By: Claude Opus 4.8 Claude-Session: https://claude.ai/code/session_01MUhrcFU8J1Hnf7vNqNxZNi --- setup/modules/Desktop-Environments/hyprland.sh | 6 ++++++ setup/modules/Desktop-Environments/hyprlua.sh | 6 ++++++ setup/modules/lib/logging.sh | 10 ++++++++++ 3 files changed, 22 insertions(+) diff --git a/setup/modules/Desktop-Environments/hyprland.sh b/setup/modules/Desktop-Environments/hyprland.sh index ba8abbe..7bc65ff 100755 --- a/setup/modules/Desktop-Environments/hyprland.sh +++ b/setup/modules/Desktop-Environments/hyprland.sh @@ -156,6 +156,12 @@ enable_service NetworkManager.service # '|| true' prevents abort if the unit is already disabled or doesn't exist. sudo systemctl disable getty@tty1.service || true +# Disable greetd, which core.sh enables by default for every install. This DE +# uses ly as its greeter, so leaving greetd enabled means two display managers +# both race to claim tty1 — and the stale greetd/tuigreet greeter can win, +# showing the old text login instead of ly. Disable it so ly is the sole greeter. +disable_service greetd.service + # ly is the TUI display manager that runs on tty1 and launches Hyprland after # the user logs in. enable_service ly@tty1.service diff --git a/setup/modules/Desktop-Environments/hyprlua.sh b/setup/modules/Desktop-Environments/hyprlua.sh index 10f1391..6ad7c48 100755 --- a/setup/modules/Desktop-Environments/hyprlua.sh +++ b/setup/modules/Desktop-Environments/hyprlua.sh @@ -159,6 +159,12 @@ enable_service NetworkManager.service # '|| true' prevents abort if the unit is already disabled. sudo systemctl disable getty@tty1.service || true +# Disable greetd, which core.sh enables by default for every install. hyprlua +# uses ly as its greeter, so leaving greetd enabled means two display managers +# both race to claim tty1 — and the stale greetd/tuigreet greeter can win, +# showing the old text login instead of ly. Disable it so ly is the sole greeter. +disable_service greetd.service + # ly: TUI display manager that presents the login screen on tty1. enable_service ly@tty1.service diff --git a/setup/modules/lib/logging.sh b/setup/modules/lib/logging.sh index 7e6a795..8611a5a 100644 --- a/setup/modules/lib/logging.sh +++ b/setup/modules/lib/logging.sh @@ -75,6 +75,16 @@ enable_service() { || warn "Could not enable: $* — enable it after first boot." } +# disable_service: disable units so they don't start at boot. Best-effort — +# a failure (e.g. unit absent) is warned, never fatal. Used when a DE module +# needs to turn off a greeter/service that core.sh or another module enabled +# (e.g. a ly-based DE disabling the greetd core.sh enables by default) so two +# display managers don't both try to claim tty1. +disable_service() { + sudo systemctl disable "$@" 2>/dev/null \ + || warn "Could not disable: $* — disable it after first boot." +} + # start_service: start units only when a system manager is actually running. # Inside the installer chroot there is none, so we skip — the unit starts on # first boot via its enable symlink.