The cups interface

The cups interface allows access to the CUPS socket for printing.

This interface is primarily intended to be used by snap developers also using the cups control interface.

Interface documentation:
See Interface management and Supported interfaces for further details on how interfaces are used.

Developer details

Auto-connect: no

On systems where this slot is provided by a snap application, the cups interface is the companion interface to the cups control interface.

The design of both of these interfaces is based on the idea that the slot implementation (eg. cupsd) is expected to query snapd to determine if the cups-control interface is connected or not for the peer-client process. The print service will then mediate admin functionality (ie, the rules in these interfaces allow connecting to the print service, but do not implement enforcement rules; it is up to the print service to provide enforcement).

cups is currently only available via a providing app snap and this interface assumes that the providing app snap also slots ‘cups-control’ (the current design allows the snap provider to slots both cups-control and cups or just cups-control (like with implicit classic or any slot provider without mediation patches), but not just cups.

Code examples

The Ghostscript Printer Application uses this interface:

The source code for the interface is in the snapd repository: