flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
25.04k stars 1.6k forks source link

Flameshot cannot copy screenshot #3191

Open ardishko opened 1 year ago

ardishko commented 1 year ago

Flameshot Version

[when compiled from source] Flameshot v12.1.0 (84acbdaf) Compiled with Qt 5.15.9 [when using the flameshot-git package from the AUR] Flameshot v12.1.0 (3ededae5) Compiled with Qt 5.15.8

Installation Type

Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...), User repository (AUR), Compiled from source

Operating System type and version

6.3.1-arch1-1

Description

This started happening after I compiled flameshot from source to try out some code changes in a PR (#3059) and afterwards, even running flameshot with the flameshot-git package, I could not copy anything.

I have tried Compiling #3059 (has copy problem) Compiling the master branch (has region select delay and copy problem) Using the flameshot-git package in the AUR (has region select delay and copy problem) Using the flameshot package in the community repo (doesn't run)

However, I have found that I can copy my screenshot If I:

  1. Select Region
  2. Upload image to imgur
  3. Open Url (can't copy it because that doesn't work either)
  4. Copy the image from the opened URL

This is better than before for sure, I couldn't even do that on the other packages after compiling flameshot from source for the first time

Things to note: I have all the dependencies installed, so I'm pretty sure it's not a problem with a dependency.

Steps to reproduce

  1. Install flameshot (can compile from source or use a provided package, doesn't matter)
  2. Try to run flameshot gui
  3. Select region
  4. Copy
  5. Try to paste
  6. Realize you didn't actually copy anything in the first place

Screenshots or screen recordings

image

System Information

Sway/Wayland

Dual monitors 2K 144hz/1080p 60hz

NgoHuy commented 1 year ago

I can copy/paste on Archlinux with sway. Do you install grim as dependency?

ardishko commented 1 year ago

Things to note: I have all the dependencies installed, so I'm pretty sure it's not a problem with a dependency.

I can copy/paste on Archlinux with sway. Do you install grim as dependency?

Yes, I have grim installed. The screenshot can be taken, just not copied, like I demonstrated with my alternative routes to doing so that I explained in my post.

I used to be able to copy, before I compiled Flameshot from source to test #3059 like I mentioned

NgoHuy commented 1 year ago

please remove .config/flameshot and .config/flameshotrc, it should work with flameshot and left click icon on tray

NgoHuy commented 1 year ago

After testing, I can workaround by launching flameshot first, then use flameshot gui, it should copy. On KDE, it worked fine without launching first. Note that, with official package on Archlinux, it uses dbus by default, with git it should be built with GRIM option. For developers, I saw the message when launching flameshot gui directly image

ardishko commented 1 year ago

Note that, with official package on Archlinux, it uses dbus by default, with git it should be built with GRIM option.

I built flameshot-git with the DUSE_WAYLAND_GRIM flag, edited the PKGBUILD and all that before using it.

please remove .config/flameshot and .config/flameshotrc, it should work with flameshot and left click icon on tray

Furthermore, I would like to add that this didn't change anything in my case.

NgoHuy commented 1 year ago

Note that, with official package on Archlinux, it uses dbus by default, with git it should be built with GRIM option.

I built flameshot-git with the DUSE_WAYLAND_GRIM flag, edited the PKGBUILD and all that before using it.

please remove .config/flameshot and .config/flameshotrc, it should work with flameshot and left click icon on tray

Furthermore, I would like to add that this didn't change anything in my case.

did you run flameshot first, then flameshot gui?

ardishko commented 1 year ago

Yes, I run flameshot at launch and when I press printscreen It runs flameshot gui

NgoHuy commented 1 year ago

Yes, I run flameshot at launch and when I press printscreen It runs flameshot gui

when you pressed it call xcb instead.

  1. run flameshot on terminal
  2. run flameshot gui on other terminal. If it did not work, check your xdg-desktop-portal-wlr.

I saw that when ran flameshot gui directly it did not find main process layout. We must run flameshot first, then use flameshot gui shotcut instead click menu, it called xcb instead wayland. After restart xdg-desktop-portal, it will call wayland again, so strange.

ardishko commented 1 year ago

I think there is a chance that compiling everything from scratch again might fix my issue, I would like to remove all the files, but I don't know where they all are.

Do you know where I can look for the files @NgoHuy ? Or any other way I can uninstall this compiled program?