Skip to content

DOC: Screenshot capture failure with Flameshot on Ubuntu 24.04 LTS (GNOME/Wayland) #4463

Description

@JustinFntn

Environment

  • OS: Ubuntu 24.04.3 LTS (Noble Numbat)
  • Desktop: GNOME Shell 46.0
  • Display server: Wayland
  • Installation method: sudo apt install flameshot
  • Flameshot version: v12.1.0 (Debian 12.1.0-2build2)

Problem

On this setup, trying to take a screenshot with Flameshot results in the following error:

flameshot: error: Unable to capture screen

This happens when launching from the tray icon or desktop launcher.
After debugging, the issue appears to be related to screenshot permissions handled by xdg-desktop-portal on GNOME/Wayland.

Flameshot itself works correctly once the screenshot permissions are properly granted to the application.

Solution: Grant screenshot permissions via D-Bus

The following sequence fixes the problem permanently on Ubuntu 24.04 + GNOME 46 + Wayland.

⚠️ Run these commands as your regular user (no sudo), in a terminal inside your graphical session.

1. Reset existing screenshot permissions

dbus-send --session --print-reply=literal \
  --dest=org.freedesktop.impl.portal.PermissionStore \
  /org/freedesktop/impl/portal/PermissionStore \
  org.freedesktop.impl.portal.PermissionStore.DeletePermission \
  string:'screenshot' string:'screenshot' string:''

This clears any previous (possibly broken or denied) screenshot permission entries.

2. Explicitly grant screenshot permission to Flameshot

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'
  • org.flameshot.Flameshot is the application ID from the desktop file.
  • The array:string:'yes' value grants the screenshot permission.

3. Verify that the permission is stored

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'

You should now see an entry containing org.flameshot.Flameshot and the granted permission.

4. Restart Flameshot

  1. Quit Flameshot from the tray icon (top bar) – right click → Quit.
  2. Start Flameshot again (from the app menu).
  3. Try Take Screenshot from the tray icon

At this point, screenshots should work normally without the Unable to capture screen error.

Metadata

Metadata

Assignees

Labels

DocumentationDocumentation, web site, README

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions