desktopfolder icon indicating copy to clipboard operation
desktopfolder copied to clipboard

copy - paste to desktop from Nautilus 3.30 does not work

Open fossfreedom opened this issue 6 years ago • 7 comments

I am creating this issue to remember to look at this at some point.

if anyone wants to pitch in with a fix then please do!

Nautilus 3.26 drag and drop onto the desktop works just fine.

For Nautilus 3.30 and later, drag and drop does not work. Seems like there has been a change to using dbus to copy/move files https://gitlab.gnome.org/World/ShellExtensions/desktop-icons/commit/d886ac7b48712dd70d3d333577916db83ad510e1

Need to find a solution that does not impact Elementary and other file-managers.

fossfreedom avatar Dec 06 '18 11:12 fossfreedom

I'm thinking if this is related to #221. I've seen the clipboard and d'n'd code are related. Do you know if the copy/paste works?

spheras avatar Dec 14 '18 10:12 spheras

ok - my bad - the drag and drop works just fine. It is the copy and paste that does not work - i.e. copy from nautilus 3.30 and there is not paste option on the DesktopFolder.

Nautilus 3.26 the copy paste & drag and drop both work just fine.

I installed parcelite and the parcelite clipboard showed me this:

x-special/nautilus-clipboard
copy
file:///home/dad/Downloads/budgie-desktop_10.4+git20180830.02.f2dbc215fdb-1.dsc

So this is a very specific nautilus issue - nautilus is encoding its copy clipboard with "x-special/nautilus-clipboard" which I presume DesktopFolder understandably doesnt understand

fossfreedom avatar Dec 16 '18 10:12 fossfreedom

ok. I will take a look, perhaps the problem is like #221 reported, it seems Marlin don't use the file:// prefix (in which is based desktopfolder dnd and clipboard management). I've tried copying pasting from other managers (krusader, pacman) and they don't work also.

spheras avatar Dec 19 '18 09:12 spheras

I have confirmed it doesn't work for Nemo either... maybe the same problem?

spheras avatar Jan 30 '19 11:01 spheras

I guess so.

I was googling around and saw this - the bit about no default method to define a way to copy files was surprising.

https://stackoverflow.com/questions/50319438/inserting-uris-into-gtk-clipboard-with-vala

I am snowed under with the upcoming feature freeze of 19.04 and 18.04.2 release stuff but will try to squeeze some time to have a look at the above and see how it relates to nautilus and by extension to nemo.

... EDIT

http://sourcedigit.com/13826-set-nemo-default-file-manager-ubuntu/

Given the stackoverflow question may have to determine the default file-manager and then write the cut or copy clipboard stuff depending upon what filemanager is the default.

fossfreedom avatar Jan 30 '19 11:01 fossfreedom

not sure. Currently the clipboard manager is only giving 2 targets:

        private const Gtk.TargetEntry[] clipboard_targets    = {
            { "x-special/gnome-copied-files", 0, ClipboardTarget.GNOME_COPIED_FILES },
            { "UTF8_STRING", 0, ClipboardTarget.UTF8_STRING }
        };

With the help of CopyQ I could get the clipboard from everything... maybe inside the code is something interesting.. some FAQ about this: https://github.com/hluk/CopyQ/blob/347f6f59b6dcae68d0cbd430f23e1f58453ecf65/docs/faq.rst#how-to-reuse-file-paths-copied-from-a-file-manager

I've checked that nemo is asking for the "gnome-copied-files" when pasting, but it says there is nothing to paste... I don't why. I feel this module need to be rewritten from scratch entirely (clipboard and dnd), I copied most of it from the elementary files (based on marlin if I'm not wrong).

spheras avatar Jan 30 '19 15:01 spheras

ok - just a FYI - issue about the screwed up way Nautilus 3.30 and later handles copy-paste is here

https://gitlab.gnome.org/GNOME/nautilus/issues/634

Doesn't appear to by any progress to-date - just a "maybe fixed in Nautilus 4". Oh well.

fossfreedom avatar Apr 10 '19 19:04 fossfreedom