Linux mint supports snap packages?

What is the current status of Linux Mint support for snap packages? I tried installing snapd from linux mint repo (I am on Linux Mint 18.1), and then installed a package but could not run it. First, the binary is not automatically added to my PATH. Second, when I tried to run it directly from /snap/bin/..., I get an error about elevated permissions not being confined.

Ideally this should all work out of the box, right?

Also, snap find returns a list of less than 10 packages, which can’t be right.

What version of snapd are you on?

I believe when snap find is ran with no query it returns 10 features snaps.

Yes, I believe Linux Mint is supposed to work find with snaps, although we unfortunately don’t yet have any stakeholders here making sure this is the case, I think. Would be great to have someone there pushing things forward and communicating with us here in the forum to make sure it’s working smoothly.

The short list on plain “snap find” is a misconfiguration in the store… these are supposed to be highlight packages, but indeed we need to do a better job defining those highlights (cc @noise). There are thousands of packages you can search for by providing a parameter to snap find.

➜ ~ snap --version
snap 2.25
snapd 2.25
series 16
ubuntu 16.04
kernel 4.4.0-21-generic

(It says ubuntu, but I am on Linux Mint 18)

What does it show on /etc/os-release?

> less /etc/os-release

NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

… Linux Mint is Ubuntu based.

Here is the exact error I get when I try to run the installed snap package (Inkscape):

➜ ~ /snap/bin/inkscape

snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks

That doesn’t sound quite right, although I don’t understand enough about the relationship between the distributions to really tell what’s the usual or proper way to do that. In either case, as far as the tooling on that machine is concerned, that’s an Ubuntu machine because it says so.

@niemeyer If you want more info let me know. I would like to get snap working.

Sounds like a snap-confine issue:

https://askubuntu.com/questions/888497/snap-confine-refuses-to-launch-application-to-avoid-permission-attack

cc @zyga-snapd

@kyrofa That discussion does not contain an answer. I am using the latest versions of snapd. Also, I am wondering why I did not get snap packages added to PATH automatically.

Well, sort of: they said reinstalling worked.

As for the PATH, I think you need to log out/log in again after installing snapd in order for the alterations to take effect.

While true, your system is mis-reporting itself.

This is what Linux Mint 18 should report as:-

NAME="Linux Mint"
VERSION="18.1 (Serena)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18.1"
VERSION_ID="18.1"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
VERSION_CODENAME=serena
UBUNTU_CODENAME=xenial

This discrepancy probably isn’t helping.

@popey Hmm… maybe they fixed that in 18.1. I am still running 18.

Could be, I have only tested here against 18.1, sorry. I can try and reproduce your issue tomorrow with a Linux Mint 18 install if nobody else beats me to it.

@morphis Should we include Linux Mint in the snapd test suite?

A thing we can do, yes. This only opens the general question if we have any limits in terms of which distributions we add to spread testing or not. If we don’t then I am OK.

Just tested on a clean install of Linux Mint 18.

alan@mint18 ~ $ cat /etc/os-release 
NAME="Ubuntu"
VERSION="16.04 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

I did an apt update and apt dist-upgrade and now get this:-

alan@mint18 ~ $ cat /etc/os-release 
NAME="Linux Mint"
VERSION="18 (Sarah)"
ID=linuxmint
ID_LIKE=ubuntu
PRETTY_NAME="Linux Mint 18"
VERSION_ID="18"
HOME_URL="http://www.linuxmint.com/"
SUPPORT_URL="http://forums.linuxmint.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/linuxmint/"
UBUNTU_CODENAME=xenial

However, when I install snapd and try to install a snap it fails, I’ll do a separate post about that.

@popey Thanks!

@morphis We of course have some limits, but it probably wouldn’t hurt to have an extra system that runs at least part of the suite to ensure the basics work. Since this is Ubuntu-based, if we can get the foundation in place with confinement and all working, the rest will probably be fine as well. For that sort of thing we can blacklist the system name on the suite, and then whitelist the specific tests we care about.