flameshot
flameshot copied to clipboard
Flameshot isn't copying to clipboard
Flameshot version 0.10.1
Describe the bug
After selecting an area, ctrl+c or clicking the copy icon. Flameshot is telling me that something is being copied to clipboard but running xclip -sel clip -o -t image/png
shows that nothinb was added to the clipboard.
EDIT: seems like disabling useJpgForClipboard
fixes the issue, which is quite strange. Is that option bugged?
Expected behavior Should copy to clipboard.
System Information Arch w/ kernel 5.13.12-arch1-1 Running KDE
@metruzanca Perhaps the issue was that you were using -t image/png
while the output was in jpg format? Note that for jpg
you have to use -t image/jpeg
.
@veracioux Ah, yeah thats a dumb missight on my part.
Also the actual reason I made this issue (which probably should have been mentioned, sorry) was that for some reason screenshots copied to clipboard with useJpgForClipboard
weren't pastable in other apps e.g. signal-desktop or discord for some reason. This isn't an issue with those apps as if I copy this jpeg from my browser it pastes just fine.
I don't know enough about jpegs to even guess why this might be the case. For me useJpgForClipboard
doesn't seem to work as expected.
Either a duplicate of #1738 or very much related to it (similar issue with pasting in Discord). The difference I see is that in this thread because of xclip the user have Xorg but in the other one they have Wayland.
@metruzanca considering you other comment, would you please check if you are on Xorg or Wayland? If you don't know how, please visit here
@mmahmoudian I'm using X version 1.20.13 & plasmashell version 5.22.4
To clarify, my response from earlier -t image/jpeg
does indeed show that content was added to che clipboard, but other apps don't seem to recognize it as valid for pasting images.
It's doesn't work for me too. In particular, in google chrome, Examples pasteboard.co doesn't detect images from the clipboard. vk.com detect like text
Seeing this as well. Can no longer paste screenshots into GH comments direct from Flameshot copy to clipboard. GH and clipboard are fine as I can right click on an image elsewhere and copy and paste. Using X11 / AwesomeWM / Ubuntu 21.04
Either a duplicate of #1738 or very much related to it (similar issue with pasting in Discord). The difference I see is that in this thread because of xclip the user have Xorg but in the other one they have Wayland.
So to this problem.
I actually posted system information with screen shot showing it is X11
I don't know why it is labeled as wayland but whatever.
Like OP said, turning formats to PNG made it work again. (when pasting into apps like discord)
I had to turn it JPG then restart it and then back to PNG, it was originally on PNG and was broke at that point. perhaps some setting writer has changed?
I think this is highly related to #1738 as @Horuyuki pointed out as well
Disclaimer: the following applies to my system, YMMV.
I have done a fair bit of testing and looked at other issues and I have concluded that there is no reason to believe there is a clipboard bug in flameshot. When "Use JPG format for clipboard" is disabled, the clipboard works in basically every app I tested. This is because in that case the image is copied in a bunch of formats. If the option is enabled, the output is in image/jpeg
and it pastes just fine in GIMP. The problem is that other applications do not accept that format.
On my system it is something akin to https://github.com/flameshot-org/flameshot/issues/1738#issuecomment-884778610, although not completely identical. This is probably because we don't have the same MIME formats installed.
@metruzanca
This isn't an issue with those apps as if I copy this jpeg from my browser it pastes just fine.
The fact that the format of the image is jpeg does not mean that your browser copies it to the clipboard in that format. For example on my machine using firefox, it copies it in a bunch of formats. Run xclip -sel clip -o -t TARGETS
to check.
My system: Arch Linux w/ kernel 5.13.12-arch1-1 i3wm (X11)
It's doesn't work for me too. In particular, in google chrome, Examples pasteboard.co doesn't detect images from the clipboard. vk.com detect like text
Is that with useJpgForClipboard
enabled or disabled?
@veracioux
The fact that the format of the image is jpeg does not mean that your browser copies it to the clipboard in that format. For example on my machine using firefox, it copies it in a bunch of formats. Run xclip -sel clip -o -t TARGETS to check.
I went ahead and tried this on my machine too and I can confirm this works for me as well.
Interesting, I was not aware that the clipboard worked like this. (infact, now I'm pretty sure the clipboard works nothing like I expected)
The X11 clipboard can be a peculiar beast. Flameshot has been working fine for me for some time, but I'd struggled to make it function initially and suddenly those issues re-appeared this week. When I found this thread I thought it was describing exactly what I was experiencing, but unfortunately I didn't have Use JPG enabled and enabling it and disabling it didn't change anything. However, the xclip command @veracioux provided above along with the link to #1738 provided some insight - I was not seeing any image data in the clipboard at all after a clip.
At this point I glanced over at copyq and saw the test images I'd been gathering had clearly been making it to the clipboard, and then I found the culprit - there was a text entry in the clipboard which refused to leave - ironically, the command from the page linked above to confirm whether you're using X11 or Wayland. I thought I had nailed it, as the text was still selected on the webpage and because of how the X11 clipboard works I figured that was the cause, but after clearing that selection the behavior didn't improve. So I started closing windows until copyq could successfully move an image to the clipboard, and it wasn't until I'd closed all my terminals that things started working.
Unfortunately, having pinned down the issue in this case, I've not been able to reproduce the issue. Grabbing that same text and pasting it into a terminal again does not get stuck as it did the last time around. Hopefully this is helpful to others trying to pin down this issue.
Arch Linux with kernel 5.13.13-arch1-1 AwesomeWM on X11 CopyQ 4.1.0 Flameshot 0.10.1 Firefox 91.0.2 Terminology 1.9.0
@Optimoos would you please also specify how you have installed Flameshot and also right-click on the tray icon of Flameshot, click on About and then the copy button and the bottom of the window and paste the content here (I'm interested in the git hash that is in the version number as in rolling release distros v0.10.1 can mean anything from any commit after that tag in git).
Also thank you for investigating this throughly and writing the process here. Highly appreciated 👍🏼
Using the package in the community repository - https://archlinux.org/packages/?name=flameshot
Currently have 0.10.1-1 installed.
There doesn't appear to be a git hash on the about screen:
@Optimoos cool, because if you installed through AUR it would have the git hash in the parentheses instead of (-)
.
I got same issue (Windows 10, latest flameshot...)
This issue started recently on my system as well:
NAME="Pop!_OS"
VERSION="20.04 LTS"
ID=pop
ID_LIKE="ubuntu debian"
PRETTY_NAME="Pop!_OS 20.04 LTS"
VERSION_ID="20.04"
I was using the latest deb package, 0.3.x, which did not have the option to choose format. I upgraded to the 0.10 flatpak (which causes other problems not finding flameshot
in the CLI), and switched the format back and forth between jpg and png, with no resolution.
EDIT: To clarify, I can copy a screenshot selection and paste it into Slack, but not into Google Chrome.
I believe this is related to #1864
@alexfornuto how about Firefox? Does it work in Firefox?
I just tested, and yes it works in FF. I'll follow that thread for resolution, thanks.
Can confirm at the times when broke it does continue to work in Firefox. Random guess, chrome has become more picky about clipboard contents. Maybe slack electron is based on an earlier chromium, I dont expect electron to be on anything close to latest.
https://bugs.chromium.org/p/chromium/issues/detail?id=1247919&q=clipboard&can=2
It's hard to say if this is indeed a shortterm reliable workaround but as the developers are talking about Ozone here, I ensured screenshots into Chrome from flameshot were broke, opened chrome://flags search ozone, disabled ozone, fully closed and restart chrome (careful if you have chrome to run in background - default setting iirc) and now flameshot is working fine (no restart of flameshot). ymmv
@mattbdc interesting. Thanks for digging into this. This an alarming change in Chrome imho!
So if I am following all this, its an upstream chromium issue?
I think it's best to wait until others confirm that disabling ozone works
Disabling Ozone fixed the issue for me on Pop_OS and Google Chrome 93.0.4577.63.
It's hard to say if this is indeed a shortterm reliable workaround but as the developers are talking about Ozone here, I ensured screenshots into Chrome from flameshot were broke, opened chrome://flags search ozone, disabled ozone, fully closed and restart chrome (careful if you have chrome to run in background - default setting iirc) and now flameshot is working fine (no restart of flameshot). ymmv
Hmm, but since 95 version ozone cannot be disabled, any ideas?
It's hard to say if this is indeed a shortterm reliable workaround but as the developers are talking about Ozone here, I ensured screenshots into Chrome from flameshot were broke, opened chrome://flags search ozone, disabled ozone, fully closed and restart chrome (careful if you have chrome to run in background - default setting iirc) and now flameshot is working fine (no restart of flameshot). ymmv
Hmm, but since 95 version ozone cannot be disabled, any ideas?
quick fix (i3wm): bindsym Print exec --no-startup-id flameshot gui -r | xclip -selection clipboard -t image/png