Universal directories

Hey,
I have recently published a stable package to snapcraft and now I received an email from snapcraft telling me I should update my instructions so that they work more universally on all distributions.

My instructions contain a part about editing a configuration file that can be found at /var/snap/fiduswriter/current/configuration.py on Ubuntu. So basically $SNAP_DATA/configuration.py. It’s a rather complex configuration that cannot easily be converted to the key storage system of snaps. Now my question is: How do I describe the placement of this file in a way that works across linux distributions?

You could resort to telling users to do this:

$ editor `snap run --shell fiduswriter -c 'echo $SNAP_DATA/foo'`
2 Likes

thanks @Saviq ! Maybe I should create a command for that so that I can tell people to run fiduswriter.configure or some such thing?