Bug 355328 - Can't open files on Samba share using non-KIO-aware software without adding the share's password into to the URL or using %F in the desktop file
Summary: Can't open files on Samba share using non-KIO-aware software without adding t...
Status: RESOLVED DUPLICATE of bug 75324
Alias: None
Product: kio-extras
Classification: Frameworks and Libraries
Component: default (show other bugs)
Version: 17.08.2
Platform: openSUSE Linux
: NOR major
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: accessibility
Depends on:
Blocks:
 
Reported: 2015-11-14 07:37 UTC by laichiaheng
Modified: 2018-01-31 17:20 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description laichiaheng 2015-11-14 07:37:58 UTC
I can't open the videos, I have to fill in the password in the URL in terminal by myself.
ex: user@user-PC:~>mpv 'smb://user@192.168.1.xxx/影片/movie.mkv'
It has to be like this:
ex: user@user-PC:~>mpv 'smb://user:password@192.168.1.xxx/影片/movie.mkv'

I can't do it in the dolphin file manager, it needs to be done in terminal.

Reproducible: Always

Steps to Reproduce:
1.Open the path of my samba sharing directory
2.Open the video.
3.nothing

Actual Results:  
FAIL!!
Comment 1 Nate Graham 2017-10-20 02:30:04 UTC
Are you still able to reproduce the issue? I am able to get this working in Kubuntu 17.04 with Plasma 5.9.5 by doing the following:

1. Get another Kubuntu 17.04 machine on the same network, use it to create a Samba share, and put a movie file in it (mine was a .mov)
2. Connect to that machine from your machine via Dolphin > Network
3. Navigate to the movie file on the share
4. Open it in VLC via [right-click] -> Open With -> [select VLC]

For me, this works fine.

Does anybody have a reproducible set of steps that make it fail?
Comment 2 Nate Graham 2017-10-21 17:11:25 UTC
So this seems to work in Dolphin right now when the share is on a Linux PC, but fails when the share is on a Windows PC.

As Lai Chiaheng has observed, Windows Samba seems to require the password to be specified in the URL. From my time in Mac land, I seem to remember Finder saying, "Are you sure you want to enable Windows Samba sharing? That requires storing Samba passwords in an insecure way!" So maybe this is just a poor Samba implementation in Windows that we need to handle.
Comment 3 Nate Graham 2017-10-21 18:54:17 UTC
I asked our resident Samba expert and he says that the problem here is that MPV and VLC aren't KIO-aware, which would allow this to just work. Instead, the SMB KIOSlave falls back to blindly passing them the path to the file, which fails because right now that path doesn't include the password.

It seems somewhat unlikely that we'll get VLC or MPV to link against KIO--let alone the entire universe of other non-KDE software--so we're probably going to have to do something yucky like just add the password into the path and live with diminished security in exchange for making this work, unless we can think of a clever workaround that doesn't ruin performance.
Comment 4 Nate Graham 2017-10-24 20:00:06 UTC
So there is another option I hadn't considered, which is to have KIO use FUSE to mount these remote URLs locally, which exposes them to software that doesn't use KIO but is otherwise POSIX-compliant. This is what GNOME's GVFS does, which is why they don't have the same problem (though FUSE mounting does impose a performance penalty, but I suppose that's better than not having the functionality at all with popular apps like VLC).

It looks like there was an effort to implement that a few years back: https://techbase.kde.org/Projects/KioFuse

Sadly it appears to have been abandoned. I wonder if it's revivable.
Comment 5 Nate Graham 2017-10-24 20:27:19 UTC
Another option: replace the %U in VLC's desktop file with %F, which forces the system to download the file locally to a temp directory before passing it to the app. This does work (hurrah!) but you do need to wait a bit for the file to download and there's no feedback while that happens, which isn't the best user experience when the network connection is slow.

This change would need to be made at the distro level, which wouldn't make sense for distros that also ship GNOME, since GNOME's GVFS is able to do this transparently, as mentioned above.
Comment 6 Nate Graham 2017-10-28 15:07:24 UTC
*** Bug 342272 has been marked as a duplicate of this bug. ***
Comment 7 Nate Graham 2017-10-28 15:14:39 UTC
Marking as a duplicate to consolidate info in one bug report.

*** This bug has been marked as a duplicate of bug 330192 ***
Comment 8 Nate Graham 2018-01-31 17:20:30 UTC

*** This bug has been marked as a duplicate of bug 75324 ***