flameshot-org / flameshot

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

[KWin Wayland] flameshot doesn't start when $XDG_PICTURES_DIR is invalid #3791

Open oficsu opened 2 days ago

oficsu commented 2 days ago

Flameshot Version

Flameshot v12.1.0 (-) Compiled with Qt 5.15.14 (From Manjaro repository)

Installation Type

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

Operating System type and version

Manjaro, Debian 12

Description

In contrast to KDE Xorg session or GNOME Wayland session, flameshot can't capture screen in KDE Wayland session if XDG_PICTURES_DIR is invalid

Steps to reproduce

  1. Open ~/.config/user-dirs.dirs;
  2. set XDG_PICTURES_DIR to "$HOME/DOES_NOT_EXIST" (or even /var/empty);
  3. save the file;
  4. run flameshot gui (it won't run):
    flameshot: error: Unable to capture screen
    flameshot: error: Unable to capture screen
    flameshot: info: Screenshot aborted.

Screenshots or screen recordings

No response

System Information

KDE Plasma Version: 6.1.5 KDE Frameworks Version: 6.6.0 xdg-desktop-portal-kde: 6.1.5-1.0 kwin_wayland: 6.1.5

oficsu commented 2 days ago

It is also worth noting that if XDG_PICTURES_DIR points to a valid directory containing images, flameshot will read them on startup (according to strace). Is this behavior intended?