In systemsettings (autostart) a user can add "Script file" and the can select via "Run On", what to do with it. Setting a Script to "Shutdown" or "Pre-KDE startup" works find, but "Startup" does NOT. For "Startup" a script will be symlinked to ~/.config/autostart/ and will NOT be run at startup. In fact on the next startup of systemssettings5 it will not even be displayed anymore under the "Script file" section. This is severly broken. Additional note: The item texts from the drop down menu "Run on" are very misleading. It should be made clear, that "Pre-KDE startup" will just set ENV variables and files mention here SHOULD CONTAIN ONLY ENV variable settings and a script set for this should NOT contain any commands like "exit 0" for example which will prevent plasma startup at all! Maybe better solution: Rename the columns from "Run on" to "Script action" - "Execute on startup" - "Extend environment before startup" - "Execute on shutdown" Reproducible: Always
"In fact on the next startup of systemssettings5 it will not even be displayed anymore under the "Script file" section. This is severly broken. " Yes I didn't understand this commit "1a7ed091d897e8f01076a4a26388b82c2c8f5836" from Jeremy Whiting it's totally illogic because we add script and we don't display it after that. I add jpwhiting@kde.org to this bug report
I added not showing custom scripts there because we don't run them anyway, so why show them. I guess we also need to make it not add them, since we aren't executing them either. Or make klauncher/kinit start custom scripts again.
It will more logical to not allow to create it if we can't execute it. But indeed it will better to fix klauncher. But until it it's better to disable create it no ?
I agree, I didn't realize it let you create it in the gui when I made that change.
I have been re-adding startup scripts every single time I log in, on multiple computers. It is incredibly frustrating to find out that for a month this bug has been known and yet no move has been made, either to make the function work, or to remove the false advertisement of functionality. Instead the user is left with a trap. Does anybody have a clean alternative for starting scripts automatically?
KInit does not launch any scripts, only entries with .desktop files as per the XDG spec. A workaround is to place scripts into ~/.config/plasma-workspace/env/ I'll remove adding scripts from the kcm since that's indeed a broken functionality.
Thanks Jeremy. I tried the workaround you suggested with two scripts, and it seems to run only one of them. Is there a space where these run attempts are logged?
Andy, Hey, I'm not sure where they are logged, likely .xsession-errors or journalctl . By the way I looked into this a bit more today and it seems that you can have the kcm put the script into ~/.config/plasma-workspace/env/ by changing them to "Pre-KDE start" in the ui.
I'm having the opposite problem - shutdown scripts are not being executed. I have tried putting a script into ~/.config/plasma-workspace/shutdown (where a link to it was created by kcm) and it ignores it as well. What IS a working solution to running script at shutdown atm? I used to use the nm-dispatcher service to unmount any shares before my wlan connection goes down, but ever since I installed plasma and sddm, those are only ran at logout, not shutdown/restart.
Duplicate of the https://bugs.kde.org/show_bug.cgi?id=338242 ?
*** Bug 347206 has been marked as a duplicate of this bug. ***
*** Bug 349663 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 346862 ***