SUMMARY Having NFS shares mounted via fstab may in duplicate items under "Remote" places. This seems similar to bug 406242 except it occurs when the path on the NFS server does not start with a '/'. STEPS TO REPRODUCE 1. add NFS share mount to fstab in the form `nas.local:export/foo /media/net-foo nfs defaults,nofail 0 0` 2. systemctl daemon-reload && mount -a 3. open Dolphin OBSERVED RESULT The share appears twice with the same name. One with the mounted and one with the unmounted icon. EXPECTED RESULT Share should appear only once. SOFTWARE/OS VERSIONS Linux: Fedora (available in About System) KDE Plasma Version: 5.27.7 KDE Frameworks Version: 5.109.0 Qt Version: 5.15.10
Extending the fix to bug 406242 would be a bit inelegant as one would need to test 4 combinations of (non) leading / (non) trailing slashes. Could we assume that 'mtab' device name will always have the same style (leading slash without trailing slash) and convert the fstab string to that style, before testing with 'contains'?
Two questions: Can you share the bookmark corresponding to your mount present in `$HOME/.local/share/user-places.xbel` ? Can you share the result of the command `solid-hardware list` (might be `solid-hardware5 list`, you might to install a package to have it) for the lines concerning your mount ?
Can you share your fstab file (or at least all the nfs lines) ?
(In reply to Méven Car from comment #3) > Can you share your fstab file (or at least all the nfs lines) ? The fstab entry is as follows: > nas.local:export/foo /media/net-foo nfs defaults,nofail 0 0 The content of `$HOME/.local/share/user-places.xbel` seems to hold a lot of out-of-date entries (is this a bug as well?). Since I have changed my configuration a few times I am not sure how to find the "corresponding" bookmark, but I guess it is this one: > <separator> > <info> > <metadata owner="http://www.kde.org"> > <UDI>/org/kde/fstab/nas.local:export/foo:/media/net-foo</UDI> > <isSystemItem>true</isSystemItem> > <IsHidden>true</IsHidden> > </metadata> > </info> > </separator> And here is the output from solid-hardware5 list for the concerned mount: > udi = '/org/kde/fstab/nas.local:/export/foo:/media/net-foo' > udi = '/org/kde/fstab/nas.local:export/foo:/media/net-foo'
Thanks. (In reply to Massimiliano L from comment #4) > (In reply to Méven Car from comment #3) > > Can you share your fstab file (or at least all the nfs lines) ? > > The fstab entry is as follows: > > nas.local:export/foo /media/net-foo nfs defaults,nofail 0 0 > > The content of `$HOME/.local/share/user-places.xbel` seems to hold a lot of > out-of-date entries (is this a bug as well?). Since I have changed my > configuration a few times I am not sure how to find the "corresponding" > bookmark, but I guess it is this one: > > > <separator> > > <info> > > <metadata owner="http://www.kde.org"> > > <UDI>/org/kde/fstab/nas.local:export/foo:/media/net-foo</UDI> > > <isSystemItem>true</isSystemItem> > > <IsHidden>true</IsHidden> > > </metadata> > > </info> > > </separator> > You must have one for `/org/kde/fstab/nas.local:/export/foo:/media/net-foo` too./net-foo' as well. I am guessing the issue would be fixed if you updated your fstab line to : From `nas.local:export/foo /media/net-foo nfs defaults,nofail 0 0` To `nas.local:/export/foo /media/net-foo nfs defaults,nofail 0 0` (note the added slash)
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/solid/-/merge_requests/142
(In reply to Méven Car from comment #5) > I am guessing the issue would be fixed if you updated your fstab line to : > > From > `nas.local:export/foo /media/net-foo nfs defaults,nofail 0 0` > > To > `nas.local:/export/foo /media/net-foo nfs defaults,nofail 0 0` > > (note the added slash) Yes, thank you. I had figured this out when checking the bug report for the trailing `/` case. It makes sense to have a full absolute path after `:` but apparently fstab does not care. Thank you for working on this!
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/solid/-/merge_requests/143
Git commit eaebf4a0adc65e4765ce978da1075b2682707d4f by Méven Car. Committed on 11/09/2023 at 19:23. Pushed by meven into branch 'master'. FstabHandling: ensure mountpoints starts with / for nfs M +18 -2 src/solid/devices/backends/fstab/fstabhandling.cpp https://invent.kde.org/frameworks/solid/-/commit/eaebf4a0adc65e4765ce978da1075b2682707d4f