Bug 472697 - Open with Open on Connected Device via KDE Connect appears for all files in Dolphin
Summary: Open with Open on Connected Device via KDE Connect appears for all files in D...
Alias: None
Product: kdeconnect
Classification: Applications
Component: common (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Albert Vaca
: 474593 (view as bug list)
Depends on:
Reported: 2023-07-27 13:26 UTC by Greg Lepore
Modified: 2023-09-22 16:53 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In:

File Associations window with KDE Connect Open As... (271.99 KB, image/jpeg)
2023-07-27 13:26 UTC, Greg Lepore

Note You need to log in before you can comment on or make changes to this bug.
Description Greg Lepore 2023-07-27 13:26:39 UTC
Created attachment 160565 [details]
File Associations window with KDE Connect Open As...

Not sure if this bug is in Dolphin or KDE Connect, but when right clicking on any file in Dolphin, I get "Open with Open on connected device via KDE Connect"  for all files as the top option, regardless of file type. This also triggers KDE Connect when clicking on an unknown file format after downloading in Chromium.

Version of KDE Connect is 21.12.3-0ubuntu1 on KDE Neon.

I've searched through the File Associations menu and the option also appears there for all file types (side note, I thought I read recently there was a way to change all File Associations at once, but I can't figure it out.) I've also search through various mimetypes files on the system but did not find that option.

Desired resolution would be to remove this association everywhere it occurs.
Comment 1 Andrew Dinmore 2023-08-15 21:27:54 UTC
Confirming this problem.

It may just be a configuration issue somewhere I couldn't find, but the default action for unknown file types should be the handler selection dialogue, not sending it to a connected device.

Dolphin Version: 4:23.04.3-0xneon+22.04+jammy+release+build21
KDE Connect Version: 23.04.3-0xneon+22.04+jammy+release+build31

Operating System: KDE neon 5.27
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.108.0
Qt Version: 5.15.10
Kernel Version: 6.2.0-26-generic (64-bit)
Comment 2 Chris Holland 2023-08-28 18:12:12 UTC
* https://discuss.kde.org/t/everything-downloaded-in-firefox-opens-in-kde-connect/4337
* https://old.reddit.com/r/kde/comments/163jnhj/how_to_remove_kde_connects_url_handler_from/
* https://invent.kde.org/network/kdeconnect-kde/-/blame/master/data/org.kde.kdeconnect_open.desktop#L132
* https://invent.kde.org/network/kdeconnect-kde/-/commit/f1ce22124ce7dd630b8e909b4c50f90f035166d5

> https://discuss.kde.org/u/guss77 (2023-08-26):
> Weird that it only started happening recently - the relevant commit that added KDE Connect open on application/octet-stream 1 was done 2 years ago.

So it's either a change in Dolphin, or KIO, or some other KDE Framework related to MimeTypes?
Comment 3 Chris Holland 2023-08-28 19:04:28 UTC
Uhg, can't find it. It's possible that the change is related to "mime inheritance" instead of "application/octet-stream".

* KIO Search: https://invent.kde.org/search?search=application%2Foctet-stream&nav_source=navbar&project_id=2729&group_id=1552&search_code=true&repository_ref=master
* (3 years ago) `KCoreDirLister::setMimeFilter` https://invent.kde.org/frameworks/kio/-/blame/master/src/core/kcoredirlister.cpp?page=3#L2319
* (2 years ago) `KFileItemPrivate::determineMimeTypeHelper` https://invent.kde.org/frameworks/kio/-/blame/master/src/core/kfileitem.cpp#L550
* (4 years ago) `KFileItem::currentMimeType` https://invent.kde.org/frameworks/kio/-/blame/master/src/core/kfileitem.cpp?page=2#L1667
* (7 months ago) `KFileFilterCombo::setMimeFilter` https://invent.kde.org/frameworks/kio/-/blame/master/src/filewidgets/kfilefiltercombo.cpp#L248
* (2 years ago) `KFileWidgetPrivate::updateAutoSelectExtension` https://invent.kde.org/frameworks/kio/-/blame/master/src/filewidgets/kfilewidget.cpp?page=3#L2300
* (3 years ago) `HTTPProtocol::davParsePropstats` https://invent.kde.org/frameworks/kio/-/blame/master/src/kioworkers/http/http.cpp#L932
* (7 years ago) `HTTPProtocol::fixupResponseMimetype` https://invent.kde.org/frameworks/kio/-/blame/master/src/kioworkers/http/http.cpp?page=3#L2605
* (7 years ago) `http.json "defaultMimetype"` https://invent.kde.org/frameworks/kio/-/blame/master/src/kioworkers/http/http.json#L7
* (1 year ago) `kfileitemactions.cpp mimeTypeListContains` https://invent.kde.org/frameworks/kio/-/blame/master/src/widgets/kfileitemactions.cpp#L61
* (7 months ago) `KFileItemActionsPrivate::addPluginActionsTo` https://invent.kde.org/frameworks/kio/-/blame/master/src/widgets/kfileitemactions.cpp#L533
* (1 year ago) `KFilePropsPlugin::slotEditFileType` https://invent.kde.org/frameworks/kio/-/blame/master/src/widgets/kpropertiesdialog.cpp?page=2#L1234
* (1 year ago) `KFilePropsPlugin::updateDefaultHandler` https://invent.kde.org/frameworks/kio/-/blame/master/src/widgets/kpropertiesdialog.cpp?page=2#L1595
* Dolphin Search (No Results): https://invent.kde.org/search?repository_ref=master&search=application%2Foctet-stream&search_code=true&scope=projects&group_id=1561&project_id=2775
* KService (kbuildsycoca5) (A few autotests): https://invent.kde.org/search?repository_ref=master&search=application%2Foctet-stream&search_code=true&scope=projects&group_id=1552&project_id=2379
* (3 years ago) Fix application preference ordering for mimetypes with multiple inheritance. https://invent.kde.org/frameworks/kservice/-/commit/d4c9cb9d0652c1ed7ba504335a50ea6bca7851e5


Operating System: openSUSE Tumbleweed 20230823
KDE Plasma Version: 5.27.7
KDE Frameworks Version: 5.109.0
Qt Version: 5.15.10
Kernel Version: 6.4.11-1-default (64-bit)
Comment 5 Fabian Vogt 2023-08-30 06:05:04 UTC
> This also triggers KDE Connect when clicking on an unknown file format after downloading in Chromium.

IMO this is the biggest issue and I'm not sure whether it's solvable. We could add hacks in KIO and everywhere else to treat the fallback mimetype application/octet-stream as unknown even if there exists a handler, but this wouldn't fix it for applications not using KIO and also result in weird behaviour in that it has a handler, but can't open it.

IMO the handler should be removed until a solution can be found.
Comment 6 Albert Vaca 2023-09-10 05:08:52 UTC
Thanks Ilia, that's the commit while the file was fixed and thus started to work as intended (which seems to be problematic). I'm going to remove this feature until we find a way to do this without causing the problems described.
Comment 7 Bug Janitor Service 2023-09-10 05:16:55 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/595
Comment 8 Albert Vaca 2023-09-14 06:18:35 UTC
Git commit 64f9df96ece0d3f72096401ffdd1884fdb64e7b7 by Albert Vaca Cintora.
Committed on 14/09/2023 at 08:18.
Pushed by albertvaka into branch 'master'.

Remove "Open on connected device via KDE Connect"

It seems to be causing too many problems compared to the advantages that
using "send" instead of "open" brings.

M  +0    -1    data/CMakeLists.txt
D  +0    -137  data/org.kde.kdeconnect_open.desktop

Comment 9 Albert Vaca 2023-09-14 06:26:13 UTC
Git commit 8b78ba6a583fd83d44b8b6912283c826b0314daa by Albert Vaca Cintora.
Committed on 14/09/2023 at 08:25.
Pushed by albertvaka into branch 'release/23.08'.

Remove "Open on connected device via KDE Connect"

It seems to be causing too many problems compared to the advantages that
using "send" instead of "open" brings.

(cherry picked from commit 64f9df96ece0d3f72096401ffdd1884fdb64e7b7)

M  +0    -1    data/CMakeLists.txt
D  +0    -134  data/org.kde.kdeconnect_open.desktop

Comment 10 Antonio Rojas 2023-09-18 07:16:15 UTC
*** Bug 474593 has been marked as a duplicate of this bug. ***
Comment 11 gudvinr+kde 2023-09-19 16:09:50 UTC
I have KDE Gear 23.08.1 and this commit (https://invent.kde.org/network/kdeconnect-kde/-/commit/8b78ba6a583fd83d44b8b6912283c826b0314daa) is in release/23.08 but I still see every file being associated with "Open on connected device via KDE Connect"
Comment 12 Albert Vaca 2023-09-22 16:53:51 UTC
This missed 23.08.1 and will be in 23.08.2