linuxmint / nemo

File browser for Cinnamon
GNU General Public License v2.0
1.21k stars 299 forks source link

Can’t drag and drop files from SMB/CIFS shares from Nemo to open applications #1924

Open texneus opened 6 years ago

texneus commented 6 years ago
* Nemo version 3.8.5
 * Windowed Nemo file manager
 * Mint 19 Cinnamon, Manjaro 17.1.11.1 Cinnamon (Community Edition)
 * Graphics hardware: Intel HD530, default driver
 * 64 bit

Issue It seems I cannot drag/drop a file from a CIFS share via Samba in Nemo to certain previously opened applications. VLC is one such application that fails (included w/Mint and Manjaro), but other applications I have found issues with include SMPlayer, Mediainfo-gui, MKVToolnix-gui, and Audacity in Manjaro and Mint. VLC and SMPlayer are somewhat nice because they spit out an error, the others just fail silent.

Steps to reproduce Install Mint 19 Cinnamon or Manjaro 17.1.11.1 Cinnamon (Community Addition) Optional: Install SMPlayer, Mediainfo-gui, MKVToolnix-gui, and/or Audacity Open VLC or other listed application. Open Nemo Open an SMB/CIFS share in Nemo (smb://…) Drag a video file from the share to the previously opened VLC window

Expected behaviour The video should play

Actual behaviour VLC reports an error

Your input can't be opened:
VLC is unable to open the MRL 'smb://192.168.1.210/media/TV%20Shows/TV%20Shows/Allo%20Allo%20(1982)/Season%2001/Allo%20Allo%20s01e01-The%20British%20Are%20Coming.DVD.mkv'. Check the log for details.

I'm not sure where the VLC log is to look at it.

SMPlayer reports a similar error: “Oops, something went wrong” dialog box with an exit code of 2`

It's log reports:

Playing: smb://marvin/media/TV Shows/TV Shows/Allo Allo (1982)/Season 01/Allo Allo s01e01-The British Are Coming.DVD.mkv
Using netbios name MANJARO-PC.
Using workgroup WORKGROUP.
gensec_spnego_client_negTokenTarg_step: SPNEGO(ntlmssp) login failed: NT_STATUS_WRONG_CREDENTIAL_HANDLE
[smb] Could not open from LAN: 'smb://marvin/media/TV Shows/TV Shows/Allo Allo (1982)/Season 01/Allo Allo s01e01-The British Are Coming.DVD.mkv'
Failed to open smb://marvin/media/TV Shows/TV Shows/Allo Allo (1982)/Season 01/Allo Allo s01e01-The British Are Coming.DVD.mkv.
Exiting... (Errors when loading file)

Other apps listed above simply do nothing.

Other information Not all applications are impacted. For example, I can drag/drop a TXT file to an open instance of LibreOffice Writer, Text Editor, or Xed and it opens. I can also drag the same media file above to Mint's Media Player and it plays. It's just certain applications that do not behave as expected.

Right clicking a file and using “Open With > VLC" (or Open With > SMPlayer) works. In this case SMPlayer logs that it is playing “/run/user/1000/gvfs/smb-share:server=marvin,share=media/TV Shows/TV Shows/Allo Allo (1982)/Season 01/Allo Allo s01e01-The British Are Coming.DVD.mkv". It appears Nemo isn't providing the virtual gvfs location with drag and drop files. Why drag/drop succeeds on some apps but not others isn’t clear to me.

Also, if Thunar is installed and opened on the Cinnamon desktop drag and drop to all these applications works as expected.

ErvinSabic commented 4 years ago

I've noticed this issue as well. Dragging images from SMB instance into Wordpress upload is super annoying.

Fratt commented 3 years ago

yep, this still happens (Linux Mint 20, Nemo 4.6.5, Firefox 83.0)

icarter09 commented 3 years ago

Was able to reproduce this issue. Installing vlc-plugin-samba provided the fix. Can someone verify if that solution works for them as well? Thanks.

Jef2i commented 3 years ago

Hi ! I am using Fedora Cinnamon and I have the same issue when I try to browse à samba share and open a video through it using the default player "Parole multimedia player". I am not fond of installing VLC neither its samba plugin because I am on a very old laptop with few ressources and I feel VLC will consume lot of them. Would the ability to browse through gvfs (/run/user/1000/gvfs/... ) an option for nemo soon or in a near future ?

By the way, your suggestion (ie. installing vlc-plugin-samba) looks to me more like a workaround than a fix. Isn't it ?

leigh123linux commented 3 years ago

Maybe this could be ported to nemo https://github.com/GNOME/nautilus/commit/03b540dbe9b59016e4392b710023aa675ffbc382

Auravendill commented 3 years ago

Drag-and-Drop to telegram-desktop is also affected by this (I am using nemo 4.8.6 on Debian 11). It does work with nautilus (3.38.2) though.

teneighty-yvr commented 3 years ago

I have the same issue with ssh (sftp://) as well as our Windows server when using Nemo to connect. By connecting with Nemo both are mounted with gvfs-fuse. I'm assuming it is the same underlying issue and that anything mounted with nemo with gvfs-fuse will behave the same, so perhaps the title could be broader in scope?

Workaround: If I mount from the command line or by adding an entry to fstab with cifs then I can drag and drop from Nemo to Firefox as expected.

I assume this is because by mounting with the mount command to a mount point on a local file system, that is transparent to Nemo and it treats it as part of the file system the mount point is on, while file systems that Nemo knows are remote or removable are treated differently?

Nemo 4.8.6 Linux Mint 20.1

yllekz commented 2 years ago

Having this issue dragging/dropping mp3s from a mounted SMB share in the file explorer to Audacity. Is there a workaround or a fix coming?

mcatkins commented 1 year ago

This is still a problem in Mint 21.1 Vera ! For me the BIG problem is not being able to D&D into Firefox (ie, gmail!)

Please, Please....!

ronny-rentner commented 1 year ago

Problem exists on Debian as well and Nemo 5.6.3 and Firefox/GMail :(

HubKing commented 1 year ago

This is one of the most annoying part of Linux, as I often drag-and-drop video files to video players (double-click opens a new window, losing the position and size). In recent versions of Gnome Files (nautilus), drag-and-drop mostly works. I think this is because, Gnome Files does not actually pass real SMB path (smb://server/path...) to the application but the mapped local location (/run/user/1000/gvfs/smb-share:....). I guess the latter probably has its own shortcomings, but in my experience, the latter is less problematic. So, why not add an option to choose which behaviour to use for file drag-and-drop from SMB location? It seems that currently Nemo is using the former, so drag-and-dropping a video file from SMB location to MPV makes MPV crash.

HubKing commented 1 year ago

Having this issue dragging/dropping mp3s from a mounted SMB share in the file explorer to Audacity. Is there a workaround or a fix coming?

Use Gnome Files.

ronny-rentner commented 1 year ago

Having this issue dragging/dropping mp3s from a mounted SMB share in the file explorer to Audacity. Is there a workaround or a fix coming?

Use Gnome Files.

Gnome Files works much worse than Nemo in this regard. I had tried it first, but it has also so many other problems, it's pointless to report any bugs on it.

HubKing commented 1 year ago

Gnome Files works much worse than Nemo in this regard. I had tried it first, but it has also so many other problems, it's pointless to report any bugs on it.

How it can GF be "much worse in this regard". I mean, there are a lot of things that I don't like about GF, and that is why I am considering using Nemo, but as for drag-and-droppping SMB files, GF has the least problems amongst all the Linux file managers I have tried, because apps receive locally-mapped paths instead of real SMB paths.

Not only I can open a video file on SMB on GF by drag-and-dropping to an existing MPV window, I can also right-click and open terminal for that SMB directory (it opens the locally-mapped directory, but I can run command on the files, so it is practically the same). I tried that on Nemo and nothing happened, probably because the terminal app does not understand the SMB path.

mcatkins commented 1 year ago

I would like to point out that this is not a problem with SMB.

  1. If you mount the same smb filesystem using the mount command and /etc/fstab, then drag-and-drop works differently ("correctly")
  2. If you mount a filesystem using gvfs using the ftp or shfs protocols, the drag and drop doesn't work to apps that do not understand "ftp://..." or "shfs://..." filenames.

This just goes to show how good Plan9's "everything is a file" strategy is, in comparison with the "let's have lots of different namespaces for filenames ("smb://...", "ftp://...", "shfs://...", and the good old "/...", or is that "file://..."?) and get a library in every program to understand (and implement) them all" approach. Of course, the obvious failing is the requirement for "every program". Things that are required for every program belong in the kernel - that is basic good design. (I'm not saying that the protocol implementation belongs in the kernel, just the filename processing, and we have mount(2) for the rest)

Martin

HubKing commented 1 year ago

Martin

I am not sure if I understand you correctly or not, but as a lazy, not-smart, average computer user, I do not want to add type some terminal commands or edit some system config file with sudo every time I need to use an SMB directory. Ideally, I want to just type/click the directory address in the file manager and every app would able to read/write files there, like in MS Windows.

On Windows, apps don't need to know where the file is from, because the UNC path like "\a\b.txt" works just like a local path like "C:\a.txt" with all file API's (at least in C#). I think it is impossible to expect all apps to handle all the file share protocols, so to me, it makes more sense that a system like GVFS handles all such things and provides a path that works like a local path to applications, as Gnome Files does.

I am not sure if the rule is fixed, but to me, it seems fairly easily to guess the raw SMB path from GVFS's locally-mapped path, so even if the app needs to know the SMB path, it should not be a problem, so it does not seem necessary to pass the raw path like "smb://..." to apps.

mcatkins commented 1 year ago

HubKing. I think you understood perfectly, and I agree with you entirely. In addition to a little rant, I was just (trying to) re-iterate that this is not an SMB problem, but a GVFS/nemo problem.

Sp3ci3s8472 commented 1 year ago

I was about to switch to Nemo since I like the options it provided better than Thunar and Nautilus. Sadly I have the same problem that I can't drag and drop files from a SMB location with e.g. VLC. (Double) Clicking a file to open and play it work just fine. OS: Latest PopOS, Linux version 6.2.6

Both Thunar and Nautilus work as expected.

Installing a VLC plugin might be a nice temporary solution (haven't tested it yet), but that is not a fix for something that other file-managers seem to do without a problem. I might have the plugin already installed since I get a popup that wants me to fill in my credentials for the SMB location.

andimachovec commented 12 months ago

Installing vlc-plugin-samba provided the fix. Can someone verify if that solution works for them as well?

Does not work on my Mint 20.2 system. I'll report back soon if it works on a newer Mint release.

mcatkins commented 12 months ago

Doesn't this just fix VLC so that it understands the smb:... filename? What I want is a system-wide solution so I can drag the file to any app, such as Firefox, etc.

Perhaps Nemo could pop up a menu, when the mouse button is lifted, to select the kind of filename format to be used much like alt-drag and drop does right now, allowing the choice of copy/move/link?

On Thu, 19 Oct 2023, 10:36 Andi Machovec, @.***> wrote:

Installing vlc-plugin-samba provided the fix. Can someone verify if that solution works for them as well?

Does not work on my Mint 20.2 system. I'll report back soon if it works on a newer Mint release.

— Reply to this email directly, view it on GitHub https://github.com/linuxmint/nemo/issues/1924#issuecomment-1770437006, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACSVVIBEOMAV62PYZTU3VV3YADYCDAVCNFSM4FQK6CCKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TCNZXGA2DGNZQGA3A . You are receiving this because you commented.Message ID: @.***>

HubKing commented 10 months ago

Hmm.... Has something changed regarding this? I updated the system and now, drag-and-dropping from an SMB share works, just like Gnome Files. Nemo version 6.0.0.

andimachovec commented 10 months ago

Have updated my system to Mint 21.2. With the included Nemo 5.8.5 the problem is solved. Drag and drop into Firefox from SMB share works flawlessly