Skip to content
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

Add screenshot portal permission row #728

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PolyMeilex
Copy link

@PolyMeilex PolyMeilex commented Oct 7, 2024

Some apps (like flameshot flameshot-org/flameshot#2868 (comment)) require users to set the screenshot portal permission manually. Flatseal seems like a right place for this dial.

This allows users to revoke previously given permission. (it was previously posible in gnome control center, but having it in one place in Flatseal would be cool too)

image

@tchx84
Copy link
Owner

tchx84 commented Oct 7, 2024

hey @PolyMeilex , I scrolled through that thread and let me see if I understand it... Flameshot can't rely on the regular portal UI because it doesn't have a window?

Some apps (like flameshot flameshot-org/flameshot#2868 (comment)) require users to set the screenshot portal permission manually. Flatseal seems like a right place for this dial.

Unfortunately, I don't think this will work. Preventing this use-case was a very explicit decision.

By "this use-case" I mean having Flatseal creating tables that haven't been initialized by portals themselves by properly interacting with the application. Some of the reasons are:

  • To avoid confusion for how portals work, e.g., an application won't be granted camera access just because somebody set a permissions store value, since it has to be properly implemented in the app first.
  • To limit Flatseal's ability to screw up the permission store.

So, Flatseal can't be used to set a portal that hasn't been used yet.

@PolyMeilex
Copy link
Author

Flameshot can't rely on the regular portal UI because it doesn't have a window?

As far as I understand, GNOME portal requires the app window to have focus for the permission dialog to spawn. (and Flameshot appears to not have a typical toplevel window at all)

I don't care about this that much tho, just thought that it might be one of the uses, if it's not, that's fine as well.

I'm still interested in using Flatseal to revoke previously given screenshot permissions tho, any ideas why Flatseal allows me to set this permission for apps that never called the portal? (Same thing happens with Notification/Background permissions)

@Arcitec
Copy link

Arcitec commented Nov 19, 2024

This is something that either GNOME or Flameshot has to fix.

The problem is that Flameshot attempts to use the screenshot portal while Flameshot doesn't have any application window. This suppresses the permission popup dialog on GNOME.

So Flameshot should implement code to generate a GUI window and ask for permission once. They could add a button to their config GUI window when they detect being run inside a Flatpak, for example. Or they may even be able to query Flatpak to see if they have the permission, and if not, generate a GUI window which then asks for the permission.

Either way, I agree that Flatseal should not be writing permissions that apps didn't register for!

Edit: But I agree with the previous comment that it would be good if Flatseal can detect and offer a way to REVOKE the Screenshot permission.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants