flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

Copy to clipboard doesn't work for me running X11 Ubuntu 22.04

Open baalimago opened this issue 3 years ago • 15 comments

Flameshot Version

Flameshot v12.1.0 Compiled with Qt 5.15.3

Installation Type

Using the ready-made package from Github Releases

Operating System type and version

Ubuntu 22.04

Description

The image simply isn't copied to the clipboard.

Steps to reproduce

  1. run flameshot gui
  2. take some screenshot
  3. press ctrl-c, doubleclick or the "copy to clipboard" button
  4. press ctrl-v somewhere where it used to work (such as teams or gitlab) to note that it doesn't. Alternatively, download something like GPaste and note how no entries are made.

The picture is taken (as seen by attached image, which I took with this version of flameshot and embedded via image which stores on file), and it says copied to clipboard: 2022-08-04_14-54_1

flameshot gui returns this in log:

─[$] <> flameshot gui      
qt.svg: Invalid path data; path truncated.
qt.svg: Invalid path data; path truncated.

But it seems to appear before I'm attempting to save image to clipboard.

Screenshots or screen recordings

No response

System Information

System: Host: _ Kernel: 5.15.0-43-generic x86_64 bits: 64 Desktop: GNOME 42.2 Distro: Ubuntu 22.04.1 LTS (Jammy Jellyfish) Graphics: Device-1: Intel CometLake-U GT2 [UHD Graphics] driver: i915 v: kernel Device-2: Luxvisions Innotech HP HD Camera type: USB driver: uvcvideo Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: modesetting unloaded: fbdev,vesa gpu: evdi,i915 resolution: 1: 1440x2560-60Hz 2: 2560x1440-60Hz 3: 1920x1080-60Hz OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 22.0.5

baalimago avatar Aug 04 '22 12:08 baalimago

I tried flameshot screen -n 1 -c, also didn't fill the clipboard.

baalimago avatar Aug 04 '22 13:08 baalimago

do you have xdg-desktop-portal-gnome installed?

mmahmoudian avatar Aug 04 '22 15:08 mmahmoudian

Yes

baalimago avatar Aug 05 '22 05:08 baalimago

Sorry, my bad, I though you are on Wayland.

Anyways, thanks for the answer. I'll try to reproduce this in a clean-install VM of Ubuntu 22.04 .

mmahmoudian avatar Aug 05 '22 06:08 mmahmoudian

I cannot reproduce this in Wayland nor in X11:

image

image

What I did:

  1. create a new VM
  2. installed Ubuntu22.04 with everything as default
  3. sudo apt update; sudo apt update --yes; sudo apt install vim
  4. These are the bash history 4.1. download the deb file from github 4.2. sudo dpkg -i <the deb file> (which gives the unmet dependencies) 4.3. unmet dependencies 4.4. try the dpkg -i again which successfully installed Flameshot image

My guess is that the issue is with your setup somehow. It would be a great help if you can try to reproduce the issue you are facing in a VM.

mmahmoudian avatar Aug 05 '22 10:08 mmahmoudian

Thank you for your efforts @mmahmoudian. I also think that it's something to do with my system. I'll see if I can find time to debug it further and give more info.

baalimago avatar Aug 05 '22 12:08 baalimago

Hi guys, I had the same problem on windows until I uncheked the 'use JPG format for clipboard' under the 'General' tab. image

PooyaJln avatar Aug 09 '22 17:08 PooyaJln

Hi guys, I had the same problem on windows until I uncheked the 'use JPG format for clipboard' under the 'General' tab. image

Thanks, it worked for me. I use Ubuntu 22.04. With that option "Use JPG format" I couldn't paste in discord.

Alex-Space avatar Aug 09 '22 20:08 Alex-Space

Yeah having the same issue. I can't get the image to copy to the Clipboard on Ubuntu 22.04. Ctrl+C is setup as the shortcut, but it is no longer working. Was working on 21.10.

james-deee avatar Aug 10 '22 17:08 james-deee

I also went from ubuntu 21.10 ->22.04. I can't say why, but my gutfeeling says it might have something to do with xclip. I might be way off though.

I reinstalled 22.04 from scratch though so now it works for me.

baalimago avatar Aug 23 '22 05:08 baalimago

I had the same problem today, but the issue was not specific to flameshot. It also happened for the default ubuntu screenshot app. In my case I believe the problem for me was the GSConnect Gnome extension, which I reinstalled and now the clipboard is working fine again. Maybe when I reboot it will hijack the clipboard again - haven't tried it yet.

pmishev avatar Aug 30 '22 08:08 pmishev

Hi guys, I had the same problem on windows until I uncheked the 'Use JPG format for clipboard' under the 'General' tab. image

Magic: i had the same problem, then i saw this reply from @PooyaJln and

  1. enabled Use JPG format for clipboard --> worked for me.
  2. then i turned it off --> still works!

(i use X11 and Snap installation flameshot v12.1.0+git4.33f48f4a 183 latest/stable borgman-jeremy)

So seems like turning on and off the Use JPG format for clipboard fixes the copy to clipboard issue....

I had the same issue, for me the problem was with using the snap version. Installing the .deb package (same version) and copy to clipboard works just fine!

ghosty141 avatar Sep 11 '22 16:09 ghosty141

flathub works, too

gerhardbeck avatar Sep 13 '22 17:09 gerhardbeck

I can confirm that trying to install the latest v12.1.0 on ubuntu 22.04 does NOT work, and does not copy to clipboard.

I have downgraded to v11.0.0 through apt, and can confirm that I can now get back to copying to clipboard.

james-deee avatar Sep 15 '22 17:09 james-deee

I can confirm that pasting from clibboard does not work for v12.1.0 on Ubunty 22.04 when installing via snap.

With or without ticking the option "Use JPG format for clipboard".

Installing from deb package fixes it, though.

When not working:

$ flameshot --version
Flameshot v12.1.0 ()
Compiled with Qt 5.15.3

$ uname -a
Linux y700 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.1 LTS
Release:	22.04
Codename:	jammy

When working:

$ flameshot --version
Flameshot v12.1.0 (Debian 12.1.0-1)
Compiled with Qt 5.15.4

yrdeboer avatar Oct 20 '22 15:10 yrdeboer

@yrdeboer & @james-deee I cannot reproduce this. I created a clean VM with Ubuntu 22.04 and installed Flameshot from snap and everything works just fine:

Peek 2022-10-21 14-39.webm

mmahmoudian avatar Oct 21 '22 11:10 mmahmoudian

> Old issue

There was a similar thread going a couple of years ago. I had the same problem reappear and was able to resolve it by checking/unchecking the "Use jpeg format" box, as others mentioned above.

Arch Linux Flameshot v12.1.0 (-) Compiled with Qt 5.15.5 Kernel: 6.0.2-arch1-1 WM: i3 version 4.21

jamesmbull avatar Oct 24 '22 13:10 jamesmbull

> Old issue

There was a similar thread going a couple of years ago. I had the same problem reappear and was able to resolve it by checking/unchecking the "Use jpeg format" box, as others mentioned above.

Arch Linux Flameshot v12.1.0 (-) Compiled with Qt 5.15.5 Kernel: 6.0.2-arch1-1 WM: i3 version 4.21

I tried this, and this does NOT work. At least on my Ubuntu 22.04.

james-deee avatar Oct 24 '22 15:10 james-deee

I have the same problem too, I am using KDE Neon (Ubuntu 22.04) and installed as snap package. clipboards only works if launch as flameshot not as flameshot gui, I noticed that flameshot launcher as the bug too

serhumanos avatar Nov 18 '22 17:11 serhumanos

I had this problem, here is my path:

  • Installed via snap
  • Configured the flameshot to start when I press Print Screen on my keyboard following this: https://askubuntu.com/questions/1036473/how-to-change-screenshot-application-to-flameshot-on-ubuntu-18-04
  • Copy/paste not working
  • Enabled "Use JPG format for clipboard"
  • Didn't work.
  • Disabled "Use JPG format for clipboard"
  • Started working.

System:

$ flameshot --version
Flameshot v12.1.0 ()
Compiled with Qt 5.15.3

$ uname -a
Linux x 5.19.0-32-generic #33~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Jan 30 17:03:34 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Really useful software btw 🥇

alan-albuquerque avatar Mar 02 '23 18:03 alan-albuquerque

I'm having this same issue on KDE Plasma

Flameshot v12.1.0 (a447b3d6) Compiled with Qt 5.15.10

Linux box 6.4.10-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 11 Aug 2023 11:03:36 +0000 x86_64 GNU/Linux

I tried everything I saw here, including JPG on, and then back off, but no luck.

Ketrel avatar Aug 14 '23 22:08 Ketrel

Hi guys, I had the same problem on windows until I uncheked the 'use JPG format for clipboard' under the 'General' tab. image

Thanks! I encountered this issue and solved it by unchecking the 'use JPG format for clipboard` option, too.

Sunbuyu avatar Dec 02 '23 02:12 Sunbuyu

Hi, not sure if the subject is still open. I have Ubuntu 22.04 with flameshot 11.0 and is giving me the same issue. Can't save screenshots to the clipboard.

I found a workaround - I can paste the image into a document, but not directly into the browser (Chrome). Weirdly, if I copy from the doc to the browser, it works fine.

I'm not an expert on permission stuff, but I'm guessing there might be a permission issue with the clipboard screenshot file from the browser.

Just throwing it out there in case it helps.

Thanks!

DavidMonteiroArxi avatar Dec 15 '23 11:12 DavidMonteiroArxi

@DavidMonteiroArxi thanks for reaching out. Here are few points to consider:

  1. The latest Flameshot version is 12.1.0 and if your linux distro doesn't provide it, try installing via Flatpak or Snap: https://flameshot.org/docs/installation/installation-linux/#distro-agnostic
  2. You have not mentioned how you have installed Flameshot
  3. What you wrote implies that you can copy, but cannot paste in chrome, so the problem is that the target software doesn't support the image
  4. Have you made sure the solutions others have provided in this thread?
  5. You can inspect what have been copied into clipboard using tools like CopyQ: https://hluk.github.io/CopyQ/

mmahmoudian avatar Dec 18 '23 23:12 mmahmoudian

Here's what I found.

Absolutely none of the format considerations made any difference.

If you have it always running, copy to clipboard works.
If you have it set to ONLY open when invoked, then copy to clipboard does not work. The program seemingly exits before the image is placed on the clipboard.

(This is with 12.1.0)

Ketrel avatar Dec 18 '23 23:12 Ketrel

@Ketrel would you please provide your system information such as (OS, DE, installation method), and also how you are invoking Flameshot. Also if you are on Gnome, do you have systray area or not.

mmahmoudian avatar Dec 19 '23 00:12 mmahmoudian

@Ketrel would you please provide your system information such as (OS, DE, installation method), and also how you are invoking Flameshot. Also if you are on Gnome, do you have systray area or not.

Arch, KDE/Plasma, package manager, have it running in the systray, and activate it with a keyboard shortcut via KDE which calls it.

This works.

If I do NOT have it running in the systray, everything works the same, but nothing is copied to the clipboard.

EDIT: Shortcut calls it with flameshot gui
EDIT2: I've also tried compiling it myself outside the package manager. Same results either way.

Ketrel avatar Dec 19 '23 00:12 Ketrel