Latest LQ Deal: Latest LQ Deals
Go Back > Linux Answers > Applications / GUI / Multimedia
User Name


By Kenny_Strawn at 2011-02-23 23:46
Despite what Google says about Google Cloud Print not being available for Linux, it actually is -- in the form of a Python script that you can execute on your Linux system and be able to print from your Cr-48 on it.

Now for the dependencies: Apparently, you need Python (2.7 or older; 3.x will *NOT* work) and pycups to be able to use this script. You also need git to check out the source and a printer configured on your Linux system (even networked will do).

Arch users: You will have to build Python 2.7 from source, but thankfully on my ArchBang system all the build dependencies were installed. You will also need to download pycups from here and build it from source after building Python 2.7.

After Python (2.7 or older) and pycups are installed, let's get started:

su - #or sudo su -
git clone git://
Then, after you check this git branch out, run the following commands:

cd cloudprint
This script will add your printer to Cloud Print, and then you can print from anywhere provided that this script is running.

You can also run the script on startup. To do this, you need to create another script -- /etc/init.d/cloudprint (/etc/rc.d/cloudprint on Arch) -- so that init can run it as a daemon:

nano /etc/init.d/cloudprint #again, *or* /etc/rc.d/cloudprint
The code to add to the file:

# /etc/rc.d/cloudprint
# Description: Starts the Google Cloud Print script on startup
# ----------------
# Provides: Cloud-Print
# Required-Start: $cups $network $local_fs $syslog
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start Google Cloud Print

case $1 in
      # echo -n "Starting Google Cloud Print: "
      # echo -n "Stopping Google Cloud Print: "
      # echo -n "Restarting Google Cloud Print: "
# echo "Usage: cloudprint {start|stop|restart}"
I have tested the start method, but I'm not so sure about killall as it can sometimes not work as intended. Enjoy!

by mande01 on Tue, 2011-04-19 19:06
Have people used this?

And if you have a linux box switched on anyway (with printer) can't you just share it via that box?


by aszabo on Tue, 2011-05-03 17:28

I have problem with, when I start it, I get the following error message:

Traceback (most recent call last):
File "/usr/bin/cloudprint", line 8, in <module>
load_entry_point('cloudprint==0.2', 'console_scripts', 'cloudprint')()
File "/usr/lib/python2.6/site-packages/cloudprint/", line 304, in main
sync_printers(cups_connection, cpp)
File "/usr/lib/python2.6/site-packages/cloudprint/", line 227, in sync_printers
cpp.add_printer(printer_name, description, ppd)
File "/usr/lib/python2.6/site-packages/cloudprint/", line 131, in add_printer
'capabilities' : ppd.encode('utf-8'),
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 52637: ordinal not in range(128)

Could you help me how to resolve this error?


by aszabo on Tue, 2011-05-03 17:38
The problem is resolved with the new version 0.4.

by rthomas00 on Thu, 2011-05-05 09:07
Got cloudprint installed and working except it will only print text files. Anything else will go into the print que but stop. Job cannot be restarted only deleted.
This is printing from android device with cloudprint app.

by usky on Sun, 2012-01-01 06:05
Thanks Kenny for your help.

I followed your tuto and I have one major problem.
The service does not start automaticaly at startup...

I only created the /etc/init.d/cloudprint file and add a chmod +x cloudprint.

Do you have an idear ?

by Akirad on Tue, 2012-02-07 03:08
You must use the cloudprint regitered user, so if your user is "user" you can start automatically at startup by edit

and add this line before exit 0:

su user -c /usr/bin/cloudprint &


Paolo Rampino aka Akirad

by sundialsvcs on Thu, 2012-03-01 10:21
Incidentally, "Google cloud print" is actually a marketing repackage of existing web-print technologies that are simultaneously available from other vendors. The stuff that you use to print to a shared printer in a hotel lobby from your room might well be the self-same thing ... and Google won't get a copy of your stuff and keep it forever.

by usky on Thu, 2012-03-01 12:22
Whatever, it is now available with chromium.

by arinekhen on Thu, 2012-07-19 16:19
I just wanted to say thanks for this post. I got cloud print working on my ubuntu 12.04 machine with it. Thanks!

by maxcelpc on Sat, 2013-08-10 15:37
I think that this may be the same package that is now available from the Ubuntu repository, simply:
apt-get install cloudprint
it certainly responds the same.

I have this loaded on an Ubuntu 12.04LTS server, no gui and no Chromium browser.
When cloudprint is started it recognises the printer attached to the server then appears to hang, i.e. it does not return to the prompt until enter is pressed.

If it is run as a daemon
cloudprint -d
it again registers the printer and also displays a message showing the PID. The printer then shows up on my Android device but with status 'unknown'. If a print request is made from the Android device it is shown as being queued, however the server now shows an error message
ERROR: Couldn't connect to Cloud Service: will try again in 60 secs.
Along with each error message, cloudprint dumps a 16mb file into the /tmp directory on the server and this happens every minute until the print job is cancelled from the Android device; cntrl&c from the server terminal does not stop it.

Initially unaware of what was happening, the root partition on the server soon became full, bringing the server to a halt.

There appears to be very little information available on cloudprint and I would appreciate any help on how to go about diagnosing the problem. I do not want to load a gui and chromium onto a minimal server, if only for security reasons.


All times are GMT -5. The time now is 01:41 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration