Copied files: x-special/gnome-copied-files data ends with \r\n, pasting into Nautilus silently fails

Issue Description

Analysis: xfdesktop appends a trailing `\r\n` to the `x-special/gnome-copied-files` target:

xclip -selection clipboard -t x-special/gnome-copied-files -o | od -c | tail -2

0000140 5 6 - 5 3 . p n g \r \n

Thunar and Nautilus both write the same target with no trailing line ending:

0000140 5 6 - 4 9 . p n g

Nautilus reads only `x-special/gnome-copied-files` (not `text/uri-list`) and splits it on `\n`, so the last URI keeps a trailing `\r`, does not resolve, and the paste is dropped.

Confirmation: Placing the same content without the trailing `\r\n` on the clipboard makes the paste work:

printf 'copy\nfile:///home/<user>/Desktop/file.png' | xclip -selection clipboard -t x-special/gnome-copied-files

Suggested fix: Format `x-special/gnome-copied-files` the way Thunar does: `copy` or `cut`, then the URIs separated by `\n`, with no trailing line ending. `\r\n` is correct for `text/uri-list` but should not be used for this target.

Steps to Reproduce Issue

1. Select a file on the desktop and press Ctrl+C.

2. Open Nautilus in another folder and press Ctrl+V.

Expected Behavior

Expected: The file is pasted.

Actual: Nothing happens, no error.

Additional Information

I have not tested xfdesktop 4.20 yet.

Environment & Versions

  • OS distribution and version: Xubuntu 24.04.5 LTS
  • Overall Xfce version: 4.18
  • xfdesktop version (git hash if not a release): 4.18.1
  • thunar version (if issue related to file/launcher icons): 4.18.8
  • Windowing system (X11/Wayland): X11
  • Compositor and version (if Wayland): N/A (X11, picom v13)
  • GTK Theme: WhiteSur
  • Icon Theme: WhiteSur
  • UI Scale Factor: 1
  • Nautilus version (paste target): 46.4
Edited by memecikoliveoil