[patch] enabling autorun in devicenotifier applet

todd rme toddrme2178 at gmail.com
Thu Jan 6 08:32:16 CET 2011


On Thu, Jan 6, 2011 at 2:08 AM, Kevin Ottens <ervin at kde.org> wrote:
> 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.

Sorry if I missed this, but is this going to be a per-device setting,
per device-class setting, or both?  I can see benefits for both.  For
instance for a video DVD it probably doesn't matter which DVD it is.
On the other hand my camera memory card and my flash drive with my
work files on it are both seen as ordinary flash memory devices, but
the default service would of course be totally different.

-Tpdd


More information about the Plasma-devel mailing list