Privacy & Security does not show screenshot permissions.

Bug #2089814 reported by Juan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
flameshot (Ubuntu)
New
Undecided
Unassigned
gnome-control-center (Ubuntu)
Triaged
Undecided
Unassigned
xdg-desktop-portal (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

When an application requests permission to do an screenshot, a dialog opens that offers the user the possibility of allowing or denying applications the permission, and says the choice will appear under Privacy settings. However this is not the case.

If the permission is denied the first time, this breaks the application, since it can never be granted again.

If the permission is granted, this creates a security risk, since now all applications can access the screen without an easy way to change the user choice.

Steps to reproduce:
- Install an application that request permission to screenshots (e.g. flameshot), and execute it.

![The only way I have found to actually modify the choice is to access the dbus interface though Python code:](https://community.upwork.com/t5/Freelancers/Constantly-asking-for-permission-to-share-screenshot-on-Gnome/m-p/1222388#M731300)
```
import dbus
bus = dbus.SessionBus()
perm = bus.get_object('org.freedesktop.impl.portal.PermissionStore', '/org/freedesktop/impl/portal/PermissionStore')
perm_iface = dbus.Interface(perm, dbus_interface='org.freedesktop.impl.portal.PermissionStore')

perm_iface.Lookup("screenshot", "screenshot")
perm_iface.Set("screenshot", dbus.Boolean(True), "screenshot", {"": ["yes"]}, dbus.Byte(0x00))
perm_iface.Lookup("screenshot", "screenshot")
```

Revision history for this message
Juan (juanep97) wrote :
Juan (juanep97)
affects: ubuntu-docs (Ubuntu) → gnome-shell (Ubuntu)
Revision history for this message
Alessandro Astone (aleasto) wrote :

In which version of Ubuntu are you experiencing this bug?
Are you using flameshot as a deb, snap, flatpak, or other?

I found at least four issues when looking into this, in Ubuntu 24.10 with the flameshot deb:

1. Flameshot doesn't work when started from the application menu.
1.1. When starting flameshot form the terminal, xdg-desktop-portal cannot determine its app_id.

2. Without app_id the portal uses the empty string "" as app_id. That grants permissions to any other program that also does not expose an app_id. This is poorly comunicated in the dialog.

3. gnome-control-center implements a UI for permissions in the Apps page, but there's no entry for unidentified apps.

4. Even if the app was properly identified as org.flameshot.Flameshot, gnome-control-center only shows the Screenshot permission for snaps or flatpaks. This seems wrong, because all apps in Wayland must use the portal to take screenshots.

tags: added: wayland
Changed in gnome-control-center (Ubuntu):
status: New → Triaged
no longer affects: gnome-shell (Ubuntu)
Changed in xdg-desktop-portal (Ubuntu):
status: New → Triaged
Revision history for this message
Juan (juanep97) wrote :

I am using up-to-date Ubuntu 24.04.1 LTS. Flameshot was installed as a deb.

Yes 4), 3), 1) are worrying because the user can not keep track of the permissions granted. If screenshot permission is granted, this opens the possibility to unknown apps to record the screen.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.