-
-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Critical: Invalid reply from DBus: Screenshot is not allowed #727
Comments
Thanks for reporting. Is this broken with Gnome 41? Was it working with earlier version? |
Yes, this was working at some point in Fedora 34, |
I'll have a look into it when I find some time. Similar issue with KDE, a DBus call that was working stopped working with a never version, they're allowing it only for they own applications. |
Hi, your best bet will be to go through xdg-desktop-portal. This way you will make sure it works for both KDE and GNOME, while using just one API. Benefit of this is that this will also work as Flatpak or SNAP. Here is example how this API is used. |
@grulja We support that already but it's not the default for Wayland, you have to enable it through settings (this option is not grayed out when you're using wayland). My problem with the xdg-desktop-portal is that it's not consistent, it looks and behaves different on KDE, GNOME and Sway. What annoys me the most is that requirement of additional confirmations, you want to take a quick screenshot and have to push a button to start the screenshot process, wait for the popup window to show up, then select what screenshot type you want, then select a region, than confirm again. It's just not practical. |
In that case this https://invent.kde.org/ballogy/spectacle/-/blob/master/desktop/org.kde.spectacle.desktop.cmake#L164 is what you need for direct screenshot to work. |
You can see xdg-desktop-portal-kde has the same thing. |
This can be added to ksnip's desktop file and would allow us using the same dbus calls as Spectacle? |
Yes. At least as of now there is no control in KWin with list of applications where this should be allowed so it should work just fine. |
That's nice, thank you for that hint, will add it tonight to the next patch. |
It looks like this is the way to go now. Gnome has disabled access to this DBus interface for not whitelisted application and whitelisted are only Gnome's applications. This is the current state of Wayland development, stuff gets disabled without a solution for the majority of users, usability seems to be irrelevant for them. The merge request that brought the change: https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1970 What I can try to do is add some check that checks if we are running Gnome Version >= 41 and in that case use by default the Portal screenshots. |
Here the feature request to change the portal behavior so it allows only asking once for screenshot permission and allows requesting specific type of screenshot. flatpak/xdg-desktop-portal#649 |
The xdg-desktop-portal screenshots are going to be enforced now for Gnome 41, I'm quite sure that the users are not going to like it but there is nothing we can do about it as long as Gnome developers don't allow us access to the DBus interface that they use for Gnome's own screenshot tools. Either don't use Wayland or convince the portal and Gnome developers to improve the usability. I've added a comments in the Readme Wayland section. Nothing to do here for us anymore. |
Thank you for researching the issue.
Will this be implemented? |
Let's hope that this gets enough attention. KDE Plasma btw has allowed setting a property in the desktop file that allows still accessing the private API for screenshots.
That should be implemented already, you can test it with the continuous build. |
Thank you, tested, it works as expected. |
ksnip-1.9.1-1.fc35.x86_64
From About ksnip/Version:
Ksnip is unable to capture any screenshots.
When I select something from the New combobox,
the ksnip window quickly jumps around the screen a little
and end up in a position very close to its original position.
No screenshot is captured.
If I try to capture a rectangular area,
ksnip lets me to choose the area,
but no screenshot is captured.
Starting ksnip from the command line,
I am able to get some logs.
Apart from some warnings about missing translations,
the only log entries are one row like this
for each attempted screenshot:
Notes about Fedora's configuration:
The desktop environment is Gnome 41.0.
Wayland is in use.
Qt by default falls back to XWayland,
but this has been overridden in Fedora:
Qt Wayland By Default On Gnome.
However, the ksnip package reverts the override in this patch.
The text was updated successfully, but these errors were encountered: