Copying selection to clipboard is not working (neither Ctrl+C hotkey nor the button)
Flameshot Version
Output of flameshot -v:
Flameshot v12.1.0 (-) Compiled with Qt 5.15.5
Also tried cloning from git and manually compiling, had the same issue
Installation Type
Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...), User repository (AUR), Flatpak from Flathub, Compiled from source
Operating System type and version
Arch Linux 6.0.8-arch1-1
Description
Selecting a screenshot in flameshot gui and then pressing Ctrl+C to copy the selection to keyboard doesnt work. Pressing Ctrl+C just exits flameshot. The same thing happens when clicking the button in the interface to copy to clipboard.
I tried installing flameshot as a flatpak and there it worked properly if I ran flameshot as a daemon, but running flameshot gui had the same behaviour, copying didn't work.
Steps to reproduce
- run
flameshot gui - Make selection
- Copy the selection to clipboard, either by pressing Ctrl+C or by clicking the button on screen
- Nothing happens
Screenshots or screen recordings
No response
System Information
- Arch Linux, 6.0.8-arch1-1
- Output of xrandr:
eDP-1 connected primary (normal left inverted right x axis y axis)
1920x1080 60.01 + 60.01 59.97 59.96 59.93
1680x1050 60.01 59.95 59.88
1400x1050 59.98
1600x900 59.99 59.94 59.95 59.82
1280x1024 60.01 60.02
1440x900 60.01
1400x900 59.96 59.88
1280x960 60.00
1440x810 60.00 59.97
1368x768 59.88 59.85
1280x800 59.99 60.01 59.97 59.81 59.91
1280x720 60.00 60.01 59.99 59.86 59.74
1024x768 60.01 60.04 60.00
960x720 60.00
928x696 60.05
896x672 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
960x540 59.96 59.99 59.63 59.82
800x600 60.01 60.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
700x525 59.98
800x450 59.95 59.82
640x512 60.02
700x450 59.96 59.88
640x480 60.01 60.00 59.94
720x405 59.51 58.99
684x384 59.88 59.85
640x400 59.88 59.98
640x360 59.86 59.83 59.84 59.32
512x384 60.00
512x288 60.00 59.92
480x270 59.63 59.82
400x300 60.32 56.34
432x243 59.92 59.57
320x240 60.05
360x202 59.51 59.13
320x180 59.84 59.32
HDMI-1 connected 2496x1404+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
1920x1080 74.99*+ 59.96 72.03 60.02 50.01 48.00 60.00 50.00 59.94 59.93
1680x1050 59.95 59.88
1400x1050 74.76 59.98
1600x900 59.94 59.95 59.82
1280x1024 75.02 60.02
1440x900 59.90
1400x900 59.96 59.88
1280x960 60.00
1440x810 59.97
1368x768 59.88 59.85
1280x800 59.99 59.97 59.81 59.91
1152x864 75.00
1280x720 60.00 59.99 59.86 60.00 50.00 59.94 59.74
1024x768 75.05 60.04 75.03 70.07 60.00
960x720 75.00 60.00
928x696 75.00 60.05
896x672 75.05 60.01
1024x576 59.95 59.96 59.90 59.82
960x600 59.93 60.00
832x624 74.55
960x540 59.96 59.99 59.63 59.82
800x600 75.00 70.00 65.00 60.00 72.19 75.00 60.32 56.25
840x525 60.01 59.88
864x486 59.92 59.57
720x576 50.00
700x525 74.76 59.98
800x450 59.95 59.82
720x480 60.00 59.94
640x512 75.02 60.02
700x450 59.96 59.88
640x480 60.00 72.81 75.00 66.67 60.00 59.94
720x405 59.51 58.99
720x400 70.08
684x384 59.88 59.85
640x400 59.88 59.98
576x432 75.00
640x360 59.86 59.83 59.84 59.32
512x384 75.03 70.07 60.00
512x288 60.00 59.92
416x312 74.66
480x270 59.63 59.82
400x300 72.19 75.12 60.32 56.34
432x243 59.92 59.57
320x240 72.81 75.00 60.05
360x202 59.51 59.13
320x180 59.84 59.32
DP-1 disconnected (normal left inverted right x axis y axis)
- I'm using DWM as a window manager, on Xorg
same problem over ubuntu 18 and flameshot >= 12
@isak102 can it be related to this?
https://github.com/flameshot-org/flameshot/issues/2496#issuecomment-1144308628
@isak102 can it be related to this?
Yes it is related to that, it works properly if flameshot is ran as a daemon first. Judging by that comment this is the intended behaviour so I’ll close this issue
No it is not intended behavior. The daemon should keep running as long as it is needed (for pin or for clipboard). If it does not work it is definitely a bug
@mmahmoudian The daemon keeps running when I start it with flameshot, it doesn’t quit after I use flameshot gui if that was what you meant. I just meant that I need to start the flameshot daemon once before I can start using flameshot gui to copy to clipboard.
The flameshot starts the daemon and if you have started the daemon by running just the flameshot, it should keep running (sitting in the tray area). If you want the daemon to get terminated, you in principal should enable the following option, and then only launch Flameshot with flameshot gui (at the moment it does not work properly all the time, so you might want to kill the process every now and then. We will look into it)

I am facing the same issue, seems to be reported here as well: https://github.com/flameshot-org/flameshot/issues/3107 I am running on ubuntu 22.04
Is there a way to enable verbose logging or something?
I've also started experiencing this on one machine. I can't find the cause for it, but it happens with both official 12.1.0 and git build v12.1.0 (3ededae5).
Same issue. Cannot paste image copied to clipboard
@mauamolat
Cannot paste image copied to clipboard
This issue is about not being able to add it to clipboard. In your case what you are saying is that the screenshot is in your clipboard but cannot be pasted elsewhere. That can be many thing, most of which is irrelevant to Flameshot.
@matejdro
Is there a way to enable verbose logging or something?
No, at the momebt the best user can get is what is provided in terminal
@mauamolat
Cannot paste image copied to clipboard
This issue is about not being able to add it to clipboard. In your case what you are saying is that the screenshot is in your clipboard but cannot be pasted elsewhere. That can be many thing, most of which is irrelevant to Flameshot.
@matejdro
Is there a way to enable verbose logging or something?
No, at the momebt the best user can get is what is provided in terminal
I found the issue. It doesn't work with .jpg as default image file but only with .png
I found the issue in my case: It's the update checking.
I traced the code and I found that daemon freezes upon reaching that line: https://github.com/flameshot-org/flameshot/blob/3ededae5745761d23907d65bbaebb283f6f8e3f2/src/core/flameshotdaemon.cpp#L94. Thus, daemon is never initialized and can never receive screenshots to copy to the clipboard.
Disabling update checking fixes the issue for me.
When running flameshot from terminal in i3wm or other window managers, you may receive this error after trying to copy to system clipboard:
flameshot: info: Capture saved to clipboard.
qt.qpa.clipboard: QXcbClipboard::setMimeData: Cannot set X11 selection owner
Version + Kernel info:
Flameshot v12.1.0 (-)
Compiled with Qt 5.15.5
6.2.10-arch1-1
Ensure dunst or an alternate notification manager/daemon is running if you are using i3wm on your system; recommend cloning the official dunstrc from official dunst repo. A system I was using was not copying flameshot screen captures to the system clipboard, cloned official dunstrc and managed to re-enable clipboard pasting functionality.
I run into the same problem. My advice t othe dev is, just run the messaging in a separate thread/asynchronous, so that in case, the message daemon will not respond/not available, flameshot will not hang for round about 60s.
I ran into a variation on this issue with flameshot v11 and v12 where it'd "save to clipboard" but i could never paste from it, i'd have to open my clipboard manager (clipman on ubuntu 22.04 with xfce4) and click it and then i could control V to paste it, i got tired of having to constantly do so many clicks just to paste a flameshot captured print screen so i wrote a python script and keybound it and it works now to give me flameshot and controlV to paste with no additional clicks or keystroke
note this assumes you also have copyQ installed as a new clipboard manager, should work alongside your current clipboard manager but you could replace it with it no problem too
import subprocess
import os
import tempfile
import time
# Function to get the first image item from CopyQ
def get_first_image_item():
process = subprocess.run(['copyq', 'read', 'image/png', '0'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
if process.stderr:
print("Error reading image item from CopyQ:", process.stderr.decode())
return process.stdout if process.stdout else None
# Function to save the image to a temporary file
def save_image(data):
try:
with tempfile.NamedTemporaryFile(delete=False, suffix='.png') as tmpfile:
tmpfile.write(data)
print("Saved image to:", tmpfile.name)
return tmpfile.name
except Exception as e:
print("Error saving image:", e)
return None
# Get the first image item from CopyQ
image_data = get_first_image_item()
if image_data:
# Save the image to a temporary file
image_path = save_image(image_data)
if image_path:
# Use xclip to load the image into the clipboard
subprocess.run(['xclip', '-selection', 'clipboard', '-t', 'image/png', '-i', image_path])
# Wait a little for xclip to process the image
time.sleep(1)
# Simulate a paste operation. Make sure the focus is on the target window before this step.
subprocess.run(['xdotool', 'key', 'ctrl+v'])
# Clean up the temporary file
os.unlink(image_path)
else:
print("No image data received from CopyQ.")
The
flameshotstarts the daemon and if you have started the daemon by running just theflameshot, it should keep running (sitting in the tray area). If you want the daemon to get terminated, you in principal should enable the following option, and then only launch Flameshot withflameshot gui(at the moment it does not work properly all the time, so you might want to kill the process every now and then. We will look into it)
This (running flameshot in the background) worked for me while other workarounds such as toggling jpg on and off did not. Thx
@mauamolat
Cannot paste image copied to clipboard
This issue is about not being able to add it to clipboard. In your case what you are saying is that the screenshot is in your clipboard but cannot be pasted elsewhere. That can be many thing, most of which is irrelevant to Flameshot. @matejdro
Is there a way to enable verbose logging or something?
No, at the momebt the best user can get is what is provided in terminal
I found the issue. It doesn't work with .jpg as default image file but only with .png
I just made these changes and it works now.
same problem flameshot v12.1.0 linux: 6.14.0-1-MANJARO
@Exript considering that you are on an Arch based distro, try installing the AUR flameshot-git and see if the issue persists.
@Exript considering that you are on an Arch based distro, try installing the AUR
flameshot-gitand see if the issue persists.
Still happening with it. I have tried flameshot, flameshot-git and even flatpak version. It was working fine until few days ago. I suspect it could have been the system update. Also it worked 2-3 times when i installed flatpak version and since then nothing.
Running cachyos with gnome and nvidia
Do you have flameshot running in the background? That's vital and easily missed on a customised linux install such as arch
Do you have flameshot running in the background? That's vital and easily missed on a customised linux install such as arch
In the tray means it's running in the background i guess ? When i run flameshot for the first time it isn't there, but from then onwards it's there. But it doesn't work first, second or any try :/
I have attached Print Screen to this command
script --command "QT_QPA_PLATFORM=wayland flameshot gui" /dev/null
❯ flameshot --version
Flameshot v13.0.1 (f0e46edf)
Compiled with Qt 6.9.1
Edit: I enabled the run flameshot in background on startup setting. Tested after reboot and it's still the same
Hi, I have the same problem nothing happened when I clic on copy.
But I'm on Windows 11. Flameshot v13.1.0 (79395fd3) Compiled with Qt 6.8.1 winnt: 10.0.26100 windows: 11
Here is my settings
Do you have an idea ?
I tried flatpak, arch repo, flameshot-git but none work. Currently on latest
❯ flameshot --version
Flameshot v13.1.0 (02469326)
Compiled with Qt 6.9.1
I found a useful hack in another thread: https://github.com/flameshot-org/flameshot/issues/635#issuecomment-2302675095
I also rebound the "Accept the capture" keybinding to Ctrl + C for a more comfortable experience.
The final command for my PrtSc shortcut is:
sh -c "QT_QPA_PLATFORM=wayland flameshot gui -r | xclip -selection clipboard -t image/png"
I found a useful hack in another thread: #635 (comment) I also rebound the "Accept the capture" keybinding to Ctrl + C for a more comfortable experience. The final command for my PrtSc shortcut is:
sh -c "QT_QPA_PLATFORM=wayland flameshot gui -r | xclip -selection clipboard -t image/png"
Thanks! this works for me, directly opens gui with clipboard default
I found a useful hack in another thread: #635 (comment) I also rebound the "Accept the capture" keybinding to Ctrl + C for a more comfortable experience. The final command for my PrtSc shortcut is:
sh -c "QT_QPA_PLATFORM=wayland flameshot gui -r | xclip -selection clipboard -t image/png"
Got mine working on wayland with wl-clipboard instead of xclip
bash -c "QT_QPA_PLATFORM=xcb flameshot gui -r | wl-copy"
Sometimes it ignores the "accept" and "abort" shortcuts, but reacts to ui buttons. It happens so rarely that it's difficult to find out what is special about those cases.
I found a useful hack in another thread: #635 (comment) I also rebound the "Accept the capture" keybinding to Ctrl + C for a more comfortable experience. The final command for my PrtSc shortcut is:
sh -c "QT_QPA_PLATFORM=wayland flameshot gui -r | xclip -selection clipboard -t image/png"Got mine working on wayland with wl-clipboard instead of xclip
bash -c "QT_QPA_PLATFORM=xcb flameshot gui -r | wl-copy"Sometimes it ignores the "accept" and "abort" shortcuts, but reacts to ui buttons. It happens so rarely that it's difficult to find out what is special about those cases.
huh amazing! That copying is finally working for me too (combined with compiling manually due to fractional scaling). This is very blurry though, removing the env variable QT_QPA_PLATFORM=xcb fixed the blur for me, so for me, I just set this in my shortcuts: bash -c "flameshot gui -r | wl-copy" (Ubuntu 24.04, single monitor at 125% scaling)
EDIT: I'm now automatically saving a file additionally to the disk, not ideal but kind of doing the trick bash -c "flameshot gui -r | wl-copy && wl-paste > ~/Pictures/screenshot-$(date +"%Y-%m-%d_%H-%M-%S").png"
sh -c "QT_QPA_PLATFORM=wayland flameshot gui -r | xclip -selection clipboard -t image/png"
Thanks, this works for me on Fedora 42.
I found a useful hack in another thread: #635 (comment) I also rebound the "Accept the capture" keybinding to Ctrl + C for a more comfortable experience. The final command for my PrtSc shortcut is:
sh -c "QT_QPA_PLATFORM=wayland flameshot gui -r | xclip -selection clipboard -t image/png"Got mine working on wayland with wl-clipboard instead of xclip
bash -c "QT_QPA_PLATFORM=xcb flameshot gui -r | wl-copy"Sometimes it ignores the "accept" and "abort" shortcuts, but reacts to ui buttons. It happens so rarely that it's difficult to find out what is special about those cases.
How did you make KB shortcut to work with it?
Edit (Gnome Arch Linux)
From the arch wiki:
#!/bin/sh
export QT_QPA_PLATFORM=wayland
/usr/bin/flameshot gui
But I wanted copy to clipboard work as well, so:
#!/bin/sh
export QT_QPA_PLATFORM=wayland
sh -c "QT_QPA_PLATFORM=xcb flameshot gui -r | wl-copy"
I saved it as flameshot-fix (don't include .sh). I saved it in my $PATH. It worked like a charm.
For Kb shortcut: I added script with full path to the command section:
command: /home/abuturab/.local/bin/flameshot-fix
Customize the path to your script location.