I am working on getting an app I’m building called Amaria published to snapcraft. For reference the code for it can be found here: https://github.com/jonathanhope/armaria.
The app is a bookmarks manager that stores the bookmarks 100% locally by utilizing SQLite database. One of the goals of this app is to have many different interfaces into the bookmarks database including browsers. The only way that browser extensions can interact with the file system is something called native messaging hosts. The host itself is installed with the snap, but in order for the extension to communicate with the snap an app manifest needs to be installed.
They need to be installed into a particular directory. Documentation about the Firefox directory is here: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_manifests. I have defined two plugs that allow the CLI component to install the app manifest for Chrome and Firefox. The idea is that if someone wants to use Armaria + Firefox they would connect the plug for the .mozilla/native-messaging-hosts and then use the CLI itself to add the JSON file. The process for Chrome would be similar.
Consequently I am requesting access to the personal files interface for the armaria snap.
I really like the concept behind armaria, it looks pretty cool to me.
If I understood it correctly, you are requesting write access to .mozilla/native-messaging-hosts and .config/google-chrome/NativeMessagingHosts for armaria via manually connecting the required personal-files interfaces.
Write access to dot-folders is very sensitive/powerful and we must be very cautious to grant it, especially when the directory don’t clearly belong to the snap. However, in this situation, considering that you are requesting manual connection and the requested directories seem to be intended to be filled by third-party applications like armaria I’ll give a +1.
Note: if you can know the name of the file beforehand (i.e. .mozilla/native-messaging-hosts/armaria.json it will be better to narrow the scope of the personal files interface)
That was my original plan. However when I was testing in fresh VMs I found that those folders might not exist. So the CLI has to to effectively do a mkdir -p for those folders before it writes the app manifest out.
Thanks for taking a look. All of the information in your post is correct.
+1 from me as well for the manual connection of the personal-files interface for armaria.
Correct me if I looked at the wrong revision of the snapcraft.yaml, but it would also be good to update the personal-files plug instance names with the formatting mentioned in the https://snapcraft.io/docs/personal-files-interface page.
thanks @intheflatfield , the revision looks good. Just one small change on icon field, it does not need to be specified in the yaml file. You can place icon in meta/gui/icon.png and it will get picked automatically.
If you can remove the icon field in the yaml file it will be great and pass the review automatically
Regarding the personal-files interface, +2 for, 0 against. Granting manual connect for personal-files interface to this snap. this is now live.