Not able to take screenshots with KDE Plasma 5.20.80

Damir Porobic damir_porobic at live.com
Thu Oct 29 17:17:26 GMT 2020


My application supports, under Wayland, both ways of taking screenshots, the KWin and XDG Portal. Both seem to be broken at the moment but adding X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot to the xdg-desktop-portal-kde desktop file as Jan suggested, seems to fix the XDG Portal screenshots at least.

Do I understand correctly that you will fix this so far that we don't need to manually add entries to the xdg-desktop-portal-kde desktop file?

Also, KWin Screenshots, like done by Spectacle, are not going to be available to non KDE Applications anymore?

Regards,
Damir

________________________________
From: kde-devel <kde-devel-bounces at kde.org> on behalf of Méven <meven29 at gmail.com>
Sent: Thursday, October 29, 2020 18:03
To: Nate Graham <nate at kde.org>
Cc: kde-devel at kde.org <kde-devel at kde.org>
Subject: Re: Not able to take screenshots with KDE Plasma 5.20.80

As it was said, this change was introduced (by me) in :
https://phabricator.kde.org/D29407

It was done for Wayland to replace the past KWin behavior click-to-confirm to take a screenshot while keeping at least a declarative setting.

Le jeu. 29 oct. 2020 à 17:39, Nate Graham <nate at kde.org<mailto:nate at kde.org>> a écrit :
Seems related to https://invent.kde.org/plasma/kwin/-/merge_requests/374.
This patch is to lift the

For Wayland, I recommend using xdg-desktop-portal standard API to use a portable durable standard API.
I am fixing its support in https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/32
I thought it had already been done, sorry for this.

And if this does not fill your need, well, do the same as https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/32 in your application.

But this screenshot API is not meant to last very long, as this is not Wayland worthy security-wise.
This would need better standardisation for instance a Wayland Protocol ideally.

Sorry for caughting you unaware.

Cheers,

Méven

Nate


On 10/27/20 5:25 PM, Damir Porobic wrote:
> Hi Jan,
>
> I have searched for files with that name and found following:
>
> /usr/share/xdg-desktop-portal-kde
> /usr/share/lintian/overrides/xdg-desktop-portal-kde
> /usr/share/doc/xdg-desktop-portal-kde
> /usr/lib/x86_64-linux-gnu/libexec/xdg-desktop-portal-kde
>
> The first and third are directories, the fourth is a library. I've added
> the string you mentioned to the second file and restarted my notebook
> but the behavior seems to be the same. Did you mean a different file
> where I should add the string?
>
> Regards,
> Damir
>
> ------------------------------------------------------------------------
> *From:* kde-devel <kde-devel-bounces at kde.org<mailto:kde-devel-bounces at kde.org>> on behalf of Jan Grulich
> <jgrulich at redhat.com<mailto:jgrulich at redhat.com>>
> *Sent:* Monday, October 19, 2020 07:34
> *To:* kde-devel at kde.org<mailto:kde-devel at kde.org> <kde-devel at kde.org<mailto:kde-devel at kde.org>>
> *Subject:* Re: Not able to take screenshots with KDE Plasma 5.20.80
> Hi,
>
> can you try to add
> "X-KDE-DBUS-Restricted-Interfaces=org.kde.kwin.Screenshot" into the
> xdg-desktop-portal-kde desktop file and restart it?
>
> Regards,
> Jan
>
> ne 18. 10. 2020 v 22:50 odesílatel Damir Porobic <damir_porobic at live.com<mailto:damir_porobic at live.com>
> <mailto:damir_porobic at live.com<mailto:damir_porobic at live.com>>> napsal:
>
>     Hello,
>
>     anyone any feedback on this one? Kind of breaks all non KDE
>     Screenshot tools under Wayland.
>     Would be nice to know if this is by error or some additional steps
>     are required now.
>
>     Best regards,
>     Damir
>
>     ------------------------------------------------------------------------
>     *From:* Damir Porobic <damir_porobic at live.com<mailto:damir_porobic at live.com>
>     <mailto:damir_porobic at live.com<mailto:damir_porobic at live.com>>>
>     *Sent:* Wednesday, October 14, 2020 21:34
>     *To:* kde-devel at kde.org<mailto:kde-devel at kde.org> <mailto:kde-devel at kde.org<mailto:kde-devel at kde.org>>
>     <kde-devel at kde.org<mailto:kde-devel at kde.org> <mailto:kde-devel at kde.org<mailto:kde-devel at kde.org>>>
>     *Subject:* Re: Not able to take screenshots with KDE Plasma 5.20.80
>     Seems to be related to this change here
>     https://phabricator.kde.org/D29407 <https://phabricator.kde.org/D29407>
>
>     Also, I see the same error when using
>     org.freedesktop.portal.Screenshot which requires already
>     confirmation by default so I'm bit confused why both, authorization
>     and confirmation? Also, looking quickly through the discussion I
>     haven't found any clue how a non KDE application could get access to
>     those screenshot interfaces.
>
>     Best regards,
>     Damir
>     ------------------------------------------------------------------------
>     *From:* kde-devel <kde-devel-bounces at kde.org<mailto:kde-devel-bounces at kde.org>
>     <mailto:kde-devel-bounces at kde.org<mailto:kde-devel-bounces at kde.org>>> on behalf of Damir Porobic
>     <damir_porobic at live.com<mailto:damir_porobic at live.com> <mailto:damir_porobic at live.com<mailto:damir_porobic at live.com>>>
>     *Sent:* Wednesday, October 14, 2020 21:22
>     *To:* kde-devel at kde.org<mailto:kde-devel at kde.org> <mailto:kde-devel at kde.org<mailto:kde-devel at kde.org>>
>     <kde-devel at kde.org<mailto:kde-devel at kde.org> <mailto:kde-devel at kde.org<mailto:kde-devel at kde.org>>>
>     *Subject:* Not able to take screenshots with KDE Plasma 5.20.80
>     Hello,
>
>     one of my users informed me that he's not able to take screenshots
>     with KDE Plasma Wayland anymore. I've just tested myself, with
>     Plasma 5.19.5 everything is working, with Plasma 5.20.80, it's not.
>     My application supports two ways of taking screenshots under KDE
>     Plasma, one is using "org.kde.kwin.Screenshot" like Spectacle and
>     the other is using "org.freedesktop.portal.Screenshot". Interesting
>     is that both stopped working with 5.20.80 but Spectacle seems to be
>     able to take screenshot still. My imageGrabber that uses
>     "org.kde.kwin.Screenshot" is basically a copy of Spectacles
>     imageGrabber, so I'm wondering why it works for Spectacle and not
>     for my application.
>
>     Looking at the dbus-monitor sessions, I've notices an error saying:
>     error_name=org.kde.kwin.Screenshot.Error.NoAuthorized
>     reply_serial=32 string "The process is not authorized to take a
>     screenshot"
>
>     That's something new. How can a process be authorized to take
>     screenshots?
>
>     Regards,
>     Damir
>
>
>
> --
>
> Jan Grulich,
>
> Senior Software Engineer, Desktop Team
>
> Red Hat
>



--
Méven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20201029/908ad191/attachment.htm>


More information about the kde-devel mailing list