logon_script: gate KDE-specific settings on XDG_CURRENT_DESKTOP

Wrap kwriteconfig5 calls in a KDE check so they are skipped on
Cinnamon and other desktops. Also add empty-session setting so
previous apps are not restored on login.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Daniel unbrot Pätzold
2026-05-07 17:10:27 +02:00
parent bfeff987d7
commit f80f6cd7d9
+6 -3
View File
@@ -47,9 +47,12 @@ if [[ $? -ne 0 ]]; then
echo "Error: python3-ipaclient is not installed. Please install it via: sudo dnf install python3-ipaclient" echo "Error: python3-ipaclient is not installed. Please install it via: sudo dnf install python3-ipaclient"
fi fi
#TODO C: Check if Desktop is KDE/Plasma and support other Displays if [ "${XDG_CURRENT_DESKTOP}" = "KDE" ]; then
# Make kdesu use sudo # Start each session empty (not restoring previous apps) - avoids stale mounts and autostart conflicts
kwriteconfig5 --file kdesurc --group super-user-command --key super-user-command sudo >/dev/null 2>&1 kwriteconfig5 --file ksmserverrc --group General --key loginMode 2 >/dev/null 2>&1
# Make kdesu use sudo
kwriteconfig5 --file kdesurc --group super-user-command --key super-user-command sudo >/dev/null 2>&1
fi
# Mount the private Directory # Mount the private Directory
elog_add_command "${SYSCONFIGPATH}/system_setup/mount_ecrypt_home.sh" elog_add_command "${SYSCONFIGPATH}/system_setup/mount_ecrypt_home.sh"