From 59c9fd5da3f80e164576f84c1b3db0f85a6d667f Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Dec 01 2025 16:24:25 +0000 Subject: livesys-kde: Support Plasma Login Manager with SDDM as the fallback We prefer Plasma Login Manager, but in the event it isn't installed, we should assume that we're configuring SDDM, so there's no effective behavioral changes when SDDM is used instead. --- diff --git a/libexec/livesys/sessions.d/livesys-kde b/libexec/livesys/sessions.d/livesys-kde index 8483952..171511a 100755 --- a/libexec/livesys/sessions.d/livesys-kde +++ b/libexec/livesys/sessions.d/livesys-kde @@ -13,15 +13,20 @@ else DEFAULT_DESKTOP="plasma.desktop" IS_MOBILE=0 fi -if [ -f /etc/sddm.conf ]; then -sed -i 's/^#User=.*/User=liveuser/' /etc/sddm.conf -sed -i "s/^#Session=.*/Session=${DEFAULT_DESKTOP}/" /etc/sddm.conf +if $(rpm -q plasma-login-manager > /dev/null 2>&1) ; then + LOGIN_MANAGER_CONFIG="/etc/plasma-login.conf" else -cat > /etc/sddm.conf << SDDM_EOF + LOGIN_MANAGER_CONFIG="/etc/sddm.conf" +fi +if [ -f "${LOGIN_MANAGER_CONFIG}" ]; then +sed -i 's/^#User=.*/User=liveuser/' ${LOGIN_MANAGER_CONFIG} +sed -i "s/^#Session=.*/Session=${DEFAULT_DESKTOP}/" ${LOGIN_MANAGER_CONFIG} +else +cat > ${LOGIN_MANAGER_CONFIG} << LGNMGR_EOF [Autologin] User=liveuser Session=${DEFAULT_DESKTOP} -SDDM_EOF +LGNMGR_EOF fi # add liveinst.desktop to favorites menu