Open AndKe opened 4 weeks ago
Try to build with the USE_WAYLAND_GRIM
flag and it should work
Thanks, ... so this flag is not used in the build from Ubuntu's repositories? (I think that is strange)
It's definitely not optimal yeah, wayland has been such a big shift especially for applications that access screen(s) so adoption has been a bit slow.
Try to follow the step-by-step instructions I included in this issue. https://github.com/flameshot-org/flameshot/issues/3770
Hello, to solve this I create a startup script that will start Flameshot on startup correctly configured.
.config/autostart/flameshot-custom.desktop
[Desktop Entry]
Type=Application
Name=Flameshot wayland fixed
Exec=sh -c "QT_QPA_PLATFORM=wayland flameshot"
X-GNOME-Autostart-enabled=true
The problem is due to the missing QT_QPA_PLATFORM=wayland
value, flameshot is not able to take the screenshot. Tested on Ubuntu 24.04 with the deb package.
Hello, to solve this I create a startup script that will start Flameshot on startup correctly configured.
.config/autostart/flameshot-custom.desktop
[Desktop Entry] Type=Application Name=Flameshot wayland fixed Exec=sh -c "QT_QPA_PLATFORM=wayland flameshot" X-GNOME-Autostart-enabled=true
The problem is due to the missing
QT_QPA_PLATFORM=wayland
value, flameshot is not able to take the screenshot. Tested on Ubuntu 24.04 with the deb package.
Weel, it's very useful, when i change the keyshot for f1 to sh -c "QT_QPA_PLATFORM=wayland flameshot gui"
i'm also facing this issue with x-org session its working fine but with wayland it has the issue
I'm also facing this issue with GNOME + Wayland + Arch. I tried the following:
flameshot gui
in command line worksI have also tried launching with QT_QPA_PLATFORM=wayland
, but nothing changed.
It's a weird behavior. I suspect it's due to different environment variables.
systemctl --user show-environment
env
in command lineI'm also facing this issue with GNOME + Wayland + Arch. I tried the following:
* ❌ Shortcut not working * ❌ Click "Tray icon > Take Screenshot" not working * ✅ `flameshot gui` in command line works
I have also tried launching with
QT_QPA_PLATFORM=wayland
, but nothing changed.It's a weird behavior. I suspect it's due to different environment variables.
systemctl --user show-environment
env
in command line
Thanks for the advanced info, the DBUS info would be most telling though. I'm fairly confident that it's the DBUS event either not firing or not getting acted upon. The dbus-monitor
command can help show this. --profile
argument makes the output a little bit more readable.
P.S. I think flameshot gives a warning about this and recommends recompiling with USE_WAYLAND_GRIM
@FelixJochems Thanks for the instructions.
Here are the full dbus-monitor --profile
I captured. I'm not familiar with DBus, so I'm not sure what to look for.
flameshot gui
in command lineP.S. I think flameshot gives a warning about this and recommends recompiling with
USE_WAYLAND_GRIM
I didn't see any warnings from Flameshot. Only a "Unable to capture screen" error popup in notifications (same as #3769 (comment)). Where should I find the warnings?
I'm also facing this issue with GNOME + Wayland + Arch. I tried the following:
- ❌ Shortcut not working
- ❌ Click "Tray icon > Take Screenshot" not working
- ✅
flameshot gui
in command line worksI have also tried launching with
QT_QPA_PLATFORM=wayland
, but nothing changed.It's a weird behavior. I suspect it's due to different environment variables.
systemctl --user show-environment
env
in command line
Don't use the "take screen" icon, just use the keyshot for one key which can be bind to execute sh -c "QT_QPA_PLATFORM=wayland flameshot gui"
, just like this:
@wanstarge
Don't use the "take screen" icon, just use the keyshot for one key which can be bind to execute
sh -c "QT_QPA_PLATFORM=wayland flameshot gui"
, just like this:
You inspired me! I've tried different commands in shortcut:
sh -c "QT_QPA_PLATFORM=wayland flameshot gui"
sh -c "flameshot gui"
sh -c "flameshot gui < /dev/null"
sh -c "flameshot gui > /dev/null"
sh -c "flameshot gui < /dev/null > /dev/null"
I'm confused. How come redirecting stdin
or stdout
fixed the problem?
@liblaf This is so cool, you have made so many attempts, and I don't know more for the specific one. I hope the author will pay attention to the progress we have found, good luck.
I think the warning are still only in the git versions. It's been awhile since an official release. I've experimented with a couple setups on my own system and it got quite confused about the clipboard. Since X11 has a global clipboard while wayland doesn't. The 'unload from memory feature when no longer in use' gets triggered often when it shouldn't. Not technically crashing, but unwanted behavior nonetheless. It's an intricate mess between different OS settings as well.
As for the standard in/out helping, I actually don't really know. I'll keep an eye out for it though. I'm currently in the process of making a fork that targets wayland compositors since it is such a huge shift in architecture.
P.S. The error should display in the terminal when running flameshot from the terminal. For example I get this: flameshot: warning: If the USE_WAYLAND_GRIM option is not activated, the dbus protocol will be used. It should be noted that using the dbus protocol under wayland is not recommended. It is recommended to recompile with the USE_WAYLAND_GRIM flag to activate the grim-based general wayland screenshot adapter
when running the official latest release.
I'm here to report this bug is present on Ubuntu 24.04.1 when installed from apt. @wanstarge 's fix resolved the issue.
Same problem on Fedora 40 with Gnome Wayland.
Unfortunately, this fix does not work : sh -c "QT_QPA_PLATFORM=wayland flameshot gui"
I still have the error :
flameshot: error: Unable to capture screen
Also occurring on Fedora 41 with Wayland...
Flameshot Version
Flameshot v12.1.0 (Debian 12.1.0-3) Compiled with Qt 5.15.13 linux: 6.11.0-9-generic ubuntu: 24.10
Installation Type
Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...)
Operating System type and version
Ubuntu 24.10 (already in the info above)
Description
This notification pops up instead:
Steps to reproduce
1 start flameshot 2 click "take screenshot"
Screenshots or screen recordings
No response
System Information
-