New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GNOME custom "flameshot gui" keybinding doesn't work with Wayland, command works from terminal, nothing in dbus-monitor output either way #3326
Comments
Tested after changing monitor scaling from 125% to 100%: didn't make a difference. Tested with my built-in laptop screen with no DisplayLink: didn't make a difference. Tested with Xorg instead of Wayland: WORKS FINE. |
OK, so it's weirder than this. If I log into Wayland, and I have Flameshot configured to launch on startup, then that flameshot can't take screenshots either, i.e., when I click on the icon and select "Take Screenshot" nothing happens. But if I kill that flameshot and restart it by running it from the terminal, then THAT flameshot can take screenshots. So the common factor between the two is flameshot launched from inside my login session by me works, flameshot launched in the background, on startup or from a key binding, doesn't. I've captured wrapped flameshot in a script to capture what environment variables are set in each case and tried to eliminate the differences to see if that would make a difference, but I was unable to identify any environment variables that are relevant. Bizarre. |
I had to change to XORG it's real pain I've tried the following ALT+F2 prompt to trigger it terminal command |
I noticed the same thing with the keybinding not working in recent releases on X11. I ran "flameshot gui" from the console and got a segmentation fault, which explains the problem. Starting the app and clicking the tray icon still works fine. |
This is not the same issue and you should probably open a separate ticket for it rather than commenting about it on this issue. |
Hi,
|
It's stopped working since upgrading xdg-desktop-portal to 1.17. AFAIU probably x-d-p fixed the bug but it's now flameshot's time to fix it's bug. |
Likely relevant lines in syslog:
|
I also appear to have the same issue. The work around I found was to make a copy of the after installing xterm. This allows me a single click on the app icon to create screenshots without error. |
Same here; Logs: If I press "take screenshot" from the flameshot menu.
And if I "open launcher" from the menu
|
Same here on Ubuntu 23.10. Works only if i start flameshot gui in a gnome-terminal. Tests: Gnome 45 on Wayland. |
I have the same troubles with Manjaro and Gnome 44.5 |
I have the same troubles with Fedora 39 and Gnome 45
same problem flatpak/xdg-desktop-portal#1070 I got the workaround now: |
Hi, same problem here on Ubuntu 23.10, Gnome 45, Wayland and Flameshot 12.1.0 : the program automatically starts with computer session - if I try to launch it from the top menu, nothing happens. If I close it and re-lauch from terminal, it works - like other said. But in my case, sometimes, when I run the "Screenshot" row, screen freezes - mouse is not visible anymore, nothing works with Alt + Tab, and I have to manually reset… |
I found that Using Alt F2 I can run: Also Alt F2 I can run: |
@dwoodwar03 I can confirm this. |
this will not work. I tried under Wayland. bash -c -- "flameshot gui" result in the same error:
but this will work: flatpak/xdg-desktop-portal#1070 (comment) sudo tee /usr/local/bin/flameshot-gui-workaround > /dev/null <<'EOF'
#!/bin/bash
flameshot gui
EOF
sudo chmod a+x /usr/local/bin/flameshot-gui-workaround make call to the wrapper |
Can confirm above worked on Wayland, Gnome and Ubuntu 23.10 ☝️ sudo tee /usr/local/bin/flameshot-workaround > /dev/null <<'EOF'
#!/bin/bash
flameshot
EOF
sudo chmod a+x /usr/local/bin/flameshot-workaround This also launches a working |
|
@jrom99 no. non of the shell works. bash, sh, zsh Wayland user. |
wayland user (ubuntu 23.10), sh works |
sh is just an symlink. for Fedora, it is actually linked to bash ❯ ls -l `which sh`
lrwxrwxrwx root root 4 B Wed Jul 19 00:00:00 2023 /usr/bin/sh ⇒ bash For Ubuntu users, it is linked to |
It doesn't matter that it's a symlink, since the problem seems to be how, in Wayland, Flameshot is refused screen access since its ID doesn't match its |
Hello everyone, I had the same issue. System information:
If I entered
To fix the issue, I created the following script and set the Print key as the shortcut for #!/usr/bin/env bash
flameshot gui If I type Print, the script will run and I can take a screenshot with Flameshot. Disabling Wayland in /etc/gdm3/custom.conf also worked for me, too. However, after disabling Wayland, I could no longer copy screenshots in Emacs (it uses wl_clipboard). So this was not a workaround for me. I am happy to use Flameshot and thank the Flameshot team for this great application. |
no shell works for me either - Fedora 39, Gnome 45.1 (wayland)
|
I found a proper way to solve this issue temporarily(maybe only need to run once): flatpak permission-set screenshot screenshot flameshot yes We can confirm that this issue is caused by the system screenshot permission check. So we only need to add the flatpak permission-set screenshot screenshot org.flameshot.Flameshot yes And, check the screenshot permissions by the command below: flatpak permissions ---- called by the custom shortcut. @mmahmoudian Can you help to write the actions required by the user in the application or just run these commands silently(I'm not sure if it violates the security rules)? |
@nooop3 great! This is finally the fix. By the way does clipboard works for you? The result cannot be pasted for me in wayland, I have wl-clipboard, grim in GNOME. |
@darkblaze69 I can paste the screenshot by clipboard. I don't install the wl-clipboard, grim in GNOME, only xclip. Even when I uninstall the |
Ok, got it. I'm trying to use in Wayland-only session without Xwayland, so xclip not relevant here. Apparently clipboard on flameshot is broken also in pure Wayland. |
confirmed, this works. before:
after:
|
I'm using flameshot from a deb, not from a flatpak. I don't think I'm using any flatpaks, and I don't even have the |
Confirmed this works for me on Fedora 39. Now I just need to find a fix for the issue with fractional scaling and I'll be golden. |
I'm also not using any fatpaks, and I installed the flameshot by the Edited: When I uninstalled the |
no, it does not related to if you are using flatpak version or not. I only use native apps, so, any way, the trick works for native program |
@jikamens Can you try these low-level
|
|
Even after executing the commands above, my custom "flameshot gui" key binding still says "Unable to capture screenshot". This is true even after issuing the commands above and logging out and logging back in. |
Try the lowercase |
Works! Thanks. |
can confirm, this works |
Fedora 39: Resolved 🤟 |
Works in Ubuntu 23.10 (Wayland) with Flameshot .deb. |
That worked for me on Fedora 39. Thank you, @nooop3! |
This one worked for me! |
Hi, thanks for your help, but I surely miss something. I don't use Flatpak, but the regular flameshot deb package on Ubuntu 24.04 and Wayland. If I try to enter in terminal, either : "sudo tee /usr/local/bin/flameshot-gui-workaround > /dev/null <<'EOF' EOF" or "sudo tee /usr/local/bin/flameshot-gui-workaround > /dev/null <<'EOF'" EOF" I get the error message "tee: /usr/local/bin/flameshot-gui-workaround: Aucun fichier ou dossier de ce nom (no file nor folder with this name" What should I type exactly on terminal or gedit, please ? And then add flameshot-workaround on the startup apps ? Can we expect soon a new release of Flameshot, which corrects this bug on Wayland ? |
@Valeryan24 I would try this method. I'm on Arch (no flatpak) and this method worked for me. Sounds like it's working for people across various distros (Fedora, Ubuntu, etc). |
Chiming in that this worked for me as well on Fedora 39 Workstation (Gnome 45, Wayland). |
This worked for me on Gnome 45 Arch! Thank you so much!! |
I upgraded to Ubuntu 24.04, and I still have the same problem. Although the same solution still works. sudo tee /usr/local/bin/flameshot-gui-workaround > /dev/null <<'EOF'
#!/bin/bash
flameshot gui
EOF
sudo chmod a+x /usr/local/bin/flameshot-gui-workaround |
Thanks @nooop3. Also worked for me on Fedora 40, Gnome 46.1. Is this setting persisted? I mean, do we need to run this every time after the boot? |
Flameshot Version
I've tried this with both the Flameshot 12.1.0 included in Debian and with Flameshot built from current git (a7e0a61)
Installation Type
Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...), Compiled from source
Operating System type and version
Tried both Debian 12 + Debian 13 testing
Description
I have a custom key binding set to execute "flameshot gui".
When I run the command "flameshot gui" from the command line, it works just fine.
When I hit the custom key binding, I see from my process listing that there's a flameshot gui process running, but nothing happens.
This happens with both the flameshot that comes with Debian and the one I built myself. It happens with Debian Trixie Testing and I think also with Debian 12 Bookworm, although I can't go backwards to Bookworm to confirm.
I run dbus-monitor as instructed https://flameshot.org/docs/guide/troubleshooting/ and it doesn't show any messages being sent by Flameshot when I execute "flameshot gui" either from the command line or with the key bindings.
This is not #325 because I'm not specifying any arguments to "flameshot gui".
Steps to reproduce
No response
Screenshots or screen recordings
No response
System Information
Debian Trixie Testing amd_64 GNOME Wayland. Dual monitors via DisplayLink.
The text was updated successfully, but these errors were encountered: