Where to save stuff (in snap-agnostic way)
XiaoGuo Liu
xiaoguo.liu at canonical.com
Sat Feb 4 02:33:20 UTC 2017
Hi,
I just tried it with my helloworld snap example. It shows:
liuxg at liuxg:~/snappy/desktop/ss$ hello.env | grep XDG_RUNTIME
XDG_RUNTIME_DIR=/run/user/1000/snap.hello
When I tried to run it with:
$ sudo snap run --shell hello.env
Inside the shell, I find different variable for XDG_RUNTIME_DIR:
# env | grep XDG_RUNTIME_DIR
XDG_RUNTIME_DIR=/run/user/0/snap.hello
I tried to create the above named dir /run/user/1000/snap.hello, but it is
not accessible in the shell
Thanks.
On Sat, Feb 4, 2017 at 5:41 AM, Michael Hall <mhall119 at ubuntu.com> wrote:
> Be sure to use XDG_RUNTIME_DIR and not '/var/run' specifically, as
> XDG_RUNTIME_DIR is /run/user/<userid>/snap.<snapname>/ in a snap's
> runtime. You may also need to create that directory before using it.
>
> Michael Hall
> mhall119 at ubuntu.com
>
> On 02/03/2017 04:19 PM, Christian Dywan wrote:
> > Hey Luca,
> >
> > I'll suggest XDG_RUNTIME_DIR i.e. /var/run
> >
> > Regards,
> > Cris
> >
> > Am 3. Februar 2017 21:04:19 MEZ schrieb Luca Dionisi
> > <luca.dionisi at gmail.com>:
> >
> > What is the best place to write (and read) a temporary FIFO file from
> > a confined snap application?
> > This is for simple IPC between 2 processes of the same snap.
> > Before attempting to snap the application I was using a fixed
> filename
> > in /tmp. Admittedly poor solution.
> > The solution should be usable also with another packaging system.
> >
> > --Luca
> >
> > P.S. the problem with Vala library has been solved and I was able to
> > make the snap work in devmode. Now I am trying to move from devmode
> to
> > strict.
> >
> >
> > --
> > Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail
> > gesendet.
> >
> >
>
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>
--
XiaoGuo, Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170204/4c709b26/attachment.html>
More information about the Snapcraft
mailing list