Interface management

Under “Slots and Plugs”:

“In the above output, you can see that Chromium, VLC and the Zoom snaps are connected to the Core audio-playback slot.”

No, what the output shows is that they’re connected to the “snapd” slot, but you can explain that that is synonymous with core or system.

1 Like

Under “Disconnect interfaces”, the command:

$ sudo snap disconnect vlc:audio-record :audio-record

I’m sure you can type just:

$ sudo snap disconnect vlc:audio-record

no?

Good point, thanks - I’ve updated the doc.

Seems like these two hyperlinks to the “Listing connections” and “Slots and plugs” sections are broken. Nothing happens when you click on either of them. The other section hyperlinks work however. I think the markdown just needs to be changed to the following:

* [Listing connections](#heading--listing-connections)
* [Slots and plugs](#heading--slot-and-plugs)

Urgh, thanks so much for letting us know. I’ve just fixed these.

A few suggestions for this page.

First, move the “Plugs and slots” section to the beginning, as it is the basis for the entire rest of the page; it makes no sense for it to be partway down the page.

Next, the two sections “Listing interfaces” and “Listing connections” document exactly the same commands: “snap connections” and “snap connections --all”, so it makes little sense to break that over two distinct sections, just cover that command all at once and show its variations.

On the other hand, in the “Plugs and slots” section, there is a passing reference to the “snap interface” command; that deserves its own section. Effectively, I envision two sections:

Investigating connections (“snap connections”) Investigating interfaces (“snap interface”)

or something like that, that seems to flow more smoothly.

Next, for “snap interface”, you should cover the “–all” and “–attrs” options, which raises the question – where are interface attributes documented? That’s why this command merits its own section; there are things to say about it.

Next, in the section “Disconnect interfaces”, I think you really need to emphasize the “–forget” option to disconnect. (Also, where is this information stored so it can be re-consulted? I assume snapd, but just want to confirm.)

Finally, there is no mention of “greedy” plugs, as documented here: Plug/slot declaration rules: greedy plugs. Should there be at least a reference or link to that page? And as I recall, the concept of greedy plugs is referred to as “arity”, but I don’t see that word being used a lot. Should that be the official descriptor of this concept?

Thanks for these excellent suggestions. I’ve done a quick pass to improve a few things, but I’ve also created a TODO to update this doc with your ideas. Thanks!

“arity” is used in the codebase because there have been discussion of allowing actual numbers for the arity/valence, but it might be a bit of a too technical bit of terminology to use it in the general docs especially if the only usage is the greedy “*” case atm. But it doesn’t refer to just greedy plugs, it refers to the allowed valance, the default is arity=1, but for that we have usually just mentioned unique/single in docs.

The “listing interfaces” docs say:

In the output to snap connections vlc (see above),

However, the output of that command only appears further down below on that page, so that should probably be changed to “(see below)”?

1 Like

Thanks so much for letting us know. Now fixed.