@emitorino, thanks for your updates on the auto-connections.
I did the following tests and they look correct for me:
$ sudo snap install --edge cups
$ sudo snap connections | grep cups:
avahi-control cups:avahi-control :avahi-control -
cups-control cups:cups-internal cups:cups-control -
home cups:home :home -
network cups:network :network -
network-bind cups:network-bind :network-bind -
network-manager-observe cups:network-manager-observe :network-manager-observe -
raw-usb cups:raw-usb :raw-usb -
system-files cups:etc-cups :system-files -
$ cups.cupsctl
_debug_logging=1
_remote_admin=0
_remote_any=0
_share_printers=1
_user_cancel_any=0
[...]
$ sudo snap install --dangerous cups-admin-test_0.1.0_amd64.snap
$ sudo snap connect cups-admin-test:avahi-observe
$ sudo snap connect cups-admin-test:cups-control
$ sudo snap connect cups-admin-test:cups-control cups:cups-control
$ sudo snap connect cups-admin-test:cups
error: snap "snapd" has no "cups" interface slots
$ sudo snap connect cups-admin-test:cups cups:cups
$ snap connections | grep cups-admin-test:
avahi-observe cups-admin-test:avahi-observe :avahi-observe manual
cups cups-admin-test:cups cups:cups manual
cups-control cups-admin-test:cups-control :cups-control manual
cups-control cups-admin-test:cups-control cups:cups-control manual
home cups-admin-test:home :home -
network cups-admin-test:network :network -
$
The cups-admin-test Snap is from this example thread.
I hope that this is all correct behavior.
Strange is now that the utilities of cups-admin-test are only able to access the system’s CUPS, not the Snap’s one whereas the utilities of the CUPS Snap can access both, the one of the Snap by default and the one of the system when using the CUPS_SERVER environment variable:
$ cups-admin-test.lpstat -v
[Works: Queue list of system's CUPS]
$ CUPS_SERVER=/var/snap/cups/common/run/cups.sock cups-admin-test.lpstat -v
lpstat: Bad file descriptor
$ cups.lpstat -v
[Works: Queue list of CUPS Snap]
$ CUPS_SERVER=/run/cups/cups.sock cups.lpstat -v
[Works: Queue list of system's CUPS]
$ lpstat -v
[Works: Queue list of system's CUPS]
$ CUPS_SERVER=/var/snap/cups/common/run/cups.sock lpstat -v
[Works: Queue list of CUPS Snap]
$
For me it is strange that the lpstat of cups-admion-test cannnot access the CUPS Snap though both its plugs are connected to the CUPS Snap.