How to give snaps access to /somedir
To my astonishment, it really looks like /home
is hardcoded.
mount-support.c contains:
const struct sc_mount mounts[] = {
{"/dev"}, // because it contains devices on host OS
{"/etc"}, // because that's where /etc/resolv.conf lives, perhaps a bad idea
{"/home"}, // to support /home/*/snap and home interface
...
Wow. That astonishes me. But there you have it.
Edit: See also Launchpad issue 1643706
Just run the app as if it is not a snap \o/
So for example chromium
- Use a menu editor eg. "Main Menu" to add a custom chromium "menu item" (this is what ubuntu uses to find apps when you press super+a) :
- Set Name eg.:
Chromium Unsnapped
- Set Command:
/snap/chromium/current/usr/lib/chromium-browser/chrome --user-data-dir=~/ChrUnsnapped --class="ChrUnsnapped" %U
- Set an icon eg. Download a retro chromium logo
- save/close
- super+a (or Show applications icon at bottom left) find your new item and right-click to add to favorites
<rant>
I am so super frustrated with snap that I can't configure my personal /stf dir like I have been doing for 15 years. Thank goodness for this hack, seems I'm going to have to do this for every freeken snap app :'( .
Yeah I know it is bad, but until there is a whitelist configuration, this seems to be the only way for things to go back to normal. I really don't want to put my stuff in /home, /mnt, /media please don't hate your users.
</rant>