Translation(s): none

Configuring CUPS to use Google Cloud Print (GCP).


As Wikipedia says:

Cloud printing is the technology that enables printers to be accessed
over a network through cloud computing          

Cloud printing services enable end users to have documents printed without being encumbered by actual printing equipment and still have it delivered where and when they want it. Cloud printing is a driverless method of printing. The client needs no printer-specific drivers and simply provides a file type that can be handled by the cloud printing service and sent on to the printer or print queue as something it too can process.

This page is concerned with integrating a CUPS installation with a cloud printing service. The only vendor that appears to facilitate this with an openly declared specification is Google. So we will go with Google because Debian has the software to interact with what it offers for implementing this method of driverless printing in conjunction with CUPS.

Google Cloud Print (GCP) and CUPS

The conditions for setting up and using GCP with CUPS are

We will be dealing in the remaining sections of this page with adding only CUPS print queues (not cloud-enabled printers) to the Google account.

A connector (or proxy) maintains a connection between GCP and the server running cupsd. A persistent XMPP channel is established over port 5222 or port 443 to Messages over this channel can inform GCP about changes to the CUPS print queues and GCP can notify the server when there is a job submitted to it from a client. The job can then be downloaded and printed. Remember that this client can be anywhere in the world and must have the credentials to authenticate to the Google account or permission to use the printers it offers.

A user registers the print queue with GCP and claims the printer by providing a registration token from Google in an authenticated request to a specified URL via a browser. GCP responds with the credentials necessary for printing to take place. Added print queues can be shared by following the instructions here. On receiving notification of a pending job the connector downloads the document and submits it to the printing system.

Debian provides connectors with

Closing down a connector results in added queues becoming offline.

The Chromium Web Browser

From customize and control in Chromium's interface:


Install the cloudprint package and, as a user, do

cloudprint -d

to daemonise the service, or

cloudprint &

to have it run in the background, or


to watch all the its output on the screen.

You will be given a URL to go to and the program will output trying for the win while it waits for you to claim the print queues and complete their registration.

brian@desktop:~$ cloudprint
Go to to claim this printer
trying for the win
trying for the win
trying for the win`
Printer claimed by
Polling for jobs on HP-ENVY-4500-series
Polling for jobs on LaserJet-300
Polling for jobs on DotMatrix
Establishing connection to xmpp server
xmpp connection established

Delete queues from the default set with

cloudprint -x HP -x Dot

Unlike google-cloud-print-connector, cloudprint does not recognise when the creation or deletion of a CUPS queue takes place on the server, so the event is not communicated to GCP. Include a newly created queue, wf2530, with

cloudprint -i wf -i HP -i Dot -i Las

or stop and restart the cloudprint service. The printer management page will have to be refreshed to see the new queue.

Automatic registration of selected queues when cloudprint is started can be accomplished from a .cloudprint.conf file in the home directory:

include = [Las, DotMatrixT]  # Excludes all other queues.
# exclude = [HP, Las]        # Includes all other queues.


with root privileges and use the provided URL to claim the queues.


Install google-cloud-print-connector. There are two programs, gcp-connector-util and gcp-cups-connector, in the package.

gcp-connector-util has options for the utility to create a configuration file, share a printer, delete all print queues associated with the particular connector instance and manage print jobs. See all options with

gcp-connector-util -h

To produce a configuration file, gcp-cups-connector.config.json, in the home directory do

gcp-connector-util init

and follow the instructions to claim the print queues.

Then start the connector in the foreground or background with

gcp-cups-connector &

See Also