Where to save stuff (in snap-agnostic way)

XiaoGuo Liu xiaoguo.liu at canonical.com
Sun Feb 5 00:19:39 UTC 2017


Sorry,

I just found that each snap has its own "tmp" directory created in the /tmp
directory of the system. I just created a file, and it looks like:

root at liuxg:/tmp/snap.1000_snap.hello.fifo_TovLTW/tmp# ls
anothefile

Thanks & best regards,
XiaoGuo

On Sun, Feb 5, 2017 at 8:04 AM, XiaoGuo Liu <xiaoguo.liu at canonical.com>
wrote:

> Hi Oli,
>
> Does it mean all of the snaps have the same /tmp or each snap has its own
> /tmp? I am a little bit confused about this.
>
> Thanks & best regards,
> XiaoGuo
>
>
>
> On Sat, Feb 4, 2017 at 6:43 PM, Oliver Grawert <ogra at ubuntu.com> wrote:
>
>> hi,
>> Am Freitag, den 03.02.2017, 21:04 +0100 schrieb Luca Dionisi:
>> > 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.
>> >
>> well ... in case of snaps /tmp is a private directory that only your
>> snap can access so it is actually a good place for such stuff ...
>>
>> ... that said ... if you want to use it in other packaging systems
>> where this is not the case it might indeed not be the best choice and
>> using XDG_RUNTIME_DIR might be the better way, as others pointed out.
>>
>> ciao
>>         oli
>> --
>> Snapcraft mailing list
>> Snapcraft at lists.snapcraft.io
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
>> an/listinfo/snapcraft
>>
>>
>
>
> --
> XiaoGuo, Liu
>



-- 
XiaoGuo, Liu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170205/fa0126b4/attachment.html>


More information about the Snapcraft mailing list