Bug 427851 - GIMP internal screenshot tool broken by 5.20 release
Summary: GIMP internal screenshot tool broken by 5.20 release
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 5.20.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL: https://gitlab.gnome.org/GNOME/gimp/-...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2020-10-17 06:30 UTC by Adam Fontenot
Modified: 2022-09-08 15:46 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Fontenot 2020-10-17 06:30:49 UTC
DESCRIPTION

GIMP has a built in screenshot tool. File > Create > Screenshot.

This tool worked as of 5.19.5, but now fails with an error. (Both with X, Wayland not tested.)

Execution error for 'Screenshot':
GDBus.Error:org.kde.kwin.Screenshot.Error.NoAuthorized: The process is not authorized to take a screenshot

It looks like a feature was added to provide more security around screenshots (although, I'm not sure what the point is on X - anything that doesn't play nice and use KWin's DBUS method still works find, scrot for example).

I can't find anything in systemsettings to allow other programs to take screenshots, so (IMO) this security feature should be disabled until some way to manage them is provided.

SOFTWARE/OS VERSIONS
Linux: Arch Linux 5.9.0-arch1-1
KDE Plasma Version: 5.20.0 (X)
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Comment 1 Jonathan Liu 2020-10-21 05:49:25 UTC
Arch Linux bug report: https://bugs.archlinux.org/task/68311
GIMP issue: https://gitlab.gnome.org/GNOME/gimp/-/issues/5785
Comment 2 Adam Fontenot 2020-10-21 21:09:31 UTC
Thanks for the confirmation.

Just want to note that I think this is something that should probably be fixed in KDE as well, right? It would be weird to just ship every app that might need to take a screenshot with a built-in permission request. Surely what we're moving toward is giving the user control over this, so I think KDE should disable it until it can be controlled from System Settings.
Comment 3 David Edmundson 2020-10-21 21:14:08 UTC
Long term from an app POV what would work now and moving forwards is to call into xdg-desktop-portal instead of kwin directly.

It'll solve this, and be fewer code paths for you (gimp) to maintain.
Comment 4 Nate Graham 2020-10-22 01:27:48 UTC
Is there anything for us in KDE to do here?
Comment 5 Méven Car 2020-10-22 08:50:21 UTC
I am thinking we should add a confirmation dialog when such a feature is requested from an app, and KWin or Plasma would keep the past authorized apps list locally with eventually some apps pre-authorized like spectacle. Similar to what Android does for its authorizations.
We would need first a backend for such apps authorization and then a KCM.
That would be the long term way to go.
Comment 6 Méven Car 2020-10-31 13:55:49 UTC
I would recommend GIMP screenshot tool to use xdg-shell-portal DE independant dbus service.
https://flatpak.github.io/xdg-desktop-portal/portal-docs.html#gdbus-org.freedesktop.portal.Screenshot
Comment 7 Nate Graham 2022-09-08 15:46:58 UTC
Looks like we're not going to fix this on our side, and the recommendation is for GIMP to move to the commonly supported cross-desktop API.