1

I use this Python script on my Debian based Guru Plug to make it work as a print server for Google Cloudprint. With this I can print from my Android devices using apps like PrinterShare or Cloud Print. It works perfectly.

However, I have to start the script manually if I for some reason have to reboot the plug computer. If would like to have it start automatically on boot, but so far I haven't succeded.

In /etc/rc.local I have this line:

/usr/bin/python /usr/local/bin/cloudprint -d

Using pgrep I can see that the script is running upon boot but it does not work. And redirecting output messages to a log file reveals that it ask for my Google username.

Normally it does not ask for authentification as this is stored in /root/.cloudprintauth. But obviously, when running from rc.local it is not able to read or find the file.

So my question is:

How do I enable the script to be able to find/read the authentification file when run from rc.local?

  • 1
    Have you read: Install Google Cloud Print on a Linux server? – Pedro Romano Nov 16 '12 at 9:15
  • Yes, but I think it is overkill to install Chrome on a tiny little server like the Guru Plug with limited resources. The python script works fine except I don't know how to make it start properly on boot. – marlar Nov 16 '12 at 10:27
1

Unfortunately the script has the auth file path hard-coded relying on the shell expansion of the home directory:

self.auth_path = os.path.expanduser('~/.cloudprintauth')

My recommendation is that you patch the file by changing that line to an absolute path:

self.auth_path = os.path.expanduser('/root/.cloudprintauth')

Hopefully it will do the trick.

0

Here's a set of packages for Debian that will do this for you.

https://github.com/davesteele/cloudprint-debian

Install and run "service cloudprintd login" as root.

  • Thanks! I actually need to install the cloudprint script on my Raspi, so I will try this. – marlar Jun 24 '13 at 8:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.