Datashare is a self-hosted search engine for documents. It allows user to index documents on their own computer, and perform search over the extracted text and metadata.
Since several years we offer this tools through a .deb and Docker image. We would like to use the classic confinement so users can index documents stored in their homedir (Datashare creates a dedicated directory for that).
Datashare is open source and developed by the International Consortium of Investigative Journalists. It the same technology our organization used to run famous investigations like the Pandora Papers or the Panama Papers.
Yes - $HOME is set to $SNAP_USER_DATA so that by default all snaps have somewhere they can write to out-of-the-box - but you can still get the user’s real home via the $SNAP_REAL_HOME environment variable, or just by doing something like: getent passwd "$USER" | cut -d ':' -f 6
just be aware that on devices where the home interface is not auto-connecting, your app will not have any write access and potentially mis-function (there is indeed a reason why $HOME defaults to $SNAP_USER_DATA and not to *_REAL_HOME)