4

I want to open some videos located on an Android phone before saving them on local drive or any other location.

I can do that in Xfce. But on Plasma, when I want to open the video, Dolphin starts copying it in cache, that is on local drive, namely ~/.cache/kioexec/krun/.

enter image description here

If I wanted that file on drive before opening it, I would have copied it myself. But I want to save time and space and open the file directly. (That may be very useful if I want to process/transcode a large file: instead of copying on the local drive, one could set the phone location as the transcoder source and the external drive as the target.)

Can I do that on Plasma, given that is normal in Xfce and other desktops?

Installing gvfs-fuse in Kubuntu 20.04: the folder /run/user/1000/gvfs/ is empty.

The (expected) mountpoint /run/user/1000/gvfs/ is not the one in Kubuntu 20.04, and it seems that Dolphin doesn't mount locations, it accesses them via separate KIO processes, as said here.

This is in Kubuntu 20.04, Plasma 5.18.5.


In Mint Xfce the option to open the Android phone files in any application (not just the default, which was anyway available without any cache-copy) was absent in file manager context menu when the files where accessed through the mtp:/ path, but were available through the mount path /run/user/1000/gvfs/. (In Dolphin all programs are accessible from context menu in mtp:/ but they trigger a copy-to-cache process.)

(As pointed out by a commentator, there is also a bug where ~/.cache/kioexec/krun/ is not cleaned and a lot of GB may be hidden there. 20.04 seems affected by this, but the problem seems unrelated to this question).

cipricus
  • 3,444
  • 2
  • 34
  • 85
  • 1
    Worth adding is that the files are copied to ~/.cache/kioexec/krun/ and that it's possible the directory doesn't get cleaned up properly, please check and comment https://bugs.kde.org/show_bug.cgi?id=413885 – int_ua May 27 '21 at 21:51
  • @int_ua - +1 for pointing out how large was the folder: +10GB! - I know about that folder location, as seen in the image above. But whether that folder is cleaned or not doesn't affect files being copied there before opening. That seems to be caused by the fact that Dolphin doesn't mount locations, it accesses them via separate KIO processes (see last link in question). The question is in fact how to mount phone locations nonetheless. – cipricus May 28 '21 at 07:21
  • If you have a lot or RAM you can workaround by mounting the ~/.cache/kioexec/krun/ as tmpfs. Yes, it's not an answer to the question. But it's one way to deal with it. – int_ua May 31 '21 at 20:59

2 Answers2

1

Sorry, but I have too few points to leave this as a comment. The problem is that software can't use KDEs KIO layer to acces network fs. I do not know what distro you are using, but the package kio-fuse should solve your issue.

You could also install cifs-utils, create a mount-point (e.g. /mnt/movies), open the folder with dolphin, and play videos through vlc or whatever your media-player of choice might be.

telometto
  • 111
  • 5
  • Your post is welcome as an answer. I'm of course in KDE (Kubuntu 20.04 - Plasma 5.18). I'll add that info, it seems important e.g. in relation to kio-fuse, which cannot be installed in Ubunu 20.04, as said here and here. – cipricus May 18 '21 at 09:10
  • Hence, I have to try the other solution: could you edit the answer and add more details on how to mount the directory mtp:/My Phone/Internal shared storage/Download/ to /mnt/movies? Also: why is cifs-utils needed exactly? – cipricus May 18 '21 at 09:19
  • 1
    gvfs ("Gnome Virtual File System"), is Gnome-specific and reused by xfce. kio ("KDE Input/Output") is the equivalent on KDE. Without kio-fuse non-KDE applications cannot access "remote" files directly, so they are copied first. You might want to search for a non-desktop-environment-specific solution for accessing MTP devices like jmtpfs –  May 18 '21 at 12:13
  • @cipricus I removed the bounty for you (only mods can do that) and migrated. – terdon May 18 '21 at 12:41
  • @cg909 - Without kio-fuse non-KDE applications cannot access "remote" files directly - isn't that "Without kio-fuse KDE applications cannot access "remote" files directly"? – cipricus May 28 '21 at 09:46
1

Based on this answer recommending go-mtpfs to mount the phone location:

It is extremely simple, the idea is to run go-mtpfs /media/MyAndroid (no PPA needed anymore). I had tried this in the past without success, as I couldn't mount the Android drive on /media.

Instead it can be mounted in $HOME.

So, after creating ~/MyAndroid, in order to mount the Android drive, do:

go-mtpfs MyAndroid.

Don't forget to unmount with

fusermount -u MyAndroid

--- otherwise simply closing the terminal would make that folder inaccessible.

Launchers can be created for the two commands:

kate ~/.local/share/applications/mount-phone.desktop:

[Desktop Entry]
Exec=go-mtpfs MyAndroid
Icon=phone
Name=Mount phone
NoDisplay=false
StartupNotify=false
Type=Application

kate ~/.local/share/applications/unmount-phone.desktop:

[Desktop Entry]
Exec=fusermount -u MyAndroid
Icon=phone
Name=Unmount phone
NoDisplay=false
StartupNotify=false
Type=Application
cipricus
  • 3,444
  • 2
  • 34
  • 85
  • Great! This works for me in Ubuntu 21.10 and transfering files is pretty fast. Can now access my phone in Files and Double Commander again. Before this version my Samsung phone was auto mounted, but it stopped somehow after upgrading to 21.10. I used jmtpfs to mount the phone. It worked but it was very slow. – A.W. Apr 10 '22 at 06:32