SUMMARY I disabled an environment variables "script" in $HOME/.config/plasma-workspace/env/ by renaming it `debug_kscreen.sh_HIDE`. That worked, Plasma startup ignored it. But it still shows up in System Settings > Autostart > Pre-startup Scripts, with no indication that it isn't doing anything. STEPS TO REPRODUCE 1. Create an environment variables script test.sh in $HOME/.config/plasma-workspace/env/ containing export JUNK_TEST=hello 2. Log out of Plasma desktop session and log back in 3. In a terminal, enter `echo $JUNK_TEST` 4. Rename the file test.sh_HIDE 5. Log out of Plasma desktop session and log back in 6. In a terminal, enter `echo $JUNK_TEST` 7. Look in System Settings > Autostart > Pre-startup Scripts OBSERVED RESULT The script sets the environment variable `JUNK_TEST` in Plasma to "hello" when it ends in `.sh`, but doesn't if you rename it. That's good, but it still shows up in Pre-startup Scripts (bad). EXPECTED RESULT kcm_autostart could implement a "disabled" state (e.g. gray text or a warning icon) for wrong files with a tooltip "File ignored, does not end in .sh". But it's probably simpler to just not show files that do not end with `.sh`. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 5.24.5 KDE Frameworks Version: 5.93.0 Qt Version: 5.15.3 on Wayland ADDITIONAL INFORMATION It seems these .sh files don't need to be executable and don't need a `#!/bin/sh` starting line. Bug 171136 and bug 286658 seem related. I think the mismatch happens because startkde/startplasma.cpp runs const auto dirScripts = dir.entryInfoList({QStringLiteral("*.sh")}, QDir::Files, QDir::Name); but kcms/autostart/autostartmodel.cpp runs loadScriptsFromDir(QStringLiteral("plasma-workspace/env/"), AutostartModel::AutostartEntrySource::PlasmaEnvScripts); and doesn't filter/glob on `*.sh`.
Please feel free to submit a merge request to fix it!
*** Bug 391609 has been marked as a duplicate of this bug. ***