Skip to content

Docs: Add .desktop file fix for "Unable to capture screen" on GNOME Wayland (apt/deb install) #4459

@akobberup

Description

@akobberup

Feature Description

Flameshot Version

Flameshot v12.1.0 (Debian 12.1.0-2build2)
Compiled with Qt 5.15.12

System Information

  • OS: Ubuntu 24.04.3 LTS (Noble Numbat)
  • Desktop: GNOME Shell 46.0
  • Display Server: Wayland
  • GPU: Intel Arc Graphics (Meteor Lake-P) / NVIDIA GeForce RTX 4070 Max-Q
  • Installation method: apt (not Flatpak)

Problem

Clicking "Take Screenshot" from the system tray produces:

flameshot: error: Unable to capture screen

The xdg-desktop-portal-gnome logs show:
Failed to associate portal window with parent window

Root Cause

Flameshot defaults to XWayland instead of native Wayland on GNOME. The XWayland context cannot communicate properly with the Wayland screenshot permission system.

Solution

Running with native Wayland resolves the issue:

QT_QPA_PLATFORM=wayland flameshot gui

Permanent fix by modifying the .desktop file:

sudo sed -i 's|Exec=flameshot|Exec=env QT_QPA_PLATFORM=wayland flameshot|g' /usr/share/applications/org.flameshot.Flameshot.desktop

Documentation Suggestion

The https://flameshot.org/docs/guide/wayland-help/ currently:

  1. Lists flatpak permission-set under "Unable to capture screen" — doesn't apply to apt/deb installs
  2. Mentions QT_QPA_PLATFORM=wayland only under "Gnome shortcut does not trigger Flameshot" with shell script workarounds

Suggested addition to the "Unable to capture screen" section:

For apt/deb installations: If the permission fix doesn't apply, Flameshot may be using XWayland instead of native Wayland. Modify the .desktop file to force Wayland:
sudo sed -i 's|Exec=flameshot|Exec=env QT_QPA_PLATFORM=wayland flameshot|g' /usr/share/applications/org.flameshot.Flameshot.desktop

This is simpler than shell script workarounds and fixes all launch methods (tray, shortcuts, menu) at once.

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementFeature requests and code enhancements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions