MTP, libgphoto2 & KFM
Weng Xuetian
wengxt at gmail.com
Tue Dec 15 18:29:00 GMT 2015
(resend to list)
It is same for any other two applications who want to acess mtp at the
same time, you should actually blame mtp itself. For example, if a mtp
capable music player is already accessing mtp device via libmtp
directly, not gio or kio and another mtp capable file browser now
tries to read it and it would just fail. If user already opens the
application that you develops and now try to open it in dolphin via
KIO, it will also fail. Should we blame that your application breaks
kio's mtp? No, it is just the nature of mtp on linux system (maybe
also on windows, I don't know).
If this problem cannot be handled by libmtp (which probably is the
case, otherwise it should be fixed already after all these years),
unless there is a centralized service that handles all mtp connection
in same process and all other process talks to it, it won't be solved.
On Thu, Dec 10, 2015 at 3:47 AM, Damon Lynch <damonlynch at gmail.com> wrote:
>
> On Thu, Dec 10, 2015 at 3:00 AM, Weng Xuetian <wengxt at gmail.com> wrote:
>>
>> As far as I know, this is the limitation of libmtp. There is no
>> "mount" for mtp in kio, it's just a standalone kio process talking to
>> it. As you can see, even for gvfs it is possible that you need to
>> manually kill some process.
>>
>> http://sourceforge.net/p/libmtp/code/ci/master/tree/README#l165
>>
>> Kill the kio process of mtp might help to release the device.
>
>
>
> The point is that there is no way for the user to do this, either through
> the GUI or even the command line. The developer of a non-KDE app that wants
> to access the device that KIO has exclusive control over has to tell the KDE
> user "shut down any application that might have touched the MTP device".
>
> By contrast, Gnome provides a virtual unmount function, which they expose to
> the user through an eject/unmount button in Gnome Files, through the command
> line, and through the GIO API.
More information about the kfm-devel
mailing list