autostart
Laurent Montel
montel at kde.org
Wed Mar 19 10:08:32 GMT 2008
On Tuesday 18 March 2008 23:45:25 David Faure wrote:
> 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 :
> > http://standards.freedesktop.org/autostart-spec/autostart-spec-0.5.html
> >
> > > * 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.
ok
> 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.
and when user add new script from kcm_autostart we add it to KDE autostart
folder as previously. (autostart script not env/shutdown script)
> > > 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.
ok
> > > > void KSMServer::runUserAutostart()
> > >
> > > However I don't think it handles OnlyShowIn in .desktop files.
> >
> > We support it:
> > kdelibs/kinit/autostart.cpp
>
> 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),
ok not good.
> while AutoStart::loadAutoStartList is used for the system-autostart folder,
> <prefix>/share/autostart.
>
> To summarize:
> * 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.
ok for me.
> 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?
yes it used.
--
Laurent Montel,
KDE/KOffice developer, Qt consultancy projects
Klarälvdalens Datakonsult AB, Platform-independent software solutions
More information about the kde-core-devel
mailing list