In the terminal, executing flameshot gui works fine, but calling it from a custom Gnome shortcut, I see a permission error. Failed to show access dialog: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog Reproducible: Always Steps to Reproduce: 1. Install flameshot via flatpak 2. Setup gnome shortcut for "flameshot gui" 3. Get flameshot: error: Unable to capture screen/ GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog Actual Results: Get flameshot: error: Unable to capture screen/ GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: Only the focused app is allowed to show a system access dialog Expected Results: Flameshot gui appears Check https://github.com/flameshot-org/flameshot/issues/3340 It contains some video examples
The bug still exists, and it's fixed by running these commands: dbus-send --session --print-reply=literal --dest=org.freedesktop.impl.portal.PermissionStore /org/freedesktop/impl/portal/PermissionStore org.freedesktop.impl.portal.PermissionStore.SetPermission string:'screenshot' boolean:true string:'screenshot' string:'org.flameshot.Flameshot' array:string:'yes' dbus-send --session --print-reply=literal --dest=org.freedesktop.impl.portal.PermissionStore /org/freedesktop/impl/portal/PermissionStore org.freedesktop.impl.portal.PermissionStore.Lookup string:'screenshot' string:'screenshot' I think this is safe to do - as it's a screenshot software, the user expects it to be able to take screenshots, so these commands could be included as part of the installation.
*** Bug 2261925 has been marked as a duplicate of this bug. ***