** Description changed: ### Problem Flameshot is unable to capture screenshots when launched from the GNOME application launcher on Ubuntu 24.04 (Wayland session). The same command works correctly when executed from a terminal: - - flameshot gui + flameshot gui However, launching Flameshot via GNOME launcher results in: + "Unable to capture screen" - "Unable to capture screen" - - --- + This issue is reproducible 100% of the time on a fresh session. ### Environment - Ubuntu 24.04 LTS (fully up to date) - GNOME 46 - Wayland session (XDG_SESSION_TYPE=wayland) - Flameshot installed via apt (org.flameshot.Flameshot) - --- - ### Logs From xdg-desktop-portal: + No permissions stored for: screenshot screenshot, app org.flameshot.Flameshot - No permissions stored for: screenshot screenshot, app - org.flameshot.Flameshot - - Failed to show access dialog: - GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: - Only the focused app is allowed to show a system access dialog - - --- + Failed to show access dialog: + GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: + Only the focused app is allowed to show a system access dialog ### Analysis - The issue appears to be caused by an interaction between: - + This appears to be an integration issue rather than an application bug and is likely caused by an interaction between: - GNOME Shell focus model (Wayland) - xdg-desktop-portal permission flow - application launch via GNOME launcher + It may be related to how GNOME Shell determines "focused application" + for portal permission dialogs (see below). + Flow: - 1. Flameshot requests screenshot access via portal 2. No permission is stored yet 3. Portal attempts to show permission dialog 4. GNOME rejects dialog because the app is not considered "focused" 5. Permission cannot be granted → screenshot fails This creates a deadlock: - - no permission → dialog required → dialog blocked → no permission - - --- + no permission → dialog required → dialog blocked → no permission ### Workaround Manually pre-seeding permission resolves the issue completely: - - dbus-send --session \ - --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 \ + --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' After this, Flameshot works correctly from the GNOME launcher. - - --- ### Expected behavior Flameshot launched from the GNOME launcher should be able to: - - show the permission dialog, or - obtain focus in a way that allows the dialog to be shown - - --- ### Actual behavior - Permission dialog is never shown - Screenshot functionality fails permanently when launched from launcher - - --- - - ### Notes - - This appears to be an integration issue rather than an application bug. - - It may be related to how GNOME Shell determines "focused application" - for portal permission dialogs. ProblemType: Bug DistroRelease: Ubuntu 24.04 Package: xdg-desktop-portal-gnome 46.2-0ubuntu1 ProcVersionSignature: Ubuntu 6.8.0-107.107-generic 6.8.12 Uname: Linux 6.8.0-107-generic x86_64 ApportVersion: 2.28.1-0ubuntu3.8 Architecture: amd64 CasperMD5CheckResult: pass CurrentDesktop: ubuntu:GNOME Date: Sat Apr 11 11:46:09 2026 InstallationDate: Installed on 2021-09-28 (1656 days ago) InstallationMedia: Ubuntu 21.04 "Hirsute Hippo" - Release amd64 (20210420) SourcePackage: xdg-desktop-portal-gnome UpgradeStatus: Upgraded to noble on 2026-02-08 (62 days ago)
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2148068 Title: Flameshot cannot capture screen when launched from GNOME launcher on Wayland due to portal permission dialog being blocked by focus restriction To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/xdg-desktop-portal-gnome/+bug/2148068/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
