Bug 343513 - custom startup scripts set in systemsettings5 not working
Summary: custom startup scripts set in systemsettings5 not working
Status: RESOLVED DUPLICATE of bug 346862
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_autostart (show other bugs)
Version: 5.2.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Laurent Montel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-29 12:16 UTC by Marc Schiffbauer
Modified: 2015-08-29 12:21 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Schiffbauer 2015-01-29 12:16:45 UTC
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
Comment 1 Laurent Montel 2015-01-29 12:47:36 UTC
"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
Comment 2 Jeremy Whiting 2015-01-29 17:24:39 UTC
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.
Comment 3 Laurent Montel 2015-01-29 17:26:47 UTC
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 ?
Comment 4 Jeremy Whiting 2015-01-29 17:28:17 UTC
I agree, I didn't realize it let you create it in the gui when I made that change.
Comment 5 andydecleyre 2015-02-25 17:28:23 UTC
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?
Comment 6 Jeremy Whiting 2015-02-25 18:41:55 UTC
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.
Comment 7 andydecleyre 2015-02-25 22:13:42 UTC
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?
Comment 8 Jeremy Whiting 2015-02-25 22:40:00 UTC
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.
Comment 9 Soukyuu 2015-04-15 15:46:03 UTC
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.
Comment 10 Rog131 2015-04-18 07:08:40 UTC
Duplicate of the https://bugs.kde.org/show_bug.cgi?id=338242 ?
Comment 11 Jeremy Whiting 2015-05-05 15:05:48 UTC
*** Bug 347206 has been marked as a duplicate of this bug. ***
Comment 12 Thomas Lübking 2015-05-17 09:19:40 UTC
*** Bug 347206 has been marked as a duplicate of this bug. ***
Comment 13 LordKhael Light 2015-06-27 16:51:49 UTC
*** Bug 349663 has been marked as a duplicate of this bug. ***
Comment 14 David Edmundson 2015-08-20 14:38:12 UTC

*** This bug has been marked as a duplicate of bug 346862 ***