Bug 408233 - ark cannot drag and drop files to arbitrary apps (e.g. mpv, pcmanfm-qt) due to lack of XDS support
Summary: ark cannot drag and drop files to arbitrary apps (e.g. mpv, pcmanfm-qt) due t...
Status: CONFIRMED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 19.04.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
: 425938 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-06-03 05:21 UTC by Walter Lapchynski
Modified: 2021-12-18 14:06 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Lapchynski 2019-06-03 05:21:14 UTC
SUMMARY
In LXQt's file manager, pcmanfm-qt, which can also optionally manage the desktop, it is not possible to drag and drop a file from ark to any pcmanfm-qt window, a folder therein, or the desktop.

STEPS TO REPRODUCE
1. Open an archive in ark
2. Open a pcmanfm-qt window
3. Drag and drop file from the archive to the pcmanfm-qt window
4. Ensure pcmanfm-qt is in control of the desktop (has to be run with `pcmanfm-qt --desktop`
5. Drag and drop file from the archive to the desktop

OBSERVED RESULT
Dragging and dropping fails. A general prohibition sign badge appears over the dragged icon when mousing over the areas managed by pcmanfm-qt.

EXPECTED RESULT
Dragging and dropping succeeds as it does with other archivers such as:
 * engrampa
 * file-roller
 * xarchiver

SOFTWARE/OS VERSIONS
Linux: Lubuntu 19.10 (development)
KDE Frameworks Version: 5.58.0 
Qt Version: 5.12.2
LXQt Version: 0.14.1
pcmanfm-qt Version: 0.14.1
Comment 1 Elvis Angelaccio 2019-06-16 20:19:37 UTC
Please report this to the pcmanfm-qt developers. They need to call the ark dbus api, similar to what dolphin does: https://cgit.kde.org/dolphin.git/tree/src/views/draganddrophelper.cpp

I don't know how they handle the other archivers. Would be interesting to have a standard way to extract files, if possible.
Comment 2 Walter Lapchynski 2019-06-16 21:22:48 UTC
I submitted a new issue:
https://github.com/lxqt/pcmanfm-qt/issues/977

but also asked if they have any suggestion on how to do this in a more standard way to share it upstream.
Comment 3 Walter Lapchynski 2019-06-16 22:00:53 UTC
LXQt has their own archiver (or rather, will; it hasn't hit v1 yet) and they have a generalized methodology to DND to anywhere using pure Qt methods:
https://github.com/lxqt/lxqt-archiver/pull/93

Might be a nice alternative to forcing every single app that wants to interact with ark to have to write code specific to it. I mean if every file manager is expected to do that, it seems a little silly, especially if all the other archivers had the same expectation.
Comment 4 Walter Lapchynski 2019-06-16 22:31:22 UTC
And as it turns out, file-roller and engrampa use Freedesktop's Direct Save Protocol (XDS) which seems about as standard as it comes:
https://www.freedesktop.org/wiki/Specifications/XDS/
Comment 5 Konstantin Kharlamov 2019-11-28 13:32:18 UTC
(In reply to Elvis Angelaccio from comment #1)
> Please report this to the pcmanfm-qt developers. They need to call the ark
> dbus api, similar to what dolphin does:
> https://cgit.kde.org/dolphin.git/tree/src/views/draganddrophelper.cpp
> 
> I don't know how they handle the other archivers. Would be interesting to
> have a standard way to extract files, if possible.

The pcmanfm-qt report for the same problem has a link to this PR in lxqt-archiver https://github.com/lxqt/lxqt-archiver/pull/93 As I understand from what it says, they managed to find "a standard way to extract files".
Comment 6 Elvis Angelaccio 2019-12-01 10:11:59 UTC
(In reply to Walter Lapchynski from comment #4)
> And as it turns out, file-roller and engrampa use Freedesktop's Direct Save
> Protocol (XDS) which seems about as standard as it comes:
> https://www.freedesktop.org/wiki/Specifications/XDS/

Interesting, this is something we could support, but of course someone needs to do the work (patches welcome).
Comment 7 Nate Graham 2021-11-03 04:11:07 UTC
*** Bug 425938 has been marked as a duplicate of this bug. ***
Comment 8 Nicolas Fella 2021-12-06 20:14:04 UTC
I recently looked into this and it's not that easy:
1. XDS is not trivial to implement with Qt's DnD API (since you need write access to DnD data)
2. XDS does not work on Wayland, presumably due to the same reason. See also https://gitlab.gnome.org/GNOME/file-roller/-/issues/4

A better solution might be to have Ark offer access to the archive via a virtual (fuse) filesystem. That way the receiving app would see a regular file and Ark would automatically decompress it on the fly
Comment 9 Nicolas Fella 2021-12-06 20:17:58 UTC
See e.g. https://github.com/bugnano/archivefs