Score:0

Is there an equivalent snap command to the Flatpak's `permission-show` and `permission-set`?

cn flag

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?

24601 avatar
in flag
Does this answer your question? [How can Snap permissions be viewed and modified?](https://askubuntu.com/questions/1206951/how-can-snap-permissions-be-viewed-and-modified)
cyfex avatar
cn flag
@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'.
Score:1
lb flag

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.

Score:0
cn flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.