env variables provided by app launcher

Jamie Strandboge jamie at canonical.com
Mon Nov 9 15:06:41 UTC 2015


On 11/09/2015 05:51 AM, Darren Landoll wrote:
> I'm trying to use the SNAP_APP_TMPDIR and SNAP_APP_DATA_PATH
> environment variables to store data for my application. After some
> initial testing with SNAP_APP_TMPDIR, it appears to be set to "/tmp"
> at runtime despite the launcher script setting it to the app specific
> path under "/tmp/..." and the app is unable to write data.
> 
> Is this a known issue or could I be doing something wrong? I've been
> running the app with sudo, not sure if that would make any difference
> or not.
> 
At first, TMPDIR (and SNAP_APP_TMPDIR) was set to an app-specific directory and
snaps had to honor this variable. It was found that far too many applications
still do not honor TMPDIR and so instead the launcher now sets up a private
mount namespace for the app, then bind mounts an app-specific directory on /tmp.

In short, "/tmp" is the correct setting for the environment variable. Do note
this bug though:
https://bugs.launchpad.net/snappy/+bug/1473218

-- 
Jamie Strandboge                 http://www.ubuntu.com/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20151109/79611814/attachment.pgp>


More information about the snappy-app-devel mailing list