Add support for sshfs to the fstab backend
ClosedPublic

Authored by lbeltrame on Sep 3 2019, 11:44 AM.

Details

Reviewers
bruns
broulik
fvogt
Group Reviewers
KDE Connect
Summary

This commit introduces support for sshfs as network filesystem.
It's probably used enough to warrant the inclusion.

Test Plan

Started dolphin without the patch, did not see mounts in the device list, added patch and restarted dolphin, saw the mountpoints in the device list.

Diff Detail

Repository
R245 Solid
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16044
Build 16062: arc lint + arc unit
lbeltrame created this revision.Sep 3 2019, 11:44 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 3 2019, 11:44 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
lbeltrame requested review of this revision.Sep 3 2019, 11:44 AM
fvogt added a comment.Sep 3 2019, 11:48 AM

fuse.sshfs is used by kdeconnect as well, does that cause some kind of conflict?

If not, LGTM.

Could be improved by adding other filesystems (curlftpfs?) as well and using something like

QStringList{"nfs", "nfs4", "smbfs", "cifs", "fuse.sshfs"}.contains(fstype); instead.

fuse.sshfs is used by kdeconnect as well, does that cause some kind of conflict?

I can't test this in the current network (no office wifi, broadcast blocked at all levels). I'll have to see for myself when I get home.

This causes KDE connect drive to show up as "/run/user/1000/HASH (fuse.sshfs)" in places panel while being accessed.
I really don't like KDE connect using sshfs, though, so +1 from me :P

ngraham added a subscriber: ngraham.Sep 3 2019, 1:26 PM

+1 for doing this and also fixing KDE Connect to not expose its mount as an implementation detail.

If it's a problem for kdeconnect mounts to appear there, how can we hide it? It's an sshfs mountpoint like any other, only that it is mounted programmatically.

Ping? Can we get this in?

If it's a problem for kdeconnect mounts to appear there, how can we hide it? It's an sshfs mountpoint like any other, only that it is mounted programmatically.

We should be able to easily hide it from KIO, because we know that the mount point of the place URL will be kdeconnect@X.X.X.X

Would this change be needed on this side or kdeconnect side? I don't mind landing this, but I need formal approval by someone. (I won't have any time to do additional changes elsewhere).

One possibility to hide it would be the x-gvfs-* options, though I am not sure if it is possible to pass these to fuse.

Would this change be needed on this side or kdeconnect side? I don't mind landing this, but I need formal approval by someone. (I won't have any time to do additional changes elsewhere).

The change I was talking about would be in KIO (in the places model). I can do that.

One possibility to hide it would be the x-gvfs-* options, though I am not sure if it is possible to pass these to fuse.

Doesn't seem to work :(

sshfs -o x-gvfs-hide nuc:/data/ /home/elvis/DATA/
fuse: unknown option(s): `-o x-gvfs-hide'

sshfs -o comments=x-gvfs-hide nuc:/data/ /home/elvis/DATA/
fuse: unknown option(s): `-o comments=x-gvfs-hide'

@elvisangelaccio Thanks, first of all. If that's the case, do you think it's better to touch KIO first before landing this?

@elvisangelaccio Thanks, first of all. If that's the case, do you think it's better to touch KIO first before landing this?

Yeah this should probably wait for the KIO patch, which I just submitted: https://invent.kde.org/frameworks/kio/-/merge_requests/175

@elvisangelaccio Thanks, first of all. If that's the case, do you think it's better to touch KIO first before landing this?

Yeah this should probably wait for the KIO patch, which I just submitted: https://invent.kde.org/frameworks/kio/-/merge_requests/175

The KIO patch has been merged.

+1 for merging this one as well.

Any objections? Or I'll merge on Sunday evening UTC+1.

bruns accepted this revision.Oct 24 2020, 4:26 PM
This revision is now accepted and ready to land.Oct 24 2020, 4:26 PM