Checks to see whether we are running within a snap, and if so return the real home directory for the current user.
Checks whether we are running within a snap
Directory where the snap is mounted. This is where all the files in your snap are visible in the filesystem.
All of the data in the snap is read-only and cannot be changed.
CPU architecture of the running system.
Typical value amd64
Directory for system data that is common across revisions of a snap.
This directory is owned and writable by root and is meant to be used by background applications (daemons, services).
Unlike SNAP_DATA
this directory is not backed up and restored across snap refresh and revert operations.
Directory for system data of a snap.
This directory is owned and writable by root and is meant to be used by background applications (daemons, services).
Unlike SNAP_COMMON
this directory is backed up and restored across snap refresh and snap revert operations.
A map of all of the environment variables that start with SNAP_
Instance key if one was set during installation or empty (snapd 2.36+).
For example instance hello-world_foo
has an instance key foo
.
The name of snap instance, including instance key if one is set (snapd 2.36+).
For example snap hello-world
with instance key foo
has instance name equal to hello-world_foo
.
Directory with additional system libraries. This variable is used internally by snapcraft.
The value is always /var/lib/snapd/lib/gl:
Please note the colon at the end of that value,
the variable is a colon-separated list.
The name of the snap as specified in the snapcraft.yaml
file.
Revision of the snap, as allocated by the Snap Store on upload or as allocated by snapd for locally installed snaps.
The Snap Store assigns monotonic revisions to each upload of a given snap.
Snapd uses Snap Store revisions if accompanying assertions are available or uses a locally generated number.
Locally generated numbers are prefixed with x
to distinguish them from Snap Store uploads.
This variable is only exposed on
Ubuntu Core systems, and
was introduced with snapd 2.57. It points to a snap-specific location on the ubuntu-save partition where the snap
is allowed to store persistent files (like certificates or configuration files) that will survive a
factory reset of the Ubuntu Core device.
Directory for user data that is common across revisions of a snap. Unlike SNAP_DATA
, data present in this
directory is not backed up or restored across snap refresh and snap revert operations. The directory is suitable for
large data that the application can access even if it was made or modified by a future version of a snap.
Directory for user data.
This directory is backed up and restored across snap refresh
and snap revert
operations.
Typical value: /home/zyga/snap/hello-world/27
The version string as specified in the snapcraft.yaml