flameshot-org / flameshot

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

Cannot take screenshot on gnome 41 + wayland #1910

Closed tim-hm closed 3 years ago

tim-hm commented 3 years ago

Flameshot version Flameshot v0.10.1 (d1428889) Compiled with Qt 5.15.2

Describe the bug When running flameshot gui on gnome 41 + wayland nothing happens.

Output from running dbus-monitor --session sender=org.flameshot.Flameshot is here

To Reproduce Install gnome 41 + wayland + Arch + flameshot, and then run flameshot gui in terminal

Expected behavior The on screen gui should launch to take a screenshot

System Information

$neofetch --stdout
OS: Arch Linux x86_64
Host: Z390 AORUS PRO WIFI
Kernel: 5.14.6-zen1-1-zen
Uptime: 19 mins
Packages: 1160 (pacman), 4 (flatpak)
Shell: fish 3.3.1
Resolution: 3840x2160
DE: GNOME 41.0
WM: Mutter
WM Theme: Adwaita
Theme: Adwaita-dark [GTK2/3]
Icons: Adwaita [GTK2/3]
Terminal: tmux
CPU: Intel i9-9900K (16) @ 5.000GHz
GPU: AMD ATI Radeon RX 470/480/570/570X/580/580X/590
Memory: 13319MiB / 64246MiB
karshPrime commented 2 years ago

I've tried to run a few other screenshot utilities, like: Shutter, maim and xfce4-screenshooter, and can confirm this is a Gnome issue and not flameshot issue.

Maxzor commented 2 years ago

TL;DR, this is a complex topic regarding modern Gnome-shell, no one did a good job so far at reducing the complexity for the audience.

Can you please dear Flameshot developers try to sum up what is the issue with flameshot on gnome 41 wayland? I read this thread and it is still not quite clear, even if @mmahmoudian post helps: Did gnome disallow access to DBus for others by default? [yes for a private API] Why in the hell would they do that? [for security] What technical challenges are there, where is this going? [see next paragraph] Flameshot is an awesome piece of software, and seing it work so bad on this setup is sad.

P.S. reading a bit more in this issue at Gnome-shell and this subsequent one at flatpak/xdg-desktop-portal, cannot you store in a gnome-keyring session the DBus authorization from a public gnome-shell API?

mmahmoudian commented 2 years ago

@Maxzor I think I have explained it well enough:

And if you want to read some the Gnome people's response on our repo:

TestingPlant commented 2 years ago

A workaround for the permission prompt is by forking xdg-desktop-portal-gnome and simply removing the dialog. Here's a fork which does this.

Disclaimer: I maintain the above fork, and this solution likely won't work with sandboxing software such as Flatpak.

adamwojt commented 2 years ago

@TestingPlant How to install on Ubuntu ?

karshPrime commented 2 years ago

@TestingPlant How to install on Ubuntu ?

sudo apt-get install flameshot should do it, or just look for flameshot on ubuntu's gui app-store

mmahmoudian commented 2 years ago

@TestingPlant

How to install on Ubuntu ?

Please read this: https://flameshot.org/docs/installation/installation-linux/

TestingPlant commented 2 years ago

@TestingPlant How to install on Ubuntu ?

If you're asking about my fork, I don't support Ubuntu because it'd take a lot of time to backport and test my patch on all of the GNOME versions Ubuntu supports. If you have any more questions, make sure to ask on this issue tracker, not here.