faure at kde.org
Tue Mar 18 22:45:25 GMT 2008
On Tuesday 18 March 2008, Laurent Montel wrote:
> On Tuesday 18 March 2008 19:56:33 David Faure wrote:
> > > code which launchs script is here:
> > I meant in the XDG spec.
> > * Does the XDG spec support .desktop files in .config/autostart?
> Yes :
> > * Does the XDG spec support shell scripts and other binaries in
> > .config/autostart?
> No I don't think.
> It's not defined in spec.
Hmm, OK, so the migration isn't just "moving the existing files", it would need
to create a correct .desktop file for each script/binary.
I think it would be simpler to keep the KDE autostart folder (with its scripts) unchanged
and to use the XDG autostart folder (.desktop files) from the GUI control module.
This way the command-line users can still just drop a shellscript into a directory
without having to create a .desktop file for it by hand, and the GUI users are happy
with the control module.
> > Or does XDG only say "the autostart folder is in .config" without any
> > details about how to handle its contents? Then we might as well do whatever
> > we prefer indeed :)
> > > so we can replace KGlobalSettings::autostartPath() by xdg-autostart
> > > dir.
I would prefer keeping both separate. Non-trivial migrations are always difficult to get 100% right,
and I see a use for both kinds of autostart, as described above.
> > > void KSMServer::runUserAutostart()
> > However I don't think it handles OnlyShowIn in .desktop files.
> We support it:
Well, runUserAutostart does not call kinit/autostart.cpp...
runUserAutostart simply runs anything that is in the KDE autostart folder (scripts or desktop files,
but running them with KRun directly, so OnlyShowIn is not used),
while AutoStart::loadAutoStartList is used for the system-autostart folder,
* system autostart folder is <prefix>/share/autostart and uses .desktop files
(this is where we start plasma, krunner, klipper, etc.). The files are installed by KDE, not configurable by user.
* KDE Autostart folder is KGlobalSettings::autostartPath() and KDE runs any script or binary or desktop file in there
* XDG autostart folder is for user-configured .desktop files, using the upcoming configuration module.
The nice thing is that the code for running the desktop files from the system autostart folder (kinit/autostart.cpp)
can most probably be used for this folder too?
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).
More information about the kde-core-devel