Open changchichung opened 3 months ago
The system prompted me to update to Ubuntu 24.04.1 LTS. After the update, I can normally use flameshot gui
in the command line.
However, I cannot use the shortcut key.
I have already bound flameshot gui
to Alt + A in Settings > Keyboard > View and Customise Shortcuts > Custom shortcuts.
the /var/log/syslog file:
2024-09-02T18:25:56.414396+08:00 HP-680 systemd[3262]: Started app-gnome-flameshot-9041.scope - Application launched by gsd-media-keys.
2024-09-02T18:25:56.479808+08:00 HP-680 xdg-desktop-por[4183]: Failed to associate portal window with parent window
2024-09-02T18:25:56.480580+08:00 HP-680 xdg-desktop-por[4095]: Failed to show access dialog: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog
2024-09-02T18:25:56.489617+08:00 HP-680 flameshot[9041]: flameshot: error: Unable to capture screen
2024-09-02T18:25:56.495023+08:00 HP-680 flameshot[9041]: flameshot: error: Unable to capture screen
2024-09-02T18:25:56.579197+08:00 HP-680 flameshot[9041]: flameshot: info: Screenshot aborted.
Have the same error as the comment above.
Same here; see also this discussion: https://github.com/flatpak/xdg-desktop-portal/issues/1070
This comment provides a nice workaround (TLDR, QT_QPA_PLATFORM=wayland
is required as environment variable for the shortcut to work, so you have to wrap the call into a one-liner script and configure that as custom shortcut):
https://github.com/flatpak/xdg-desktop-portal/issues/1070#issuecomment-1771302632
Have you try this solution?
https://github.com/flameshot-org/flameshot/issues/3498#issuecomment-2026731686
Same here; see also this discussion: flatpak/xdg-desktop-portal#1070
This comment provides a nice workaround (TLDR,
QT_QPA_PLATFORM=wayland
is required as environment variable for the shortcut to work, so you have to wrap the call into a one-liner script and configure that as custom shortcut): flatpak/xdg-desktop-portal#1070 (comment)
My environment variable is set to "QT_QPA_PLATFORM=wayland;xcb", it was needed for some other app (I think it's qBittorrent). That's why flameshot was still not working.
Running flameshot with own variable worked:
QT_QPA_PLATFORM=wayland flameshot
temporary solution, you can use a bash shell script, here I named bash "ss.sh"
and the keyboard buttons work...
chmod +x ./ss.sh
Ubuntu 20.04
Without creating additional files, this can be done directly from the Gnome Keyboard Custom Shortcuts configuration by setting the command to sh -c "QT_QPA_PLATFORM=wayland flameshot gui"
This has been tested with Ubuntu 24.04 with flameshot installed via the repositories.
Without creating additional files, this can be done directly from the Gnome Keyboard Custom Shortcuts configuration by setting the command to
sh -c "QT_QPA_PLATFORM=wayland flameshot gui"
This has been tested with Ubuntu 24.04 with flameshot installed via the repositories.
thank you bro , it solves my problem , its very nice of you ,thank you
temporary solution, you can use a bash shell script, here I named bash "ss.sh"
and the keyboard buttons work...
chmod +x ./ss.sh
Ubuntu 20.04
Thank you, it worked perfectly
Flameshot Version
flameshot -v Flameshot v12.1.0 (Debian 12.1.0-2build2) Compiled with Qt 5.15.12
Installation Type
apt
Operating System type and version
ubuntu 24.04.1 Desktop
Description
I've been using a custom shortcut key, Ctrl+1, to call the "flameshot gui" command for taking screenshots on Ubuntu 22.04.
Recently, I upgraded to Ubuntu 22.04.1 and reinstalled my laptop. I tried to set up the same custom shortcut key for flameshot, but it's not working and I'm getting an error. I tried manually running "flameshot gui" in the terminal window, and it worked fine.
I then checked the /var/log/syslog file and found an error message when trying to use the shortcut key
Steps to reproduce
No response
Screenshots or screen recordings
No response
System Information