Where to save stuff (in snap-agnostic way)
Seth Arnold
seth.arnold at canonical.com
Sat Feb 4 02:40:24 UTC 2017
On Sat, Feb 04, 2017 at 10:33:20AM +0800, XiaoGuo Liu wrote:
> liuxg at liuxg:~/snappy/desktop/ss$ hello.env | grep XDG_RUNTIME
> XDG_RUNTIME_DIR=/run/user/1000/snap.hello
> $ sudo snap run --shell hello.env
> # env | grep XDG_RUNTIME_DIR
> XDG_RUNTIME_DIR=/run/user/0/snap.hello
Your first command was run as a standard user, probably the first user
installed on the system, since it is user 1000.
Your second command was run as root via the sudo tool, thus you get a
different directory. Every user's data should be stored in a place where
it won't collide with other users, and root is no different in this case.
Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170203/4d157af7/attachment.sig>
More information about the Snapcraft
mailing list