Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1751646

Summary: Images to clipboard don't work when text is already present, clipboard doesn't contain any data
Product: [Fedora] Fedora Reporter: David Jaša <djasa>
Component: mutterAssignee: Florian Müllner <fmuellner>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: 7d28c752, andrew, awilliam, bepvte+bugzilla, cosimo.cecchi, fmuellner, fzatlouk, gmarr, gnome-sig, jadahl, jonha87, kparal, mcatanzaro+wrong-account-do-not-cc, mclasen, otaylor, pasik, philip.wyett, robatino, robin.a.meade, sven, taaem, tiagomatos, walters
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: RejectedBlocker AcceptedFreezeException
Fixed In Version: mutter-3.34.1-3.fc31 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-10-14 15:10:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1644940    

Description David Jaša 2019-09-12 10:16:57 UTC
Description of problem:
screenshots to clipboard don't work, clipboard doesn't contain any data. Screenshot

Version-Release number of selected component (if applicable):
gnome-shell-3.34.0-1.fc31.x86_64

How reproducible:
always

Steps to Reproduce:
1. take a screenshot to clipboard using gnome-shell (by default, e.g. Shitft+PrScr)
2. try to paste clipboard to image-receiving data (e.g. in Gimp, Ctrl+Shift+V: new file from clipboard data)
3.

Actual results:
clipboard contains no image data

Expected results:


Additional info:

Comment 1 bepvte+bugzilla 2019-09-12 17:01:07 UTC
https://gitlab.gnome.org/GNOME/gnome-screenshot/issues/48 Upstream issue
Component should be changed to gnome-screenshot

Comment 2 David Jaša 2019-09-13 09:41:23 UTC
(In reply to bepvte+bugzilla from comment #1)
> https://gitlab.gnome.org/GNOME/gnome-screenshot/issues/48 Upstream issue
> Component should be changed to gnome-screenshot

Thanks, changing it accordingly.

Comment 3 bepvte+bugzilla 2019-09-22 21:19:57 UTC
I think this bug might actually be the fault of mutter and not gnome-screenshot: https://gitlab.gnome.org/GNOME/mutter/issues/789
An useful workaround for now is to run "echo -n | xclip -selection clipboard" to clear clipboard of text before taking a screenshot

Comment 4 Fedora Blocker Bugs Application 2019-09-27 12:51:23 UTC
Proposed as a Blocker for 31-final by Fedora user bepvte using the blocker tracking app because:

 I believe that this bug violates "Default panel functionality - All elements of the default panel (or equivalent) configuration in all release-blocking desktops must function correctly in typical use."
The default clipboard screenshot functionality in GNOME, and even copying images from any web browser or other application, are broken most of the time.
I also request the component be changed to mutter, and the title changed, since this bug affects all clipboard operations involving images.

Comment 5 Michael Catanzaro 2019-09-28 01:19:50 UTC
-1 blocker, this works fine if using the gnome-screenshot application and normal PrtScn and Alt+PrtScn also both work fine. The problem seems to only occur when using command-line tool or when using the Shift+PrtScn shortcut, which seems obscure.

Comment 6 Jonathan Haas 2019-09-28 08:43:15 UTC
Michael, the problem is worse that some "obscure" screenshot hotkey not working. (I also doubt it's really that obscure, I use it quite often)

As Comment 4 says, copying images to clipboard from other Wayland apps is broken, too. For example try to copy an image in eog or epiphany and paste it into Gimp. That doesn't seem to work at all for me.

Comment 7 Michael Catanzaro 2019-09-28 13:54:57 UTC
Well that has nothing to do with gnome-screenshot or screenshots, that's a problem with mutter's new clipboard manager then.

Comment 8 Michael Catanzaro 2019-09-28 15:50:28 UTC
BTW I agree and retract my -1

Comment 9 Geoffrey Marr 2019-10-01 00:20:40 UTC
Discussed during the 2019-09-30 blocker review meeting: [0]

The decision to classify this bug as a "RejectedBlocker" and an "AcceptedFreezeException" was made as it doesn't clearly violate an existing criterion and we don't think it's serious enough to consider writing a new one. Accepted as an FE as it will affect Live images and so cannot be fully fixed with an update.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2019-09-30/f31-blocker-review.2019-09-30-16.00.txt

Comment 10 Fedora Update System 2019-10-12 16:31:26 UTC
FEDORA-2019-af6c89afe8 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-af6c89afe8

Comment 11 Fedora Update System 2019-10-13 00:56:45 UTC
gnome-shell-3.34.1-2.fc31, mutter-3.34.1-2.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-af6c89afe8

Comment 12 Fedora Update System 2019-10-13 16:23:33 UTC
FEDORA-2019-af6c89afe8 has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-af6c89afe8

Comment 13 František Zatloukal 2019-10-13 17:16:02 UTC
Hmm, it seems I am not able to paste image from clipboard at all (even if I didn't have any text in clipboard before trying that) on neither of these:
gnome-shell-3.34.1-2.fc31.x86_64, gnome-shell-3.34.1-1.fc31.x86_64
mutter-3.34.1-3.fc31.x86_64, mutter-3.34.1-2.fc31.x86_64, mutter-3.34.1-1.fc31.x86_64

When I try to paste that into gmail new mail window (which I am not sure worked on Linux, but it does on Windows :) ), I get this instead of an image:
x-special/nautilus-clipboard
copy
file:///home/user/some_file_i_just_copied_to_clipboard.png

I can test gnome-shell/mutter in some build with 3.34.0 tomorrow.

Comment 14 Jonathan Haas 2019-10-13 17:53:12 UTC
František, files from nautilus are just copied as text (and unfortunately in that weird format, see https://gitlab.gnome.org/GNOME/nautilus/issues/634 ). To reproduce this issue copy a image from your browser or copy a selection inside Gimp or right click on an image in eog and select "Copy".

Comment 15 František Zatloukal 2019-10-13 18:18:03 UTC
Thanks Jonathan, I didn't know that.

In that case, I can confirm fix in gnome-shell-3.34.1-2.fc31.x86_64, mutter-3.34.1-3.fc31.x86_64 . I've tested copying some image from browser (both Firefox(Wayland)/Chrome(XWayland) worked). However, taking screenshot to clipboard seems to be broken:

$ gnome-screenshot --clipboard 

(gnome-screenshot:9858): Gdk-WARNING **: 20:12:45.439: Error writing selection data: Error writing to file descriptor: Broken pipe

When using Shift+PrScr (which should save screenshot to clipboard), it ends up saving it as a file. I'll create separate issue for that if there isn't any.

Comment 16 Adam Williamson 2019-10-13 18:21:19 UTC
Frantisek, can you check if that's a regression from what's in stable? Thanks!

Comment 17 Fedora Update System 2019-10-13 18:35:31 UTC
gnome-shell-3.34.1-2.fc31, mutter-3.34.1-3.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-af6c89afe8

Comment 18 František Zatloukal 2019-10-13 18:38:57 UTC
(In reply to Adam Williamson from comment #16)
> Frantisek, can you check if that's a regression from what's in stable?
> Thanks!

It's broken in gnome-shell/mutter-3.34.1-1 too .

Comment 19 Fedora Update System 2019-10-14 15:10:46 UTC
gnome-shell-3.34.1-2.fc31, mutter-3.34.1-3.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.

Comment 20 taaem 2019-10-20 14:20:16 UTC
The last mutter update broke copy and paste completly for me on Wayland, I suppose this change is the reason.
I can copy and paste from Xorg -> Xorg, but I can't copy or paste in any Wayland application, which means every Gtk app.

Comment 21 Adam Williamson 2019-10-29 01:22:05 UTC
Clearing CommonBugs as we fixed this ahead of Final.

Comment 22 Jonathan Haas 2019-10-29 05:26:10 UTC
This isn't really completely fixed, the screenshot portion is broken again, see referenced gitlab bug. I think that deserves a commonbugs entry.

Comment 23 Michael Catanzaro 2019-10-29 13:49:27 UTC
As mentioned in https://gitlab.gnome.org/GNOME/mutter/issues/789#note_631911, that's a gnome-settings-daemon bug specific to the screenshot code, not an issue in mutter. We could split it out into a new bug report.

Comment 24 Jonathan Haas 2019-10-29 14:08:26 UTC
> We could split it out into a new bug report.

I've created bug 1766616

Comment 25 rugk 2019-12-07 16:39:19 UTC
https://gitlab.gnome.org/GNOME/mutter/issues/789#note_642646 does mention a workaround for GNOME 3.34 has been developed:
> For 3.34, this has been worked around by making gsd-media-keys use the x11 clipboard instead.

When will this be released in Fedora? This bug is really annoying…

Comment 26 Michael Catanzaro 2019-12-07 17:47:10 UTC
(In reply to rugk from comment #25)
> When will this be released in Fedora? This bug is really annoying…

Since it's a separate bug, please don't discuss it here. Please use bug #1766616.