I have made a snap version for my program, but it cannot read from my ~/config.ini config file, only can read configuration from environment variables . The ~/config.ini file content should be modified by our users .
So how can I read the config file work from the snap binary ?
If this path is actually correct ( ~/config.ini, no dot…) you can definitely use the home interface for your app.
That said, you should really use the $SNAP_USER_DATA dir for this instead (automatically pointing to ~/snap/<snapname>/current/) and teach your application to store its config there. This will work without any interfaces.
Hi, you mean that for the snap app , ~/config.ini is the ~/snap/<snap_app_name>/current/config.ini ,right ? But I cannot modify the ~/snap//current/config.ini, because it’s a readonly file system. I want the config.ini can be modified by user accoring to their own AccoutID and password.
@ogra I have been waiting for the Go compiler rebase in CentOS 7.4 before trying again. CentOS 7.4 comes with golang 1.8.3 as opposed to golang 1.6.3 in CentOS 7.3.
There’s also a few other things I was waiting for before trying again, but the Go compiler was the biggest one.