Add Autostart KCM to kdebase/workspace/kcontrol

Stephen Leaf smileaf at smileaf.org
Tue Feb 20 02:51:27 GMT 2007


On Monday 19 February 2007 7:52:06 pm Aaron J. Seigo wrote:
> On February 19, 2007, Stephen Leaf wrote:
> > On Monday 19 February 2007 3:35:50 pm Aaron J. Seigo wrote:
> > > ah, one other item that just occurred to me: kiosk. there should to see
> > > if the Exec= entry isImmutable (which would be true if the file, group
> > > or item itself is marked as such). if it is, it shouldn't be
> > > modifiable.
> >
> > How do you check for that? Not seeing an API for it?
>
>   bool isImmutable() const;
>   bool groupIsImmutable(const QString &group) const;
>   bool entryIsImmutable(const QString &key) const;
>   bool groupIsImmutable() const;
>
> these are available from any KConfigBase derived class, including KConfig
> and KDesktopFile. it's also in KConfigGroup as of tomorrow.
>
> > If so is there a dev friendly page on that?
>
> once kconfig's API calms down a bit more (there's a merge of the biggest
> set of changes happening tomorrow) i'll be writing a couple tutorials on
> devnew covering the use of kconfig including a bit on kiosk. until then ...
> there's the API docs only and asking people on this list, really.
>
> > > > And while I'm on this, wouldn't it make a bit more sense to rename
> > > > autostart to startup ? startup/shutdown?
> > >
> > > sounds find to me.
> >
> > I mean ~/.kde/Autostart -> ~/.kde/startup
> > KGlobalSettings::autostartPath() -> KGlobalSettings::startupPath()
> > so it matches the ~/.kde/shutdown
>
> ah. well, it seems that changing this would be a good idea for slightly
> different reason: it apparently causes confusion. ;)
>
> env/ and shutdown/ are related: they can both only contain scripts and the
> contents of them are sourced by startkde before and after the desktop
> starts/stops respectively.
>
> $KDEHOME/Autostart is actually more akin to $KDEHOME/share/autostart.
> except that $KDEHOME/Autostart can have not only .desktop files in it, but
> pretty much anything you want (they are started as if they were clicked
> on). things in share/autostart must be .desktop files.
>
> it probably is worth harmonizing the two systems into just one, as that's
> all moving into ksmserver now anyways. now that i look at your patch again,
> i see that you aren't looking in share/autostart at all =)
>
> what we could do is make it a bit simpler in kde4 and have just
> share/autostart. this would leave a migration path for users who had used
> the Autostart directory and would leave us with what to do about
> non-.desktop entries. to be honest, i'm not particularly sure what the use
> case is for that which couldn't be handled by a .desktop file just as well
> =)
>
> > Might also be nice to add KGlobalSettings::shutdownPath()
>
> well, as i mentioned already $KDEHOME/shutdown/ is quite what you may have
> thought it was. so i'm not sure it belongs in there.

Ok that makes things quite a bit more clear. A lot of what I thought was 
happening isn't at all.
I actually didn't know anything about share/autostart which is why it was 
never included.

env, shutdown and autostart can contain scripts
share/autostart and autostart can contain .desktop files
I was actually unaware of this limitation. So that really changes how things 
should be done in my kcm.

where does share/autostart fit in and why do we even have a 2nd directory?
env is sourced by startkde.
autostart is done after receiving a signal from kdesktop
shutdown is sourced by startkde at the end.

About the kiosk isn't kpropertiesdialog doing all that? my program actually 
does very little with handling the .desktop files itself. It writes out a new 
entry just so it can have something to work on. but thats it.
-- 
Stephen Leaf




More information about the kde-core-devel mailing list