📜 ⬆️ ⬇️

We use Google Cloud Print without Google Chrome



In this article I want to tell how you can use Google Cloud Print without installing Google Chrome. The purpose of the article will be setting up a machine running Ubuntu Server as a print server, as well as setting up clients running Windows, Mac OS, and Linux (using Ubuntu as an example). In general, any server running the GNU / Linux operating system, including a router with the print server function, can act as a server.

1. Setting up a print server


Suppose that we have a machine with an installed Ubuntu Server OS (version 12.04 is used in the example) and a correctly configured printer. Use the guide [1] .

Install Git in order to clone the CloudPrint project repository . The project is written in python and use the python-cups module, and install them. To build the project, we also need the python-setuptools module.
')
sudo apt-get install git-core python python-cups python-setuptools 


We clone the repository, move to the folder with the project and make the build script executable.

 git clone git://github.com/armooo/cloudprint.git cd ~/cloudprint chmod +x setup.py 


We will assemble and install the project.

 python setup.py build sudo python setup.py install 


Perform the first run of the application.

 /usr/local/lib/python2.7/dist-packages/cloudprint-0.5-py2.7.egg/cloudprint/cloudprint.py 


Specify the username and password of the Google account to which you want to bind the printer. It should be noted that in case two-step authentication is enabled, the application password generated on the account settings page must be specified as a password. If everything is configured correctly, something like: " Updated Printer HP_LaserJet_1018 " will appear on the screen. You can complete the application (Ctrl + C).

Now add an autostart script using upstart. To do this, create a file cloudprint.conf.

 sudo nano /etc/init/cloudprint.conf 


The following is the contents of this file. $ RUN_AS_USER must be replaced with the user name under which the program will run.

 start on (started cups and local-filesystems and t-device-up IFACE=eth0) stop on runlevel [345] respawn console none script chdir /usr/local/lib/python2.7/dist-packages/cloudprint-0.5-py2.7.egg/cloudprint/ exec su -c /usr/local/lib/python2.7/dist-packages/cloudprint-0.5-py2.7.egg/cloudprint/cloudprint.py - $RUN_AS_USER end script 


Run the program.

 sudo start cloudprint 


On the printer management page , our printer should appear.

2. Setting up a "cloud" printer in Windows


To work with the printer in Windows, let's use the Paperless Printer program, which is free for home use.

After installing the program, Paperless Printer will appear in the printer list, one of the features of which is Find a Cloud Printer - printing a custom document on a Google cloud printer.



3. Setting up a “cloud” printer in Mac OS X


To print on Mac OS X, use the Cloud Printer program. Setting up the program is not simple, but it is described in detail in the manual [2] , and also presented in the video.



Unfortunately, Cloud Printer does not provide the same opportunities for users as the Paperless Printer , but this program allows you to print some documents without using Google Chrome.

4. Setting up a "cloud" printer in Ubuntu


To print in Ubuntu, install the driver for CUPS according to the instructions [3] .

 sudo add-apt-repository ppa:simon-cadman/cups-cloud-print sudo apt-get update sudo apt-get install cupscloudprint sudo /usr/lib/cloudprint-cups/setupcloudprint.py 


In the process of setting up the question Add all Google Cloud Print? must answer " yes ".



Working with a cloud printer in Ubuntu should be easy.

5. Instead of conclusion


The purpose of the article can be considered achieved: we have a server with a customized printer, as well as clients with the ability to print to it from outside of Google Chrome. However, do not understand this article as a call to abandon this browser. We always have the opportunity to print an open page or email Gmail directly from the browser to your home printer wherever we are.

6. Links to sources of information


[1] HOWTO: Use Google Cloud Print for Linux (print from Andriod device)
[2] Cloud Printer (formerly Cloud Print) for Mac OS X By Somasundaram M (2011)
[3] CUPS Cloud Print (Installation)

PS Unfortunately, I do not have enough experience creating scripts for upstart. I would be grateful if you help me optimize the script proposed above.

Source: https://habr.com/ru/post/149520/


All Articles