Bug 2248667 - Unable to capture screen
Summary: Unable to capture screen
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: flameshot
Version: 39
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Vitaly
QA Contact: Fedora Extras Quality Assurance
URL: https://github.com/flameshot-org/flam...
Whiteboard:
: 2261925 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-11-08 09:00 UTC by davletsh1n
Modified: 2024-04-25 09:12 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github flameshot-org flameshot issues 3340 0 None open Fedora 39 screenshot capture failed 2024-04-25 09:12:41 UTC
Github flameshot-org flameshot issues 3365 0 None open Flameshot unable to capture screen when triggered through Gnome shortcut 2024-04-25 09:12:41 UTC

Description davletsh1n 2023-11-08 09:00:26 UTC
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

Comment 1 Gergely Gombos 2024-02-10 08:09:41 UTC
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.

Comment 2 Vitaly 2024-04-25 09:10:50 UTC
*** Bug 2261925 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.