Closed abhijeetviswa closed 3 years ago
What distro are you testing with?
Arch Linux Should've specified that. My bad. I'll eid the issue as well.
I can confirm this is an issue, luckily its not related to the 0.9 release. it is also present on the 0.8.5 branch. I wonder if its our fault or related to the recent KWIN changes.
Do you have a good way to rollback to Plasma 5.20?
Flameshot did not work on Plasma 5.20 + Wayland. I'm not sure if the issue was the same as it is now. Any tips on how to rollback to 5.20 on Arch?
Not sure how to do it safely either 😀
Upgraded to Plasma 5.21.1. With the changes I had made to the .desktop file, Flameshot has started working once again.
Here is a git diff
of the changes I made. Could you try it out locally and let me know if this works for you?
diff --git a/data/desktopEntry/package/org.flameshot.Flameshot.desktop b/data/desktopEntry/package/org.flameshot.Flameshot.desktop
index a5308e3..eac291c 100644
--- a/data/desktopEntry/package/org.flameshot.Flameshot.desktop
+++ b/data/desktopEntry/package/org.flameshot.Flameshot.desktop
@@ -37,7 +37,7 @@ Keywords[nl_NL]=flameshot;schermfoto;screenshot;schermafdruk;vastleggen;schermop
Keywords[es]=flameshot;screenshot;capture;shutter;captura;
Keywords[de]=flameshot;screenshot;Bildschirmfoto;Aufnahme;
Keywords[pt_BR]=flameshot;screenshot;captura de tela;captura;shutter;
-Exec=flameshot
+Exec=/usr/bin/flameshot
Icon=org.flameshot.Flameshot
Terminal=false
Type=Application
@@ -46,7 +46,7 @@ StartupNotify=false
Actions=Configure;Capture;Launcher;
X-DBUS-StartupType=Unique
X-DBUS-ServiceName=org.flameshot.Flameshot
-X-KDE-DBUS-Restricted-Interfaces=org_kde_kwin_effect-screenshot
+X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot
[Desktop Action Configure]
Name=Configure
Sorry for the double post.
Awesome, yes i will give this a try tonight and if it works get it in the 0.9 release.
The proposed patch looks good except that we may need to use absolute path for both the basic Exec key and all [Actions]
field.
Besides, I'm not sure if using absolute path would introduce any side effects for alternative packaging such as snap, flatpak, appimage etc. This will need some testing.
This does help but unfortunately I'm only able to cut out an image in one of my 2 displays. I also get a notification from Plasma Workspace: Screenshot saved to "/tmp/kwin_screenshot_xxxxxx" So it seems to screenshot natively first and then cutting from that?
EDIT: it does work correct when I launch it with xcb: QT_QPA_PLATFORM=xcb flameshot
but it does only show one monitor available to clip when I: QT_QPA_PLATFORM=wayland flameshot gui
Here is a
git diff
of the changes I made. Could you try it out locally and let me know if this works for you?diff --git a/data/desktopEntry/package/org.flameshot.Flameshot.desktop b/data/desktopEntry/package/org.flameshot.Flameshot.desktop index a5308e3..eac291c 100644 --- a/data/desktopEntry/package/org.flameshot.Flameshot.desktop +++ b/data/desktopEntry/package/org.flameshot.Flameshot.desktop @@ -37,7 +37,7 @@ Keywords[nl_NL]=flameshot;schermfoto;screenshot;schermafdruk;vastleggen;schermop Keywords[es]=flameshot;screenshot;capture;shutter;captura; Keywords[de]=flameshot;screenshot;Bildschirmfoto;Aufnahme; Keywords[pt_BR]=flameshot;screenshot;captura de tela;captura;shutter; -Exec=flameshot +Exec=/usr/bin/flameshot Icon=org.flameshot.Flameshot Terminal=false Type=Application @@ -46,7 +46,7 @@ StartupNotify=false Actions=Configure;Capture;Launcher; X-DBUS-StartupType=Unique X-DBUS-ServiceName=org.flameshot.Flameshot -X-KDE-DBUS-Restricted-Interfaces=org_kde_kwin_effect-screenshot +X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot [Desktop Action Configure] Name=Configure
Sorry for the double post.
Weirdly enough, the patch I provided works sporadically for me.
I was initially working on a cloned repo and had the .desktop file point to the debug build. After that, I installed Flameshot using the flameshot-git
AUR package and tried making the same changes and it stopped working. I went back to using the debug build but it simply didn't work. I tried it again right now and it did. I'm really not sure what the problem is.
It would be nice if more people could test this out and report their findings.
Weirdly enough, the patch I provided works sporadically for me.
I was initially working on a cloned repo and had the .desktop file point to the debug build. After that, I installed Flameshot using the
flameshot-git
AUR package and tried making the same changes and it stopped working. I went back to using the debug build but it simply didn't work. I tried it again right now and it did. I'm really not sure what the problem is.It would be nice if more people could test this out and report their findings.
I'm currently running the AUR git version with only the supplied desktop file change applied. But like supplied above I need to override the env variable for it to work correctly. Tested with 1, 2 and 3 screens in Wayland.
I believe using xcb will allow you to only take screenshots of XWayland apps. I only have a single monitor, so I cannot test multi-monitor support on Wayland. Does it work with Spectacle?
I believe using xcb will allow you to only take screenshots of XWayland apps. I only have a single monitor, so I cannot test multi-monitor support on Wayland. Does it work with Spectacle?
spectacle works yes:
QT_QPA_PLATFORM=wayland spectacle
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
I recently adjusted flameshot to always use XCB behind the scenes. This worked really well on all my gnome testing.
https://github.com/flameshot-org/flameshot/commit/ddd4eb5b0c51a6761179b8def628d1cd9a13599f
Wow, its right in that PR, it only applies to gnome. Need to add KDE and test that with the desktop entry changes.
Okay I think I know the problem.
After making the changes to the desktop file, you need to reboot your session. Then make sure you launch flameshot from the krunner menu and not the terminal. This makes it work for me every time.
I've made the change to X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot
, but screenshotting a region is only possible on my laptop monitor (I have an external monitor connected to it), and the upper 2 thirds of the laptop monitor gets covered by a grey rectangle.
I also get the notification that @33Fraise33 mentioned.
I've made the change to
X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot
, but screenshotting a region is only possible on my laptop monitor (I have an external monitor connected to it), and the upper 2 thirds of the laptop monitor gets covered by a grey rectangle.I also get the notification that @33Fraise33 mentioned.
do sudo pkill flameshot
and start flameshot with QT_QPA_PLATFORM=xcb flameshot
For me that works on multiple monitors
I have the same problem, but with Xorg.
I can fix it doing this:
do
sudo pkill flameshot
and start flameshot withQT_QPA_PLATFORM=xcb flameshot
@All3xJ Please open a separate issue for xorg, I want to keep this focused on wayland.
Hi. Can I go ahead and make a PR for this?
Yes please do
I still have this issue on plasma 5.22 and wayland on arch.
I've switched back to X.org due to the lack of certain applications supporting screensharing. I still have the Wayland session installed and will try debugging this on 5.22 over the weekend.
@Toadfield the PR @abhijeetviswa kindly made was merged but it is not present in v0.9.0 and for the time being you only get it iff you install Flameshot either by compiling from source or the AUR to get the v0.10.0 . Would you please confirm if your have v0.10.0 installed.
The first link is managed by us, but the second one is not even from this repo. For others to know, from AUR install flameshot-git
to get the latest updates that are not released yet. The following is the link to the AUR that we maintain:
https://aur.archlinux.org/packages/flameshot-git
Also note that because we don't update the hash in the pkgbuild for every commit merged into master branch of this repo, your AUR manager might not automatically realise that there is a new version. You can always force it to install. For example with pamac
you can run pamac install flameshot-git
every few days to get the latest features and bug fixes.
I confirm building from Git on Arch Linux, Flameshot works again on Wayland (or at least, KDE Wayland).
It works now.
Closing this issues since this was fixed in 0.9.0
I've had the same problem after installing flameshot on EndeavourOS KDE. I installed some packages and restarted kde session. Problem was that grim wasn't able to load properly. Here's a screenshot of installed packages taken using flameshot :smile:
Versions Flameshot: 5b0bb501dc513f16e93a6d72e06a222a2da6c404 Kwin/Plasma: v5.21 Distro: Arch Protocol: Wayland
Describe the bug Flameshot does not take a screenshot. I tried tracking this down with the hopes of creating a patch, but I'm SOL due to my limited knowledge in the Linux desktop space. These are my findings:
X-KDE-DBUS-Restricted-Interfaces
key with the valueorg.kde.kwin.Screenshot
.Exec
key in the desktop files and the executable location obtained from procfs to do so.X-KDE-DBUS-Restricted-Interfaces
key toorg_kde_kwin_effect-screenshot
instead oforg.kde.kwin.Screenshot
.I tried setting the
Exec
key full path to the binary as well as changing theX-KDE-DBUS-Restricted-Interfaces
key to the intended value. However, Flameshot still does not work. I hope someone can fix this issue or help track this down further.Thanks and sorry if a similar issue already exists.