Bug 423313 - Can not choose different file manager
Summary: Can not choose different file manager
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_componentchooser (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-21 09:52 UTC by Alexander Lohnau
Modified: 2020-06-24 07:17 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.19.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Lohnau 2020-06-21 09:52:41 UTC
SUMMARY
I played around with the default applications when fixing another bug and noticed that choosing the Nautilus file manager as the default one doesn't get persisted. 

But if you select it under "Other..." it works fine.

KDE Plasma Version: master
KDE Frameworks Version: master
Qt Version: 5.14.2
Comment 1 Nate Graham 2020-06-22 18:04:39 UTC
Can confirm.
Comment 2 Alexander Lohnau 2020-06-22 18:12:47 UTC
This seems to be an issue specifically with the natuilus desktop file. It works with Kusader.

When debugging this I noticed that the proposed nautilus entry (called "Files") has the filename org.gnome.Nautilus.desktop.
But looking at this file we see:
>OnlyShowIn=Unity;GNOME;

But when adding the enty manualls the nautilus.desktop file is used. There we see:
>NotShowIn=Unity;GNOME;

So it looks like KServiceTypeTrader returns the "wrong" desktop file.
Comment 3 Méven Car 2020-06-23 08:58:02 UTC
As Alexander noticed nautilus has two .desktop files, one for when in GNOME and the other one elsewhere using the `OnlyShowIn` filter.

The KCM ignores the `OnlyShowIn` here on purpose to be able to select any installed File manager, but perhaps should not. And once we select it KServiceTrader ignores such a selected application with "OnlyShowIn!=KDE".

The issue in fact first arises with `nautilus.desktop` file that has no Mimetype field at all, and the KCM uses `MimeType=inode/directory` to find file managers.

So the issue could be that we should exclude `OnlyShowIn!=KDE` and the other one that we should relax the `MimeType=inode/directory` expectations, alternatively accepting `Category=FileManager`.
Comment 4 Méven Car 2020-06-24 07:16:12 UTC
Git commit 6fa8a6b1b4ec9cc1125e1bc96f51586e0a1c87ab by Méven Car.
Committed on 23/06/2020 at 10:25.
Pushed by meven into branch 'Plasma/5.19'.

KCM component chooser: use the category FileManager to filter filemanager apps
FIXED-IN: 5.19.2

M  +7    -3    kcms/componentchooser/componentchooserfilemanager.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/6fa8a6b1b4ec9cc1125e1bc96f51586e0a1c87ab