0

I am asking, because I have to handle a permission problem with a Firefox webextension and the sandboxed Firefox in Ubuntu 22.04. (See https://github.com/mi-g/vdhcoapp/issues/139)

The solution turns out to be, I have to grant permission for Firefox to use that webextension. But I only find such commands in Flatpak's permission-show and permission-set, which means I have to install Flatpak to modify the permission of a snap application. That's weird.

Is there any permission managing scheme in snap itself? If not, why?

2
  • 1
    Does this answer your question? How can Snap permissions be viewed and modified?
    – graham
    Commented May 4, 2023 at 6:35
  • @graham Thank you for the help, but no, this doesn't answer my question. I have posted an answer which links to a GitHub comment and that guy el-calvera have made an explanation to the necessity of using flatpak when dealing with the permissions about 'Native messaging'.
    – cyfex
    Commented May 9, 2023 at 11:21

2 Answers 2

1

You can set the permission through dbus, the command bellow will set the permissions using the current user session and does not need flatpak installed. There are other methods in also, see documentation.

dbus-send --print-reply \
    --dest=org.freedesktop.impl.portal.PermissionStore \
    /org/freedesktop/impl/portal/PermissionStore \
    org.freedesktop.impl.portal.PermissionStore.SetPermission \
    string:'webextensions' \
    boolean:'true' \
    string:'<your-extension>' \
    string:'snap.firefox' \
    array:string:'yes'

There is no way that I found to set the permissions for the system, this has to be done per session.

0

Thank el-calavera in this link: https://github.com/mi-g/vdhcoapp/issues/139#issuecomment-1535179270 that answers my question.

I will just quote her/his answer here:

"Native messenging in snap is using the xdg-desktop-portal framework which grew out of the flatpak project. This is why permissions are stored in a file called ~/.local/share/flatpak/db/webextensions . Flatpak provides a way to edit this file, snap does not."

That means we have to use flatpak to manage these permissions regarding native messaging.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .