Did some experiments, and this is what I have.
Connections of a single snap:
$ snap connections gnome-sudoku
Plug Slot Interface Notes
gnome-sudoku:desktop :desktop desktop -
gnome-sudoku:desktop-legacy :desktop-legacy desktop-legacy -
gnome-sudoku:gnome-3-26-1604 gnome-3-26-1604:gnome-3-26-1604 content -
gnome-sudoku:gsettings :gsettings gsettings -
gnome-sudoku:gtk-3-themes gtk-common-themes:gtk-3-themes content -
gnome-sudoku:icon-themes gtk-common-themes:icon-themes content -
gnome-sudoku:pulseaudio :pulseaudio pulseaudio -
gnome-sudoku:sound-themes gtk-common-themes:sound-themes content -
gnome-sudoku:unity7 :unity7 unity7 -
gnome-sudoku:wayland :wayland wayland -
Snap that is content provider:
$ snap connections gtk-common-themes
Plug Slot Interface Notes
gnome-calculator:gtk-3-themes gtk-common-themes:gtk-3-themes content -
gnome-calculator:icon-themes gtk-common-themes:icon-themes content -
gnome-calculator:sound-themes gtk-common-themes:sound-themes content -
gnome-sudoku:gtk-3-themes gtk-common-themes:gtk-3-themes content -
gnome-sudoku:icon-themes gtk-common-themes:icon-themes content -
gnome-sudoku:sound-themes gtk-common-themes:sound-themes content -
Snap that does not use content:
$ snap connections vlc
Plug Slot Interface Notes
vlc:desktop :desktop desktop -
vlc:desktop-legacy :desktop-legacy desktop-legacy -
vlc:home :home home -
vlc:network :network network -
vlc:network-bind :network-bind network-bind -
vlc:opengl :opengl opengl -
vlc:optical-drive :optical-drive optical-drive -
vlc:pulseaudio :pulseaudio pulseaudio -
vlc:removable-media :removable-media removable-media -
vlc:screen-inhibit-control :screen-inhibit-control screen-inhibit-control -
vlc:unity7 :unity7 unity7 -
vlc:x11 :x11 x11 -
But has some disconnected interfaces:
$ snap connections vlc -a
Plug Slot Interface Notes
vlc:camera - camera -
vlc:desktop :desktop desktop -
vlc:desktop-legacy :desktop-legacy desktop-legacy -
vlc:home :home home -
vlc:mount-observe - mount-observe -
vlc:network :network network -
vlc:network-bind :network-bind network-bind -
vlc:opengl :opengl opengl -
vlc:optical-drive :optical-drive optical-drive -
vlc:pulseaudio :pulseaudio pulseaudio -
vlc:removable-media :removable-media removable-media -
vlc:screen-inhibit-control :screen-inhibit-control screen-inhibit-control -
vlc:unity7 :unity7 unity7 -
vlc:x11 :x11 x11 -
- vlc:mpris mpris -
Snap that has just one plug but it’s not connected by default:
$ snap connections test-services-25269
no connections found
$ snap connections test-services-25269 -a
Plug Slot Interface Notes
test-services-25269:daemon-notify - daemon-notify -
I would like to get to the following for manually connected plugs:
$ snap connections test-services-25269
Plug Slot Interface Notes
test-services-25269:daemon-notify :daemon-notify daemon-notify manual
Extending this further for hotplug
:
$ snap connections test-services-25269
Plug Slot Interface Notes
service1:uart :qemuserialusb serial-port manual,hotplug
service2:uart :qemuserialusb serial-port hotplug
This involves some changes to the daemon API. The information on whether a connection is manua/hotplug related is not directly available through the API at this point.
A quick observation, maybe it’s just implementation/formatting detail, but this output feels a bit overwhelming and takes a 1.5 full pages on my terminal:
$ snap connections -a
Plug Slot Interface Notes
gnome-calculator:desktop :desktop desktop -
gnome-calculator:desktop-legacy :desktop-legacy desktop-legacy -
...
- :screencast-legacy screencast-legacy -
- :shutdown shutdown -
- :ssh-keys ssh-keys -
- :ssh-public-keys ssh-public-keys -
- :system-trace system-trace -
- :time-control time-control -
- :timeserver-control timeserver-control -
- :timezone-control timezone-control -
- :tpm tpm -
...
Perhaps we could make the snap name required and instead suggest to the user to use snap connections system
instead.