env variables provided by app launcher
Darren Landoll
darren.landoll at gmail.com
Tue Nov 10 22:13:11 UTC 2015
Ok, it looks like the issue was related to me starting the app with sudo.
After a restart and starting from a clean slate, the /tmp directory is
working fine.
Also, I'm wondering if there is currently a way to initialize the
SNAP_APP_DATA_PATH with default files provided by the snap?
On Mon, Nov 9, 2015 at 10:07 AM Jamie Strandboge <jamie at canonical.com>
wrote:
> 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/
>
> --
> snappy-app-devel mailing list
> snappy-app-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/snappy-app-devel
>
--
Darren
Sent from my mobile.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snappy-app-devel/attachments/20151110/4878a4b9/attachment.html>
More information about the snappy-app-devel
mailing list