Bug 409592 - Unnecessary remote and devices items in file dialogs
Summary: Unnecessary remote and devices items in file dialogs
Status: RESOLVED WORKSFORME
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: Places (other bugs)
Version First Reported In: 5.54.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-07 18:01 UTC by Tommi Nieminen
Modified: 2019-07-16 17:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Screenshot of Dolphin highlighting the extra entries (88.91 KB, image/png)
2019-07-07 18:01 UTC, Tommi Nieminen
Details
signature.asc (833 bytes, application/pgp-signature)
2019-07-16 09:13 UTC, Tommi Nieminen
Details
signature.asc (833 bytes, application/pgp-signature)
2019-07-16 17:31 UTC, Tommi Nieminen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tommi Nieminen 2019-07-07 18:01:10 UTC
Created attachment 121370 [details]
Screenshot of Dolphin highlighting the extra entries

SUMMARY

The Places panel should exclude items in `/etc/fstab`, because they can be accessed using the directory tree in the usual way. However, in all KDE Plasma versions I’ve encountered I get at least some of the local filesystems in the Devices section and usually all of my NFS shares in the Remote section of the Places panel. (At least the latter might actually be the designers’ intention although I find it unsettling.)

STEPS TO REPRODUCE

1. Create an installation with multiple filesystems and NFS shares.
2. Open up Dolphin or any standard file dialog.
3. Look at the Remote and Devices sections of the Places panel.

OBSERVED RESULT

At least some of the `fstab`-mounted filesystems appear in the Devices section, and all of the NFS shares in the Remote section.

Also, I couldn’t reproduce it in a virtual machine but sometimes filesystems mounted by their UUID’s but having disk labels as well appear multiple times in the panel.

EXPECTED RESULT

Entries from `/etc/fstab` should be excluded. Any device should have at most a single entry.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Debian GNU/Linux 10 (kernel 4.19.0-5-amd64)
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3

ADDITIONAL INFORMATION

Sample `/etc/fstab` from the virtual machine I produced the attached screenshot with. The root directory appears as the “36.0 GiB Hard Drive” in the Devices section, and the NFS shares in the Remote section.

# /etc/fstab

UUID=32b48915-d25a-4aa6-a048-a2ccf059b565   /               ext4    errors=remount-ro   0 1
UUID=49f94528-8ee4-4788-907b-d0acf042bca1   none            swap    sw                  0 0

## NFS
#
aristoteles:/homes                          /ext/home       nfs     nfsvers=4,noatime   0 0
aristoteles:/Multimedia                     /ext/multimedia nfs     nfsvers=4,noatime   0 0
aristoteles:/Public                         /ext/nas        nfs     nfsvers=4,noatime   0 0
Comment 1 Nate Graham 2019-07-15 21:28:05 UTC
> Any device should have at most a single entry.
Definitely.


> Entries from `/etc/fstab` should be excluded.
Not sure about this one. How can we be sure that the devices you might have added to /etc/fstab that wouldn't otherwise show up in the Places panel should be omitted?


> However, in all KDE Plasma versions I’ve encountered I get at least some of
> the local filesystems in the Devices section and usually all of my NFS shares
> in the Remote section of the Places panel. (At least the latter might actually
> be the designers’ intention although I find it unsettling.)
Yes, this is by design. Can you explain why you don't like it? Keep in mind that individual entries in the places panel can be hidden if you'd rather not see them.
Comment 2 Tommi Nieminen 2019-07-16 09:13:41 UTC
Created attachment 121546 [details]
signature.asc

Kirjoitit tiistaina 16. heinäkuuta 2019 0.28:

> > Entries from `/etc/fstab` should be excluded.
> 
> Not sure about this one. How can we be sure that the devices you might have
> added to /etc/fstab that wouldn't otherwise show up in the Places panel
> should be omitted?

I think gvfs is handling this just so: it excludes fstab entries from places.
Most of the entries in fstab are in any case either “system” folders (like eg. 
/boot, /var, /usr/local) or “subroots” (eg. /home—anything worthwhile resides 
only under it). They don’t require shortcuts, and they can even be distracting 
for ordinary users.

I know they can be hidden one by one, and that’s what I usually do, but then I 
have to remember doing that for every user account I set up for others too— 
unless I want to get a hasty phone call saying user can’t access something 
they think they should!

>> However, in all KDE Plasma versions I’ve encountered I get at least some
>> of the local filesystems in the Devices section and usually all of my NFS
>> shares in the Remote section of the Places panel. (At least the latter
>> might actually be the designers’ intention although I find it
>> unsettling.)
> 
> Yes, this is by design. Can you explain why you don't like it?

I can fully understand NFS/Samba/other network shares appearing in Network 
places (although I personally find that distracting too; after all, I’ve 
mounted the shares for a purpose: to sit tightly in the directory tree as they 
should). This one I won’t be pressing on as it’s only a matter of taste :)

Maybe a halfway solution: could KIO respect x-gvfs-hide? Or does it already, I 
haven’t actually tried?
Comment 3 Nate Graham 2019-07-16 17:22:39 UTC
(In reply to Tommi Nieminen from comment #2)
> I think gvfs is handling this just so: it excludes fstab entries from places.
> Most of the entries in fstab are in any case either “system” folders (like
> eg. 
> /boot, /var, /usr/local) or “subroots” (eg. /home—anything worthwhile
> resides 
> only under it). They don’t require shortcuts, and they can even be
> distracting 
> for ordinary users.
Some entries are already omitted (e.g. swap partitions and the EFI boot partition). I believe you're talking about entries that you've manually added, right? Ordinary users don't manually edit /etc/fstab.


> Maybe a halfway solution: could KIO respect x-gvfs-hide? Or does it already,
> I 
> haven’t actually tried?
In fact, this is already supported! :)

https://cgit.kde.org/solid.git/tree/src/solid/devices/backends/fstab/fstabstorageaccess.cpp#n47

Is that sufficient for your purposes?
Comment 4 Tommi Nieminen 2019-07-16 17:31:23 UTC
Created attachment 121558 [details]
signature.asc

Kirjoitit tiistaina 16. heinäkuuta 2019 20.22:

> Some entries are already omitted (e.g. swap partitions and the EFI boot
> partition). I believe you're talking about entries that you've manually
> added, right? Ordinary users don't manually edit /etc/fstab.

Yeah, that’s was part of why I thought it unnecessary for those entries to 
show up in KIO places—if users cannot actually *do* anything with them, 
neither should they be offered them.

But:

>> Maybe a halfway solution: could KIO respect x-gvfs-hide? Or does it
>> already, I
>> haven’t actually tried?
> 
> In fact, this is already supported! :)

Damn, I SHOULD have tried that first. Sorry, I’ll do it next time!

I think you can now mark the bug as solved (maybe adding a sidenote on the x-
gvfs-hide trick?).
Comment 5 Nate Graham 2019-07-16 17:48:36 UTC
Awesome!

Yeah, the documentation is generally pretty lacking. :/ It's an ongoing area of concern and work.