I have my home directory at /z/home/$USER
, instead of at /home/$USER
, so I can have it on ZFS.
This upsets Snap packages to no end. When I try and run them, they say:
Sorry, home directories outside of /home are not currently supported. See https://forum.snapcraft.io/t/11209 for details.
When I go to that URL, I get a workaround, but not one described in sufficient detail to actually implement:
Snapd does currently not support running snaps if the home directory of the user is outside of /home. This is discussed here here.
A workaround is to bind mount the home directory outside /home into /home.
The linked thread degenerates into discussion of what the design for properly supporting arbitrary home directories ought to be, and it is not immediately apparent to me how to implement the described workaround. I tried bind mounting /z/home/$USER
to also appear at /home/$USER
, and telling the Snap that that is my home directory, but my Snap package I want to run is still insisting that my home directory is bad and refusing to run:
$ sudo mkdir /home/$USER
$ sudo chown ${USER}:${USER} /home/$USER
$ sudo mount --bind /z/home/$USER /home/$USER
$ HOME=/home/$USER any-snap-package
Sorry, home directories outside of /home are not currently supported.
See https://forum.snapcraft.io/t/11209 for details.
How, exactly, does one go about implementing the workaround described by Michael Vogt in the linked Snapcraft forum thread? Or does the workaround not actually work?