flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
24.22k stars 1.55k forks source link

Issue with Sway&Flatpak #3335

Closed sandmuel closed 10 months ago

sandmuel commented 10 months ago

Flameshot Version

Flameshot v12.1.0 (-) Compiled with Qt 5.15.10 linux: 6.5.3-1-default opensuse-tumbleweed: 20230914

Installation Type

Flatpak from Flathub

Operating System type and version

openSUSE (Tumbleweed)

Description

When attempting to take a screenshot with the above details an error is given telling me to set XDG_CURRENT_DESKTOP. I proceed to set to to 'Sway' I try this with both the Flatpak and the native package and neither work. I then proceed to try both once again, but this time with XDG_CURRENT_DESKTOP set to 'sway' it continues to fail with the Flatpak, but does succeed with the native package.

From this, the issue seems clear; the Flatpak lacks permissions to read XDG_CURRENT_DESKTOP. (Oh and also maybe don't make the value read from XDG_CURRENT_DESKTOP be case sensitive)

UPDATE: Turns out it doesn't work with the Native one anymore, it only worked once

Steps to reproduce

run flameshot gui

Screenshots or screen recordings

No response

System Information

sandmuel commented 10 months ago

I also here's the full error:

flameshot: error: Unable to detect desktop environment (GNOME? KDE? Sway? ...)
flameshot: error: Hint: try setting the XDG_CURRENT_DESKTOP environment variable.
flameshot: error: Unable to capture screen
flameshot: error: Unable to capture screen
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
sandmuel commented 10 months ago

Turns out I just didn't export XDG_CURRENT_DESKTOP... oops