flameshot-org / flameshot

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

Support for up & coming cosmic-desktop #3680

Open gerelef opened 1 month ago

gerelef commented 1 month ago

Flameshot Version

> flameshot --version
Flameshot v12.1.0 (-)
Compiled with Qt 5.15.12

Installation Type

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

Operating System type and version

fedora-40; cosmic-desktop DE

Description

Flameshot instantly fatally errors when attempting to take screenshot via any way. Running under cosmic-desktop, installed in fedora 40 via copr

sudo dnf copr enable -y ryanabx/cosmic-epoch
sudo dnf install -y cosmic-desktop

Steps to reproduce

  1. install cosmic-desktop
  2. run flameshot gui in the terminal
  3. ???
  4. flameshot dies with the logs below:
    > flameshot gui
    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
    Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
    Unable to get current screen, starting to use primary screen. It may be a cause of logical error and working with a wrong screen.
    qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
    flameshot: info: Screenshot aborted.

Screenshots or screen recordings

No response

System Information

fedora 40, cosmic-desktop via copr running wayland w/ display layout: screenshot-2024-07-27-16-37-44

nevdelap commented 1 month ago

COSMIC is looking brilliant, and I'm switching over on WFH machine, but living without Flameshot is unthinkable! :wink: :+1:

py-crash commented 4 weeks ago

Setting the variable XDG_CURRENT_DESKTOP will also not help:

$ XDG_CURRENT_DESKTOP=COSMIC  flameshot
QSocketNotifier: Can only be used with threads started with QThread
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()
chaimite commented 1 week ago

+1 to fix this on cosmic

GetPsyched commented 4 days ago

Flameshot works fine on COSMIC for me. The only thing that's borked for me is #2848, which seems to be independent of COSMIC.

Flameshot v12.1.0 (-)
Compiled with Qt 5.15.14

Maybe trying newer versions of COSMIC could help? Idk, I'm new to COSMIC too.

nevdelap commented 4 days ago

I've got the same version of Flameshot and Qt as you and I've updated to the lastest cosmic by removing the version from the Arch repos and installing cosmic-session-git from the AUR. Unfortunately for me it's not working.

10:23:49 zen ~ flameshot
QSocketNotifier: Can only be used with threads started with QThread
10:24:11 zen ~ flameshot gui
QSocketNotifier: Can only be used with threads started with QThread
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()
flameshot: info: Screenshot aborted.
10:24:13 zen ~

Clicking Take Screenshot in the Flameshot system tray applet's menu...

image

GetPsyched commented 4 days ago

NGL, if the error is this flakey, it seems like a bug in COSMIC than in Flameshot? But I don't know the internals of either software. Would be better if a maintainer commented here.