Display an end user license agreement on first start?

I am reading the Terms for the Snap Store and paragraph 6.2. says:

6.2 You will include the applicable licence for your Snap to end users
of your Snap and identify the licence in the Snap information. If you 
require an agreement to be displayed to the end user, you will 
configure your Snap to display it upon the user’s first run of the Snap.

Can I configure this in snapcraft.yaml? I cannot find a fitting key in the reference.

No, you cannot do this via snapcraft.yaml. This is up to you as an application developer to include it in your application or documentation as appropriate.

you can use a command-chain wrapper script and use something like YAD (or kdialog) to display a popup window on first start. here is a snap where i tell the user about the requirement to be in a certain group and connect certain snap interfaces using this way:

Thank you for the swift answers.

@ogra also a nice solution. Out of curiosity, if I wanted to open the browser that is installed on the OS, Firefox in my case, could I do it? Or would I have to ship a browser in my snap? :wink:

My idea: Show popup: “A webpage will now open with the terms”, users clicks ok, and then show website.

You should be able to use xdg-open for this and point somewhere to $SNAP with it, but it will likely be really hard to do this interactively to get any return value from an accept/decline button set in the form.

1 Like