If my program want's to write into /home/user/.local/myapp/somefile, do I have to put home plug in a snapcraft.yaml file or will it write there anyway?

It's not a classic snap, so will the user have to connect after installing the snap?


The home plug won't allow access to dotfiles/directories in the host home directory. However it will be able to access the confined home directory - typically /home/$USER/snap/$SNAP/current.

| improve this answer | |
  • is the plug auto-connected in a 'normal' snap? – lapisdecor Nov 29 '17 at 14:59
  • 2
    The home plug is automatically connected. Although as popey mentioned, you don't need the home plug if you just need to write to $HOME/.hidden-location, but $HOME will actually be pointing to /home/<user>/snap/<snapname>/current. – Kyle Nov 29 '17 at 15:14
  • When I tried this I now get an error when running: no GSettings shemas are installed, also, it tries to write default home/user/subdirectories (but isn't allowed). – lapisdecor Nov 29 '17 at 19:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.