Review Request 119773: Launch scripts in autostart-directories

Martin Yrjölä martin.yrjola at gmail.com
Tue Aug 19 07:44:46 UTC 2014



> On Aug. 19, 2014, 6:41 a.m., David Faure wrote:
> > In the KF5 world even more so than before, all the autostart code should be in workspace rather than in kinit. This is really a workspace feature, starting a single app based on KF5 doesn't and shouldn't start anything.
> > 
> > kioclient5 exec is an unnecessary indirection, given that we have proper APIs for doing this in KIO. kioclient5 exec is nothing else than
> > 
> >     KRun * run = new KRun(QUrl::fromLocalFile(path), Q_NULLPTR);
> >     run->setRunExecutables(true);
> >     
> > Which kind of file --> I'm not sure. I'm confused by the older commit you point to, I missed that discussion.
> > Anyway I thought the XDG autostart directory was specified to only contain .desktop files? http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html
> > 
> > This being said, I wouldn't mind being able to add scripts without having to write a .desktop file for them.... I can bring this up on the xdg list maybe?

I didn't realise only desktop-files are part of the autostart standard. This problem could also be solved by having the "Add script"-button in the Autostart KCM generate a desktop file for the added script. The downside would be that console users still have to write their own desktop-files. But I think you're right that kinit is probably not the best place for this functionality.

I can continue the discussion in plasma-devel, there's already a thread for this.

I'll close this review request.


- Martin


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119773/#review64817
-----------------------------------------------------------


On Aug. 13, 2014, 7:50 p.m., Martin Yrjölä wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119773/
> -----------------------------------------------------------
> 
> (Updated Aug. 13, 2014, 7:50 p.m.)
> 
> 
> Review request for KDE Frameworks.
> 
> 
> Bugs: 335878 and 338242
>     https://bugs.kde.org/show_bug.cgi?id=335878
>     https://bugs.kde.org/show_bug.cgi?id=338242
> 
> 
> Repository: kinit
> 
> 
> Description
> -------
> 
> This fixes execution of scripts other than ".desktop"-files in the ~/.config/autostart directory when starting a session. This functionality was removed in https://git.reviewboard.kde.org/r/118977/ because of https://bugs.kde.org/show_bug.cgi?id=335878.
> 
> Things that still have to be discussed:
> * Is kinit the right place for this functionality? I think it makes sense because all other autostart functionality is there.
> * Is kioclient5 the correct way to start the scripts?
> * Which kind of files in autostart-directories gets executed?
>  * I chose a simple *.sh regex for testing purposes.
>  * In KSMServer and KDE4 only obvious backup files (*.bak, *~, %*% etc.) were excluded.
> 
> 
> Diffs
> -----
> 
>   src/klauncher/autostart.cpp 0706c735c3caf1c010d9968337456bfc5a0805c1 
> 
> Diff: https://git.reviewboard.kde.org/r/119773/diff/
> 
> 
> Testing
> -------
> 
> Works for scripts that exit and those that run the whole session. Now the only limitation is the *.sh wildcard.
> 
> 
> Thanks,
> 
> Martin Yrjölä
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140819/78140563/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list