Cloud Print Server

I was wondering if this tutorial would work on DietPi too (and other boards in addition to the RPi):

https://davesteele.github.io/raspberrypi/2016/04/23/raspberry-pi-cloudprint/

I don’t have enough free time to try right now, but if it works it could be a useful addition to DietPi.

Looks interesting, good find, would be a great addition.

I’d love to have a stab at this, but lack a printer :frowning: so unable to test it my end.

That’s not a big problem. If you manage to set it up I can easily test it on my printer(s).

Excellent, got yourself a deal, i’ll take a look :slight_smile::
https://github.com/Fourdee/DietPi/issues/855

Perfect! :mrgreen:

Ok, ready for testing when you can:
https://github.com/Fourdee/DietPi/issues/855#issuecomment-291524172

It works on my side! Great!

Excellent, thanks for doing the test.

Full credit to Dave Steele making this installation possible with his maintained repo.

Did you have to do anything else, not included in Step 2, to setup the printer? (eg: so I can ensure our online doc is correct)

I followed the instructions (just omitted the ‘sudo’) and it worked. No additional steps necessary.
I have even tried printing from my android phone, but the fun part is that the official Google Cloud Print app doesn’t detect the printers. Other third-party applications work perfectly, though. :mrgreen:

Excellent, thanks.

I really need to invest in a printer lol. Ink costs, dry up if not used, put me off.

Just buy a laser printer. Unless you have to print pictures with photographic quality, for which you need inkjet printers, laser printers are cheap to buy, and to maintain, and they don’t suffer from all the problems of inkjets if used only sporadically.

I’m not sure if this is relevant, but I have just discovered that a cloudprint-services package is already present in the official repository.
I have no idea if it is the same as Dave Steele’s repository, but still I thought you might want to check it out.

Interesting and great find, this makes it available for ARM64.

Version for ARM64:

root@DietPi:~# dpkg -l | grep cloudprint
ii  cloudprint                     0.11-5                       all          Google Cloud Print proxy
root@DietPi:~# uname -a
Linux DietPi 3.14.79+ #1 SMP PREEMPT Tue Feb 7 19:57:43 CET 2017 aarch64 GNU/Linux

Just needs testing install from Jessie repo.
https://github.com/Fourdee/DietPi/issues/855#issuecomment-292100078

Tell me what to do and I will do it (although I don’t think I can help with ARM64)

Excellent, thanks.

If this works for ARMv6/7, we can assume ARM64 will be the fine as the binary/service for cloudprint appear to be functional (C2 tested).

I’ve updated dietpi-software and removed the Dave Steele repo. Same again if you can please, would really appreciate it:
https://github.com/Fourdee/DietPi/issues/855#issuecomment-291524172

It looks like something is missing:

root@DietPi:~# cps-auth
-bash: cps-auth: command not found

Thanks, confirmed on C2.

Looks like this is a bash script that runs a different command:

So the raw command is:

rm /var/lib/cloudprintd/authfile.json
cloudprint -c -a /var/lib/cloudprintd/authfile.json

Still nothing:

root@DietPi:~# rm /var/lib/cloudprintd/authfile.json
rm: cannot remove '/var/lib/cloudprintd/authfile.json': No such file or directory
root@DietPi:~# cloudprint -c -a /var/lib/cloudprintd/authfile.json
Google username: mygoogleusername
Password:
Traceback (most recent call last):
  File "/usr/bin/cloudprint", line 9, in <module>
    load_entry_point('cloudprint==0.11', 'console_scripts', 'cloudprint-cmd')()
  File "/usr/share/cloudprint/cloudprint/cloudprint.py", line 496, in main
    sync_printers(cups_connection, cpp)
  File "/usr/share/cloudprint/cloudprint/cloudprint.py", line 330, in sync_printers
    remote_printers = dict([(p.name, p) for p in cpp.get_printers()])
  File "/usr/share/cloudprint/cloudprint/cloudprint.py", line 177, in get_printers
    r = self.get_rest()
  File "/usr/share/cloudprint/cloudprint/cloudprint.py", line 173, in get_rest
    auth = self.get_auth()
  File "/usr/share/cloudprint/cloudprint/cloudprint.py", line 99, in get_auth
    'application/x-www-form-urlencoded')
  File "/usr/share/cloudprint/cloudprint/rest.py", line 122, in post
    return self.rest_call('POST', path, data, content_type, headers, response_type)
  File "/usr/share/cloudprint/cloudprint/rest.py", line 105, in rest_call
    raise REST.RESTException('REST Error', resp.status, data)
cloudprint.rest.RESTException: REST Error:404
Message: https://developers.google.com/accounts/docs/AuthForInstalledApps

Thanks,

Looks like outdated auth system on this version in Jessie repo.

We’ll use Dave Steele’s Repo for Jessie, Debian for Stretch:
https://github.com/Fourdee/DietPi/issues/855#issuecomment-292712002

Perfect. If you need any more testing, just let me know. :slight_smile: