<div dir="ltr">Hi,<div><br></div><div>I just tried it with my helloworld snap example. It shows:</div><div><br></div><div><div>liuxg@liuxg:~/snappy/desktop/<wbr>ss$ hello.env | grep XDG_RUNTIME</div><div>XDG_RUNTIME_DIR=/run/user/<wbr>1000/snap.hello</div></div><div><br></div><div>When I tried to run it with:</div><div><br></div><div><div>$ sudo snap run --shell hello.env</div></div><div><br></div><div>Inside the shell, I find different variable for XDG_RUNTIME_DIR:</div><div><br></div><div><div># env | grep XDG_RUNTIME_DIR</div><div>XDG_RUNTIME_DIR=/run/user/0/snap.hello</div></div><div><br></div><div>I tried to create the above named dir /run/user/<wbr>1000/snap.hello, but it is not accessible in the shell</div><div><br></div><div>Thanks.</div><div><br></div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Feb 4, 2017 at 5:41 AM, Michael Hall <span dir="ltr"><<a href="mailto:mhall119@ubuntu.com" target="_blank">mhall119@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Be sure to use XDG_RUNTIME_DIR and not '/var/run' specifically, as<br>
XDG_RUNTIME_DIR is /run/user/<userid>/snap.<snapn<wbr>ame>/ in a snap's<br>
runtime. You may also need to create that directory before using it.<br>
<span class="gmail-m_112637523164113028HOEnZb"><font color="#888888"><br>
Michael Hall<br>
<a href="mailto:mhall119@ubuntu.com" target="_blank">mhall119@ubuntu.com</a><br>
</font></span><div class="gmail-m_112637523164113028HOEnZb"><div class="gmail-m_112637523164113028h5"><br>
On 02/03/2017 04:19 PM, Christian Dywan wrote:<br>
> Hey Luca,<br>
><br>
> I'll suggest XDG_RUNTIME_DIR i.e. /var/run<br>
><br>
> Regards,<br>
> Cris<br>
><br>
> Am 3. Februar 2017 21:04:19 MEZ schrieb Luca Dionisi<br>
> <<a href="mailto:luca.dionisi@gmail.com" target="_blank">luca.dionisi@gmail.com</a>>:<br>
><br>
> What is the best place to write (and read) a temporary FIFO file from<br>
> a confined snap application?<br>
> This is for simple IPC between 2 processes of the same snap.<br>
> Before attempting to snap the application I was using a fixed filename<br>
> in /tmp. Admittedly poor solution.<br>
> The solution should be usable also with another packaging system.<br>
><br>
> --Luca<br>
><br>
> P.S. the problem with Vala library has been solved and I was able to<br>
> make the snap work in devmode. Now I am trying to move from devmode to<br>
> strict.<br>
><br>
><br>
> --<br>
> Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail<br>
> gesendet.<br>
><br>
><br>
<br>
</div></div><div class="gmail-m_112637523164113028HOEnZb"><div class="gmail-m_112637523164113028h5">--<br>
Snapcraft mailing list<br>
<a href="mailto:Snapcraft@lists.snapcraft.io" target="_blank">Snapcraft@lists.snapcraft.io</a><br>
Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/snapcraft" rel="noreferrer" target="_blank">https://lists.ubuntu.com/mailm<wbr>an/listinfo/snapcraft</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail-m_112637523164113028gmail_signature"><div dir="ltr"><div><div dir="ltr">XiaoGuo, Liu </div></div></div></div>
</div></div>