STEPS TO REPRODUCE 1. Set default file browser to Nautilus or Thunar 2. Connect a device via KDE Connect 3. Run 'kioclient5 exec kdeconnect://<device id>' OBSERVED RESULT A folder with a single file named 'unnamed' opens EXPECTED RESULT A folder with the contents of the device opens SOFTWARE/OS VERSIONS KDE Plasma Version: master KDE Frameworks Version: master Qt Version: 5.15 ADDITIONAL INFORMATION Relevant KDE Connect bugreport: https://bugs.kde.org/show_bug.cgi?id=413477 Reverting https://phabricator.kde.org/D29782 makes it work properly FYI the kdeconnect slave works by setting UDS_LOCAL_PATH to a sshfs mount (https://invent.kde.org/network/kdeconnect-kde/-/blob/master/kio/kiokdeconnect.cpp#L249)
From the docs: UDS_LOCAL_PATH A local file path if the ioslave display files sitting on the local filesystem (but in another hierarchy, e.g. settings:/ or remote:/) that matches what kdeconnect is doing, which is mounting the remote file system as an sshfs mount, however kdeconnect has "Class=:internet". IIUC Class=:internet is for something like the sftp KIO, where the remote file system isn't mounted locally. I think this issue can be fixed by making the kdeconnect protocol Class :local. I tested that locally by editing kio/kdeconnect.json in kdeconnect-kde, and it seems to work.
Seems to work indeed, thanks! From a KDE Connect POV this is resolved, I'll leave it up to you to decide whether to close it
Git commit 60a1adf2295d21d87fabed9c4d45cb70b6ad903e by Nicolas Fella. Committed on 30/08/2020 at 21:45. Pushed by nicolasfella into branch 'master'. [kio] Mark Class as local This is needed for kioexec to work properly since we forward to a local file system Related: bug 413477 M +17 -17 kio/kdeconnect.json https://invent.kde.org/network/kdeconnect-kde/commit/60a1adf2295d21d87fabed9c4d45cb70b6ad903e
Git commit 56d40292470bb25253405b99d94792b72436a4d7 by Nicolas Fella. Committed on 30/08/2020 at 21:47. Pushed by nicolasfella into branch 'release/20.08'. [kio] Mark Class as local This is needed for kioexec to work properly since we forward to a local file system Related: bug 413477 (cherry picked from commit 60a1adf2295d21d87fabed9c4d45cb70b6ad903e) M +17 -17 kio/kdeconnect.json https://invent.kde.org/network/kdeconnect-kde/commit/56d40292470bb25253405b99d94792b72436a4d7
Looks fixed to me. :)
Cool beans. One could argue there should be runtime validation for this in StatJob. If a :internet slave sets UDS_LOCAL_PATH that seems fairly indicative of using the wrong class.
(In reply to Harald Sitter from comment #6) > Cool beans. > > One could argue there should be runtime validation for this in StatJob. > If a :internet slave sets UDS_LOCAL_PATH that seems fairly indicative of > using the wrong class. Excellent point; it also solves an issue of StatJob behaving differently based on whether you call: - KIO::mostLocalUrl, if the protocol Class isn't :local the job is cancelled, UDS_LOCAL_PATH is never looked at - KIO::stat/statDetails then job->statResult(), the Class isn't checked and UDS_LOCAL_PATH is used StatJob should be consistent (that issue made me go in circles for a while, where it didn't work if the code in kdeconnect used KRun which went through KIOExec path (uses KIO::mostLocalUrl); and worked if I changed kdeconnect to use OpenUrlJob instead of KRun, the former uses StatJob::statDetails). I'll see what I can do about that and submit an MR. Thanks :)
https://invent.kde.org/frameworks/kio/-/merge_requests/117