[patch] enabling autorun in devicenotifier applet

Kevin Ottens ervin at kde.org
Thu Jan 6 08:08:54 CET 2011


On Wednesday 5 January 2011 19:19:55 Aaron J. Seigo wrote:
> On Wednesday, January 5, 2011, Kevin Ottens wrote:
> > But my point is that we also have this automounter service nowaday, so
> > the autorun logic could be moved there.
> 
> yes, that could make sense ... esp for services that need the volume to be
> mounted first.
> 
> > Of course would mean that automount
> > would be a prerequisite to "autorun on insert", but I think that could be
> > a nice trade-off.
> 
> yes, i agree :)
> 
> so .. on to other design issues:
> 
> * it's easy enough to have more than one service set as "run this
> automatically when <type> appears". we could do a "first come, first serve"
> approach, or use a weighting in the .desktop value, sort of how we do
> mimetypes?

"first come, first serve" is too hard to predict. We could either:
 a) use some manual weighting as you propose
or
 b) use scoring on predicates as in "the most specific wins"
 
> * how to distinguish between services that need the volume to be mounted
> first (e.g. gwenview for a disk with photos) and those which specifically
> should not have the volume mounted (e.g. digikam for a camera). sounds
> like something to add to the .desktop file as well

That you can distinguish based on the command. If it carries a %f or %u it 
needs mounting first, otherwise it likely doesn't need the mounting to happen.

Regards.
-- 
Kévin Ottens, http://ervin.ipsquad.net

KDAB - proud patron of KDE, http://www.kdab.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20110106/47000500/attachment.sig 


More information about the Plasma-devel mailing list