Google Cloud Print on Ubuntu 16.04, in 10 minutes!
Main benefits
- Print from any device or application (web, mobile, desktop)
- Print using any connection, any network
- Forget drivers
- Share all your printers with a user in a moment
Let’s start!
$ apt install google-cloud-print-connector
The command above will install GCP-Connector and all required dependencies, included CUPS.
CUPS
The first thing you need to do is to add and configure your printer(s) in CUPS. The easiest way to do that is to use its web UI, so let’s enable it.
# Filename: /etc/cups/cupsd.conf # Change/add the following lines# Allow to listen in any address Listen *:631# Allow access to the server <Location /> Order allow,deny Allow from all </Location><Location /admin> Order allow,deny Allow from all </Location><Location /admin/conf> AuthType Default Require user @SYSTEM Order allow,deny Allow from all </Location><Location /admin/log> AuthType Default Require user @SYSTEM Order allow,deny Allow from all </Location>...
You should probably reverse these changes once you finish configuring your printers in CUPS
To manage the printers using the CUPS web UI, we will need a user member of group lpadmin. You can use your own user or, if you prefer, you can create a new one:
$ useradd <user> -p <passwd> --groups lpadmin
Don’t forget to restart CUPS after the changes:
$ systemctl restart cups
So now you should be able to access to web UI using the address https://<host-address>:631/admin/ to add and configure your printers.
Google Cloud Print connector
Once you have CUPS configured and running, you only have to run the following command…
$ gcp-cups-connector
…which will start a service to share your printer locally. In other words, any computer with Chrome on your network will be able to detect the new printer automatically.
“What? Locally? I thought this shit was about clouds!”
In that case you will need to configure it before. Let’s create a configuration file with the following command:
$ gcp-cups-connector-util init
It will ask you the following questions:
- Enable local printing? y
- Enable cloud printing? y
- Retain the user OAuth? y
- User or group email to share with? <your-address@your-gsuite-domain>
- Proxy name? <whatever>
Once you answer all the questions, it will send you to a URL where you have to introduce a code.
Finally, start the connector with your custom configuration:
$ gcp-cups-connector -config-filename gcp-cups-connector.config.json
That’s all!
- Check your printer(s) status: https://www.google.com/cloudprint#printers
- Different ways to print from your devices: https://www.google.com/cloudprint/learn/apps/