detect video player

Leo Arias leo.arias at
Thu Mar 2 00:31:11 UTC 2017

So, you want to know from the application itself if it's being run
from inside a snap, or not?

I don't know if we have something for that, but it certainly seems to be useful.
You could check if some of the environment variables are set, but
well, of course that can be cheated by exporting the var before
running the application.

ubuntu at juju-07fb34-remote-devel-0:~$ echo $SNAP

ubuntu at juju-07fb34-remote-devel-0:~$ snap run --shell ipfs
ubuntu at juju-07fb34-remote-devel-0:/home/ubuntu$ echo $SNAP

More information about the Snapcraft mailing list