Nautilus doesn't copy filenames for paste to other programs anymore

Bug #1843588 reported by Michael Kuster
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Nautilus
Fix Released
Unknown
nautilus (Ubuntu)
Fix Released
Low
Dariusz Gadomski
Focal
Fix Released
Medium
Dariusz Gadomski

Bug Description

[Impact]

 * One of the upstream changes changed behavior of clipboard copying files/directories from nautilus to applications accepting text only (e.g. gnome-terminal). In such case the pasted input is prefixed with:
x-special/nautilus-clipboard
copy file://

This was not the case in earlier releases and this change has been reverted in later upstream releases.

Reverting the problematic commit will fix the usecase reported in this bug (and all applications where copying from Nautilus and pasting the data into a text-based input makes sense), but will break copying to/from Desktop Icons extension.

I recommend reporting the Desktop Icons extension issue (present already in every later Ubuntu release) in a separate bug and track the fix there.

[Test Plan]

 1. Open nautilus.
 2. Right-click on any file or directory and select 'Copy' from the context menu.
 3. Open gnome-terminal and right-click paste the contents of the clipboard.

Expected result: path of the file/directory is pasted in the terminal.
Actual result: pasted input is prefixed with "x-special/nautilus-clipboard
copy file://"

[Where problems could occur]

 * There are some workarounds listed in the upstream bug so fixing the root cause may break environments with those workarounds in place.
 * Reverting this change also limits functionality of the desktop icons extension shipped with Ubuntu. Namely: before the new clipboard API is used in desktop-icons (merge requests [1] and [2]) copying and pasting to/from the desktop extension to a nautilus will not be possible via keyboard shortcuts or context menu (dragging and dropping will remain to work).

[1] https://gitlab.gnome.org/World/ShellExtensions/desktop-icons/-/merge_requests/186
[2] https://gitlab.gnome.org/World/ShellExtensions/desktop-icons/-/merge_requests/195

[Other Info]

Original bug description:

Until Ubuntu 18.10 Nautilus does copy all selected filenames in simple Text format and this way you cold paste the selected files as a list to other programs: for example into the texteditor gedit. This was a very useful function if you have, for example, to upload a file to webmail or other web-service. You cold copy the file within nautilus and paste it directliy to the selection dialog or webfield to upload the file.

Or if you wanted a simple List of all your files in a folder you where able to select all files with nautilus, copy and paste into gedit. This is not possible anymore. The output of natilus looks now like this:

x-special/nautilus-clipboard
copy
file:///home/<user>/Schreibtisch/new%20document.txt

Until Ubuntu 18.10 this looks like this:

/home/<user>/Schreibtisch/new document.txt

Steps to reproduce:
1. Select files with nautilus
2. Press Ctrl+C
3. open gedit
4. press Ctrl+V

ProblemType: Bug
DistroRelease: Ubuntu 19.04
Package: nautilus 1:3.32.1-0ubuntu0.19.04.0
ProcVersionSignature: Ubuntu 5.0.0-27.28-generic 5.0.21
Uname: Linux 5.0.0-27-generic x86_64
ApportVersion: 2.20.10-0ubuntu27.1
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Sep 11 15:06:14 2019
ExecutablePath: /usr/bin/nautilus
SourcePackage: nautilus
UpgradeStatus: No upgrade log present (probably fresh install)
usr_lib_nautilus:

Revision history for this message
Michael Kuster (user240) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, that's known upstream and discussed there
https://gitlab.gnome.org/GNOME/nautilus/issues/634

Changed in nautilus (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Changed in nautilus:
status: Unknown → New
Changed in nautilus (Ubuntu):
assignee: nobody → Dariusz Gadomski (dgadomski)
status: Triaged → Fix Released
Changed in nautilus (Ubuntu Focal):
assignee: nobody → Dariusz Gadomski (dgadomski)
description: updated
tags: added: sts sts-sponsor-dgadomski
Revision history for this message
Dariusz Gadomski (dgadomski) wrote :

I have prepared and uploaded patch for focal for this issue which is a backport of upstream commit https://gitlab.gnome.org/GNOME/nautilus/-/commit/2045f662f26891f5bb8c7ab0a7763227fe5fdf78

Revision history for this message
Robie Basak (racb) wrote :

According to the upstream bug, the change was necessary to work correctly with the desktop shell extension. Won't reverting the change risk integration issues with extensions, including the ones we ship by default? Shouldn't this be detailed in "Where problems could occur", and mitigation integrated into the Test Plan?

Changed in gnome-shell (Ubuntu Focal):
assignee: nobody → Dariusz Gadomski (dgadomski)
Changed in gnome-shell (Ubuntu):
status: New → Fix Released
Changed in gnome-shell (Ubuntu Focal):
importance: Undecided → Medium
Changed in nautilus (Ubuntu Focal):
importance: Undecided → Medium
Changed in gnome-shell (Ubuntu):
importance: Undecided → Medium
Changed in gnome-shell-extension-desktop-icons (Ubuntu Focal):
importance: Undecided → Medium
assignee: nobody → Dariusz Gadomski (dgadomski)
description: updated
Revision history for this message
Dariusz Gadomski (dgadomski) wrote :

Thanks Robie. I'll add more details to the description.

Revision history for this message
Dariusz Gadomski (dgadomski) wrote :

I have reported another bug addressing the desktop-icons extension aspect of this issue:

https://bugs.launchpad.net/ubuntu/+source/gnome-shell-extension-desktop-icons/+bug/1948008

tags: added: focal
removed: disco
Revision history for this message
Robie Basak (racb) wrote :

Thanks Dariusz.

Are you intending to fix gnome-shell-extension-desktop-icons in Focal also then, to restore the behaviour? If so, then shouldn't these be uploaded together with a Breaks clause to make sure users get both at the same time?

Revision history for this message
Steve Langasek (vorlon) wrote : Please test proposed package

Hello Michael, or anyone else affected,

Accepted nautilus into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/nautilus/1:3.36.3-0ubuntu1.20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in nautilus (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gnome-shell (Ubuntu Focal):
status: New → Confirmed
Changed in gnome-shell-extension-desktop-icons (Ubuntu Focal):
status: New → Confirmed
Changed in gnome-shell-extension-desktop-icons (Ubuntu):
status: New → Confirmed
Mathew Hodson (mhodson)
Changed in gnome-shell-extension-desktop-icons (Ubuntu):
importance: Undecided → Low
Revision history for this message
Michael Kuster (user240) wrote :

i installed the following package:

https://launchpad.net/ubuntu/+source/nautilus/1:3.36.3-0ubuntu1.20.04.1/+build/22328302/+files/nautilus_3.36.3-0ubuntu1.20.04.1_amd64.deb

with nautilus all works fine. well done.

but copying desktop items is still the same. looks like the gnome-shell-extension is not part of this package.

there was no file change under this path:
/usr/share/gnome-shell/extensions/desktop-icons@csoriano

where can i find the package for updating the gnome-shell-extension?

Revision history for this message
Dariusz Gadomski (dgadomski) wrote :

thanks for testing it Michael.

Regarding desktop-icons: afaik there's still no fix for it.

no longer affects: gnome-shell (Ubuntu)
no longer affects: gnome-shell-extension-desktop-icons (Ubuntu)
no longer affects: gnome-shell (Ubuntu Focal)
no longer affects: gnome-shell-extension-desktop-icons (Ubuntu Focal)
tags: added: verification-done verification-done-focal
removed: verification-needed verification-needed-focal
Revision history for this message
Dariusz Gadomski (dgadomski) wrote :

Marking as verified as per Michael's comment #12.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nautilus - 1:3.36.3-0ubuntu1.20.04.1

---------------
nautilus (1:3.36.3-0ubuntu1.20.04.1) focal; urgency=medium

  * d/p/lp1843588-Revert-clipboard-Use-text-based-clipboard-only.patch:
    - restore copying filenames functionality (LP: #1843588)

 -- Dariusz Gadomski <email address hidden> Tue, 19 Oct 2021 17:02:02 +0200

Changed in nautilus (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for nautilus has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
I-Cat (i-cat) wrote :

Just Got the Update now

Changed in nautilus:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.