#!/usr/bin/env bash # UKRRS KDE fix: sddm autologin into an UNLOCKED, always-alive session. # Deliberately NO autolock (instant Jump/iPad re-attach requirement). # Relogin=true: if the session ever exits/crashes, sddm logs straight back in, # so there is always a session to attach to. # # Usage: # sudo ./fix-kde.sh config only; takes effect next boot/restart # sudo ./fix-kde.sh --restart also restart sddm NOW. WARNING: restart kills # any ACTIVE local GUI session. Right now only # the greeter runs, so it is safe; verify with # `loginctl list-sessions` if unsure. # Override user with: sudo DESKTOP_USER=someone ./fix-kde.sh set -euo pipefail [ "$(id -u)" = 0 ] || { echo "run with sudo" >&2; exit 1; } USER_NAME=${DESKTOP_USER:-reachableceo} CONF_DIR=/etc/sddm.conf.d CONF=$CONF_DIR/50-ukrrs-autologin.conf mkdir -p "$CONF_DIR" [ -f "$CONF" ] && cp "$CONF" "$CONF.bak.$(date +%s)" cat > "$CONF" <