Bug 470131 - From Spectacle, Libreoffice, Firefox, ... copied image has replace-mimetype, broken
Summary: From Spectacle, Libreoffice, Firefox, ... copied image has replace-mimetype, ...
Status: REPORTED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard (show other bugs)
Version: 5.27.5
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-22 15:56 UTC by Henning
Modified: 2023-05-25 15:25 UTC (History)
3 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 Henning 2023-05-22 15:56:23 UTC
SUMMARY
I had a Spectacle image bug that is not due to spectacle but the clipboard it seems.


STEPS TO REPRODUCE
1. Take a screenshot, copy it to clipboard
2. paste it to dolphin
3. try again but set mimetype as "png"

OBSERVED RESULT
The mimetype of the spectacle images is "application/x-kde-onlyReplaceEmpty" and no matter if I just name a screenshot "test" or "test.png" it is not saved. If I manually switch the mimetype over to "PNG" then it is saved.

So the solution is just to make it default to PNG as a workaround, listen to users defaults in the end.

--- Software ---
OS: Fedora Linux 38.20230511.0 (Kinoite)
KDE Plasma: 5.27.4
KDE Frameworks: 5.105.0
Qt: 5.15.9
Kernel: 6.2.14-300.fc38.x86_64
Compositor: wayland
Comment 1 Nate Graham 2023-05-23 18:00:49 UTC
Hmm, I'm not sure I 100% understand what you're doing, and I tried to replicate what I *think* you're doing in an X11 Plasma 6 session, and didn't encounter any problem.

Any chance you could take a screen recording or even a phone video that shows the issue happening? Thanks!
Comment 2 Henning 2023-05-23 22:19:31 UTC
What I am doing:

1. Get an image somewhere. It actually doesnt matter. Examples: taking a spectacle screenshot (set to autocopy to clipboard), copy an image from libreoffice flatpak, copy an image from firefox.

2. Try to paste the image to dolphin.

The image has this named mimetype, which breaks it. Even naming it ".png" doesnt help, its broken completely.

I can make a video but I dont think this is nessecary
Comment 3 Henning 2023-05-23 22:34:16 UTC
https://cloud.uol.de/s/ojt6eTLL4DdxeT2
Comment 4 Nate Graham 2023-05-24 15:15:09 UTC
Thanks for the screen recording. I cannot reproduce the issue with text copied in any app I try.

Are you using any non-default Clipboard settings? Can you attach your ~/.config/klipperrc file?
Comment 5 David Edmundson 2023-05-24 15:38:28 UTC
Klipper is definitely  involved, that's where  application/x-kde-onlyReplaceEmpty comes from

It's not inherently wrong to set that. What's weird is dolphin apparently choosing to take data from a mimetype it doesn't understand when there's multiple available that it does.
Comment 6 Henning 2023-05-24 18:59:36 UTC
Interesting, I had klipper interact in a different area, where Libreoffice crashed cutting images.

I will report this bug to Fedora bugzilla.