You are not logged in.
Dear all
When I run "flameshot config" it works, but "flameshot gui" gives me
$ 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
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
flameshot: info: Screenshot aborted.
I am using Wayland/Sway.
Any ideas what is going on?
Hugs,
Sandra
Last edited by LittleSandra (2023-04-04 12:21:26)
Offline
Tried the hint?
XDG_CURRENT_DESKTOP=Sway flameshot gui
you probably generally want to set that environment variable when starting sway
Online
Offline
Tried the hint?
XDG_CURRENT_DESKTOP=Sway flameshot gui
you probably generally want to set that environment variable when starting sway
That doesn't give a GUI either.
I have followed this howto
https://github.com/flameshot-org/flames … support.md
sudo pacman -S xdg-desktop-portal xdg-desktop-portal-wlr grim flameshot
and I start Sway from .bash_profile
# https://wiki.archlinux.org/title/Xinit#Autostart_X_at_login
if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
# https://github.com/flameshot-org/flameshot/blob/master/docs/Sway%20and%20wlroots%20support.md
export SDL_VIDEODRIVER=wayland
export _JAVA_AWT_WM_NONREPARENTING=1
export QT_QPA_PLATFORM=wayland
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
exec sway > ~/.sway.log 2>&1
fi
And I have the following in Sway config
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
Are there any debugging I can enable?
Last edited by LittleSandra (2023-04-04 11:34:04)
Offline
If I try that I get
[a@t470s ~]$ ↳ dbus-monitor --session sender=org.freedesktop.portal.Desktop destination=org.freedesktop.portal.Desktop
bash: ↳: command not found
[a@t470s ~]$ dbus-monitor --session sender=org.freedesktop.portal.Desktop destination=org.freedesktop.portal.Desktop
signal time=1680608459.857518 sender=org.freedesktop.DBus -> destination=:1.55 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
string ":1.55"
signal time=1680608459.857572 sender=org.freedesktop.DBus -> destination=:1.55 serial=4 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameLost
string ":1.55"
method call time=1680608469.304538 sender=:1.58 -> destination=org.freedesktop.portal.Desktop serial=2 path=/org/freedesktop/portal/desktop; interface=org.freedesktop.DBus.Properties; member=Get
string "org.freedesktop.portal.Screenshot"
string "version"
error time=1680608469.304684 sender=:1.15 -> destination=:1.58 error_name=org.freedesktop.DBus.Error.InvalidArgs reply_serial=2
string "No such interface “org.freedesktop.portal.Screenshot”"
Offline
I solved it by downgrading to "xdg-desktop-portal 1.14.6-1".
I also
sudo pacman -S xdg-desktop-portal-gtk
and added
QT_QPA_PLATFORM=wayland
XDG_CURRENT_DESKTOP=sway
to "/etc/environment", but that might not be needed.
Offline
I solved it by downgrading to "xdg-desktop-portal 1.14.6-1".
That version is over 8 months old; how did you figure out this was needed? Is the rest of your system up to date? Are you sure this solved the issue, and not the other actions you took?
Offline
I can confirm downgrading xdg-desktop-portal to 1.14.6-1 is a known fix for this issue, despite 1.14.6-1 being a bit long in the tooth. It was anticipated that 1.16.0 would resolve this issue, but the consensus is it did not. The relevant discussion is here: https://github.com/flameshot-org/flameshot/issues/2872
and added
QT_QPA_PLATFORM=wayland XDG_CURRENT_DESKTOP=sway
to "/etc/environment", but that might not be needed.
These variables are needed, but you can avoid explicitly setting them in /etc/environment by setting up a wrapper script to launch Sway, such as described in the greetd wiki: https://man.sr.ht/~kennylevinsen/greetd … ypewayland
Using greetd is obviously not needed, you can use a wrapper script for launching Sway with any method.
Offline