Flameshot: Flameshot not launching when using Wayland

Created on 16 Dec 2019  Â·  27Comments  Â·  Source: flameshot-org/flameshot

Flameshot version
0.6.0-9(Debian)

Describe the bug
The commands flameshot gui or flameshot config doesn't do anything.

To Reproduce
I am using the sway (swaywm) window manager on Wayland.

Expected behavior
It should open properly.

System Information
Ubuntu 19.04

Bug Linux Wayland

Most helpful comment

The bug is still present on master

All 27 comments

Try run flameshot as QT_QPA_PLATFORM=wayland-egl flameshot
Also, try to install waybar, which support (partially) tray, so you can see wether flameshot is running

Also, related to wayland based WM https://github.com/lupoDharkael/flameshot/issues/619
Currently, seems that flameshot does not support capturing screen under wayland.
So, even if you can run it, you can't do anything

15:00:41 vrein@tokk:~| QT_QPA_PLATFORM=wayland-egl flameshot
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
15:00:46 vrein@tokk:~| flameshot -v
Flameshot v0.6.0
Compiled with Qt 5.12.1
.....
Updated flameshot behind the scene
.....
15:00:56 vrein@tokk:~| QT_QPA_PLATFORM=wayland-egl flameshot
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
15:02:57 vrein@tokk:~| flameshot -v
Flameshot v0.6.0-70-g91ba28c
Compiled with Qt 5.13.2

You can make all your QT apps use XWayland:
export QT_QPA_PLATFORM=xcb
Add this to /etc/profile file, then restart.

With Fedora 32 I can only get the Flameshot icon to appear in the tray if I start it using

QT_QPA_PLATFORM=xcb flameshot

Whats the point in starting flameshot in xwayland? You then can only screen up xorg apps, not pure wayland stuff.

@Tids we should be able to.

export QT_QPA_PLATFORM=xcb flameshot

This works, but this isn't possible set in installation?

@ZetaoYang is this still a valid issue considering the recent changes?

Yeah, I use ArchLinux, I believe it is with the latest versions and it is not working yet

@joaoeudes7 I probably know what is happening. the same thing happens with the current flameshot-git AUR. When you run flameshot gui or any other argument of flameshot, the main application does not get launched. To bypass this while we are investigating this follow:

https://github.com/flameshot-org/flameshot/issues/790#issuecomment-687416350

This is something that has been reported numerous times and perhaps @ZetaoYang or @borgmanJeremy have some idea on how to address this.

@mmahmoudian So I tried ( flameshot & ) && flameshot gui and it launched flameshot, but it just show the notification Unable to capture screen whenever I try to take a screenshot. I'm using Sway and Arch Linux

@pengux I'm so confused, it opened but throw an error? can you post a screenshot (or take a photo with your phone)?

Yes, here's a screenshot. Is there a debug flag to get debug logs when launching flameshot?

image

@mmahmoudian here some logs for @pengux screenshot:

| QT_QPA_PLATFORM=wayland flameshot
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()

1) I started flameshot from cli on sway
2) Flameshot icon appeared in the tray
3) On click on flameshot tray icon - I got same notifications as above
(actually I clicked 3 times, so there is 3 messages in terminal)

WM: sway
OS: Arch Linux
| flameshot -v
Flameshot v0.8.0
Compiled with Qt 5.15.0

@mmahmoudian I confirm this is a bug, when I used flameshot on Fedora 32 Gnome with Wayland, this issue appears.But on Fedora 31 with Wayland, it can start normally .

I can confirm this with sway on arch. Thanks for clarifying, It seems to work okay with KDE on Wayland.

Edit: I intend to look into this, just want to confirm it took a very specific setup to create.

Using package flameshort-git works, but flameshort not.
https://www.archlinux.org/packages/community/x86_64/flameshot/

Thank you for your attention and commitment to the project

@joaoeudes7 what is your DE?
I'm still can not capture screenshot on sway (latest commit build a892766)

@joaoeudes7 what is your DE?
I'm still can not capture screenshot on sway (latest commit build a892766)

Operating System: Arch Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.73.0
Qt Version: 5.15.0
Kernel Version: 5.8.7-arch1-1
OS Type: 64-bit

image
Arch Linux
Sway

@DjinNO Please report the Flameshot version (or the commit you built if from) and format (in case you use AppImage or Flatpak)

@mmahmoudian Now i'm using v0.8.0 from AUR

The bug is still present on master

Ubuntu 20.04 - GNOME 3.36.4 - Wayland - Flameshot 0.8.1
It was working before with the old 0.6.0 repo version from Ubuntu

image

Excuse me, the version in Ubuntu Software is listed as 0.8.3, but in "About" it is said to be 0.8.1.

@mystiquewolf can you open a seperate issue for the version number mismatch so I don't clutter this one with questions?

Flameshot 0.8.5, compiled with Qt 5.15.1, from AUR flameshot-git with debug and !strip options on the following system:

Operating System: Arch Linux
KDE Plasma Version: 5.20.0
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Kernel Version: 5.8.14-arch1-1
OS Type: 64-bit
Processors: 8 × Intel® Core™ i5-8250U CPU @ 1.60GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620

on Wayland, i can get the config and about pages, as well as the launcher, but I cannot use the overlay ($ flameshot gui ) nor can I use the launcher. gdb states the following when I attempt to take a full screenshot from the launcher (region causes the window to flicker and I hover over the screenshot button for a few seconds):

$ gdb -ex=r /usr/bin/flameshot
Reading symbols from /usr/bin/flameshot...
Starting program: /usr/bin/flameshot
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
[New Thread 0x7ffff147b640 (LWP 15761)]
[Detaching after fork from child process 15762]
[New Thread 0x7fffe2488640 (LWP 15799)]
[New Thread 0x7fffe1c87640 (LWP 15800)]
[New Thread 0x7fffe1486640 (LWP 15801)]
[New Thread 0x7fffe0c85640 (LWP 15802)]
qt.qpa.wayland: Wayland does not support QWindow::requestActivate()
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
QPixmap::scaled: Pixmap is a null pixmap
[Detaching after fork from child process 16104]
kf.kio.core: We got some errors while running testparm "Weak crypto is allowed"
[Detaching after fork from child process 16105]

Annoyingly, I use screenshots infrequently enough that I can't be certain when this last worked.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bingoIsCoder picture bingoIsCoder  Â·  4Comments

ElijahLynn picture ElijahLynn  Â·  3Comments

borgmanJeremy picture borgmanJeremy  Â·  3Comments

soundsbeard picture soundsbeard  Â·  4Comments

kylewill picture kylewill  Â·  4Comments