cloud print on linux

366 views
Skip to first unread message

RJ

unread,
Jan 3, 2011, 7:41:10 PM1/3/11
to Chromium OS discuss
All of my printers are connected to linux print servers. Does anyone
know of a workaround to serve cloud print on linux? The official
google version is only available on MS at the moment. If I knew it
was a short time out, I would just wait, but I've seen that "linux
support is coming soon" message way too often for way too long on
other products.

I suppose I could set up a windows VM and run the print server off
that, but it's not a very elegant solution.

Voltron43

unread,
Jan 4, 2011, 1:27:18 AM1/4/11
to Chromium OS discuss
I would love to get Linux support for the cloud print as well. What
would be ideal for me is to be able to use my legacy network attached
printer with cloud print installed on my DD-WRT router.

Eh, ChromeOS being Linux based gives us _some_ hope, right?

Jason Michalski

unread,
Jan 4, 2011, 12:54:05 PM1/4/11
to Chromium OS discuss
I have a been using a cloud print proxy that I wrote. It cuts some
corners, only supports a single printer, not using all the job states,
not reporting errors, polling, etc. But I am able to print to my
default CUPS printer from the CR-48 and even pick the tray etc.

https://github.com/armooo/cloudprint

-- jason

> --
> Chromium OS discuss mailing list: chromium-...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-discuss?hl=en
>

Steve Pirk

unread,
Jan 5, 2011, 1:21:21 PM1/5/11
to arm...@armooo.net, Chromium OS discuss
Google is doing some cloud printing beta tests. Looks like Windows only atm.

--steve

Nicola D'Agostino

unread,
Jan 5, 2011, 5:17:06 PM1/5/11
to Chromium OS discuss

Hello,

On Jan 4, 6:54 pm, Jason Michalski <arm...@armooo.net> wrote:
> I have a been using a cloud print proxy that I wrote. It cuts some
> corners, only supports a single printer, not using all the job states,
> not reporting errors, polling, etc. But I am able to print to my
> default CUPS printer from the CR-48 and even pick the tray etc.
>
> https://github.com/armooo/cloudprint

Sound interesting. How do we try it out?
Since it's in Python do you think it could also be used on Mac OS X?
What are the requirements?

Thanks in advance :)


--
Nicola D'Agostino
http://www.nicoladagostino.net/
http://www.mondochrome.it/

Nicola D'Agostino

unread,
Jan 5, 2011, 5:17:11 PM1/5/11
to Chromium OS discuss


On Jan 4, 6:54 pm, Jason Michalski <arm...@armooo.net> wrote:
> I have a been using a cloud print proxy that I wrote. It cuts some
> corners, only supports a single printer, not using all the job states,
> not reporting errors, polling, etc. But I am able to print to my
> default CUPS printer from the CR-48 and even pick the tray etc.
>
> https://github.com/armooo/cloudprint

Sound interesting. How do we try it out?
Since it's in Pytchon do you think it could also be used on Mac OS X?

Jason Michalski

unread,
Jan 5, 2011, 6:47:25 PM1/5/11
to nez...@gmail.com, Chromium OS discuss
On Wed, Jan 5, 2011 at 5:17 PM, Nicola D'Agostino <nez...@gmail.com> wrote:
>
> Sound interesting. How do we try it out?
> Since it's in Pytchon do you think it could also be used on Mac OS X?
> What are the requirements?
>
> Thanks in advance :)

Should be able to just run cloudprint.py on the command line and it
will ask for your google login the first time it is run.
I don't see why it would not work on Mac OS X as long as you can get
pycups, but I have not tested it.
It requires python 2.6 or 2.7 and pycups.

Let me know if you run in to any problems.

-- jason

Voltron43

unread,
Jan 6, 2011, 3:55:55 AM1/6/11
to Chromium OS discuss
I just wanted to know that I was able to print to my network HP all-in-
one using my Ubuntu server and the cloudprint python script!

My main problem was setting my printer as default.

Please let me know if anybody needs any details to how I accomplished
this.

Thanks for the script.

Nicola D'Agostino

unread,
Jan 6, 2011, 9:28:22 AM1/6/11
to Jason Michalski, Chromium OS discuss

I'll try to install it in the following days, thanks.
I'll keep you posted or (more probably) ask for help. ;-)


--
Nicola D'Agostino
<!-- www.nicoladagostino.net -->

Nicola D'Agostino

unread,
Jan 6, 2011, 3:59:59 PM1/6/11
to Jason Michalski, Chromium OS discuss

I seem to have a problem. her's the outpu when I try to run your proxy:

domopac:armooo-cloudprint-71e3f11 nda$ ./cloudprint.py
Traceback (most recent call last):
File "./cloudprint.py", line 4, in <module>
import cups
ImportError: dlopen(/Library/Python/2.6/site-packages/cups.so, 2):
Symbol not found: _getline
Referenced from: /Library/Python/2.6/site-packages/cups.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/cups.so


I have Python 2.6.1 (r261:67515) and I have compiled pycups from
source (couldn't find it on any ports/packaging system for Mac).

Any ideas on how to fix it?
Thanks in advance. :)

Nicola D'Agostino

unread,
Jan 7, 2011, 7:09:25 AM1/7/11
to Chromium OS discuss
Here's an update about trying to make this cloudprint proxy on Mac OS
X.

Thanks to a friend's help I managed to get pycups working without
getline or other errors.
Until last night cloudprint.py was stopping at having no default
printer and no twiddling with CUPS, lpoptions or other tools helped.

The latest update, in which I see Jason added support for multi-
printer support, fixed this and now it asks for the Google username
and password. :)
Unfortunately this is what follows:

Traceback (most recent call last):
File "./cloudprint.py", line 254, in <module>
sync_printers(cups_connection, cpp)
File "./cloudprint.py", line 198, in sync_printers
remote_printers = dict([(p.name, p) for p in cpp.get_printers()])
File "./cloudprint.py", line 83, in get_printers
r = self.get_rest()
File "./cloudprint.py", line 79, in get_rest
auth = self.get_auth()
File "./cloudprint.py", line 51, in get_auth
self.set_auth(auth_response['Auth'])
File "./cloudprint.py", line 57, in set_auth
os.mknod(self.auth_path)
OSError: [Errno 1] Operation not permitted

--
Nicola D'Agostino
<!-- www.nicoladagostino.net -->
<!- www.mondochrome.it -->

Jason Michalski

unread,
Jan 7, 2011, 9:25:06 AM1/7/11
to nez...@gmail.com, Chromium OS discuss
On Fri, Jan 7, 2011 at 7:09 AM, Nicola D'Agostino <nez...@gmail.com> wrote:
> Here's an update about trying to make this cloudprint proxy on Mac OS
> X.
>
> The latest update, in which I see Jason added support for multi-
> printer support, fixed this and now it asks for the Google username
> and password. :)
> Unfortunately this is what follows:
>
> Traceback (most recent call last):
>  File "./cloudprint.py", line 254, in <module>
>    sync_printers(cups_connection, cpp)
>  File "./cloudprint.py", line 198, in sync_printers
>    remote_printers = dict([(p.name, p) for p in cpp.get_printers()])
>  File "./cloudprint.py", line 83, in get_printers
>    r = self.get_rest()
>  File "./cloudprint.py", line 79, in get_rest
>    auth = self.get_auth()
>  File "./cloudprint.py", line 51, in get_auth
>    self.set_auth(auth_response['Auth'])
>  File "./cloudprint.py", line 57, in set_auth
>    os.mknod(self.auth_path)
> OSError: [Errno 1] Operation not permitted


I made an update to not use mknod to create the file that that is
storing the auth token. That could get you past the current problem.
Let me know how it works out.

-- jason

Nicola D'Agostino

unread,
Jan 7, 2011, 12:19:09 PM1/7/11
to Chromium OS discuss


On 7 Gen, 15:25, Jason Michalski <arm...@armooo.net> wrote:

>
> I made an update to not use mknod to create the file that that is
> storing the auth token. That could get you past the current problem.
> Let me know how it works out.

I have very good news: your proxy now works on Mac OS X. :)

Here's a screenshot of the shell
<http://www.flickr.com/photos/nda/5332917947/>

and here's one of the manage page on Google servers:
<http://www.flickr.com/photos/nda/5333533834/>

Steve Pirk

unread,
Jan 7, 2011, 2:50:41 PM1/7/11
to nez...@gmail.com, Chromium OS discuss
That is awesome. I knew there was a way around windows as the only printer device.
Thanks for the screenshots!

--steve

Voltron43

unread,
Jan 8, 2011, 4:51:32 AM1/8/11
to Chromium OS discuss
would it be possible to implement the script as a daemon? I'm trying
to use upstart to manage the script on my system but failing because
it's a python script.

http://pypi.python.org/pypi/python-daemon/

I can also print PDFs via cups-pdf!

keep up the good work.

Deidre Elizabeth

unread,
Jan 8, 2011, 8:58:45 AM1/8/11
to ncwi...@gmail.com, Chromium OS discuss
I noticed in chrome browser there has been added a cloud print to the flags page of the chrome access extension but it does not yet show in chrome os... i wonder about that difference and when the update will come to the beta testers?

____________________________________


I'm not sure.  
Ask me again in a few minutes. 
One of my other personalities likely knows.



Note to my pet peeve:  I called the humane society, they are on their way to to put you to sleep for good.  :)



Scott Byer

unread,
Jan 10, 2011, 1:00:40 PM1/10/11
to thissocal...@gmail.com, ncwi...@gmail.com, Chromium OS discuss
The flag in Chrome controls access to the proxy management UI in the Under the Hood section of Settings on Windows (other platforms coming soon).  The proxy acts as an intermediary between the Google Cloud Print service and your local non-cloud-aware printers, enabling them to be shared so that Chrome OS (and other Google Cloud Print clients) can print to them.

Chrome OS is a client of the Google Cloud Print service, that's how it prints - no flag needed.

-Scott

DennisLfromGA

unread,
Feb 23, 2011, 8:58:26 PM2/23/11
to Chromium OS discuss
I just d/l the latest version with daemon support and installed both
cloudprint and daemon via pip - very cool - thanx.
I had an older version and it stopped working for some reason...

The question I have is: Is there any way to clear the Google Account
data so that cloudprint will prompt me for my Google account again?
I keep getting an error when I try to kick it off that says I'm not
logged in but I have Chrome open and I've tried logging in to both my
accounts but it still gives me the error.

Thanx for your help and the linux solution.

xiao_haozi

unread,
Feb 23, 2011, 9:03:15 PM2/23/11
to Chromium OS discuss
If you wipe ~/.cloudprintauth you should get prompted again.

Jason Michalski

unread,
Feb 23, 2011, 9:40:27 PM2/23/11
to Chromium OS discuss
Sounds like a problem when it has not run for a while and the client
auth token expires. I will need to check that on startup and ask for
the account info again.

-- jason

Reply all
Reply to author
Forward
0 new messages