How can I use snap when I don't use /home/$USER?

I have some ideas but it’s a technical idea and I’m not sure the usability would be just right.

The technical idea is that whatever your home directory is, it would be mapped to a fixed base inside the execution environment. It could be the new /var/home that is now also used by some other systems.

Snapd could make sure that the user’s real home directory is mapped there on startup. We could further manipulate gecos data to make it appear that $HOME is /var/home/$LOGNAME - regardless of the real location.

The question is: is this discoverable? Perhaps. One advantage is that due to alignment with other systems we might just end up with this working seamlessly. If Gtk and Qt both learn to understand this concept it would be the best of solutions.

Other solutions that tweak apparmor only work to a certain degree. The principal problem is that we cannot represent arbitrary directory on the host system inside the snap execution environment, while preserving the path perfectly. If your organisation is using /nas or /home/nfs/ or /stuff or whatever else people wish to come up with, we just cannot support that with the technical limitations that we have today.