flameshot icon indicating copy to clipboard operation
flameshot copied to clipboard

flameshot: error: Unable to detect desktop environment (GNOME? KDE? Sway? ...)

Open aljustiet opened this issue 1 year ago • 7 comments

Flameshot Version

Flameshot 12.1.0-5 DE: Hyprland

Installation Type

Linux, MacOS, or Windows Package manager (apt, pacman, eopkg, choco, brew, ...)

Operating System type and version

Arch/Hyprland

Description

Doesn't support the Hyprland XDG_CURRENT_DESKTOP environment. If I set it to Sway, it works. Can you make it work on Hyprland too?

Steps to reproduce

  1. flameshot gui
  2. get an error

Screenshots or screen recordings

https://github.com/user-attachments/assets/bf76bfa7-6fa1-473a-86c9-172fcf1295cd

System Information

Hyprland.

aljustiet avatar Sep 23 '24 09:09 aljustiet

from https://github.com/flameshot-org/flameshot/blob/master/docs/Sway%20and%20wlroots%20support.md#river-wlroots-support

XDG_CURRENT_DESKTOP=sway flameshot

in your hyprland.conf you can also do:

env = XDG_CURRENT_DESKTOP,sway

ItsZariep avatar Sep 24 '24 15:09 ItsZariep

from https://github.com/flameshot-org/flameshot/blob/master/docs/Sway%20and%20wlroots%20support.md#river-wlroots-support

XDG_CURRENT_DESKTOP=sway flameshot

in your hyprland.conf you can also do:

env = XDG_CURRENT_DESKTOP,sway

Why can't you include hyprland for the xdg_current_desktop env var in the codebase too?

aljustiet avatar Sep 25 '24 07:09 aljustiet

Looks lite it is added https://github.com/flameshot-org/flameshot/blob/14a136777cd82ab70f42c13b4bc9418c756d91d2/src/utils/desktopinfo.h#L20 but something still goes wrong. Could it be related to Aquamarine? IIRC it does what wlroots does usualy. Can confirm btw Upd: can not confirm on flameshot-git

enk-it avatar Oct 14 '24 06:10 enk-it

any fix on this? it should work with sway and Hyprland as $XDG_CURRENT_DESKTOP

marcelarie avatar Oct 17 '24 08:10 marcelarie

any fix on this? it should work with sway and Hyprland as $XDG_CURRENT_DESKTOP

Have you tried -git version, if you are on arch? It should already work

enk-it avatar Oct 17 '24 09:10 enk-it

it does but when I try to do the screenshot it zooms a lot in the screen. I have two 4k screens.

marcelarie avatar Oct 17 '24 09:10 marcelarie

it does but when I try to do the screenshot it zooms a lot in the screen. I have two 4k screens.

Don't you want to open a new issue for this, it is another problem isn't it?

enk-it avatar Oct 17 '24 12:10 enk-it

XDG_CURRENT_DESKTOP should not be used as a compositor capability check.

Vladimir-csp avatar Feb 20 '25 06:02 Vladimir-csp

bind = , Print, exec, sh -c "export XDG_CURRENT_DESKTOP=Sway; flameshot gui"

you can use this to make it available in your keybind.

nagarete avatar Feb 26 '25 04:02 nagarete

Closed via pull request #3018 . The other issue related to "zoom" is related to fractional scaling and this is already an open bug we are wroking.

borgmanJeremy avatar May 28 '25 02:05 borgmanJeremy