Flatpak permissions when developing

My application requires the background permission from Flatpak to run in the background (without a visible window) and the wallpaper permission to change the desktop wallpaper via the XDG portal. When I run my application directly from within Builder, it silently fails to set the wallpaper unless I have previously, explicitly given it permission via the following command:

flatpak permission-set wallpaper wallpaper app.drey.Damask.Devel yes

Similarly, it silently fails to run in the background unless it has been explicitly given the background permission.

I believe these permissions are granted as part of the Flatpak installation process, because if I first export and install a Flatpak bundle of my application, the permissions function as expected. Can I do anything so that development builds running from Builder will include those permissions automatically?

1 Like

I set up VSCode with the Flatpak extension, and it exhibits the same problem. Running the “Flatpak: Build and Run” action successfully builds and runs my app, but it does not set the background permission.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.