How To Print in Linux as a Client to Google Cloud Print

Hi

I have openSUSE Tumbleweed but this is a general CUPS + openSUSE (12.1)
question.

My home printer is attached to a windows 7 computer. It has to be there
for the other members of the family. It will not network to my Linux
computer.

I can print to PDF files in Linux, open those files in the google-chrome
browser and print to the remote printer with Google Cloud Print. That
works fine but is inelegant; in fact it’s so inelegant that it’s
embarrassing.

Is there a way to install Google Cloud Print generally in Linux (maybe
as a CUPS printer) to be a client linked to the cloud print server that
I have on my windows 7 machine?

Regards
swerdna

On 05/09/2012 09:42 AM, swerdna wrote:
> Hi
>
> I have openSUSE Tumbleweed but this is a general CUPS + openSUSE (12.1)
> question.
>
> My home printer is attached to a windows 7 computer. It has to be there
> for the other members of the family. It will not network to my Linux
> computer.
>
> I can print to PDF files in Linux, open those files in the google-chrome
> browser and print to the remote printer with Google Cloud Print. That
> works fine but is inelegant; in fact it’s so inelegant that it’s
> embarrassing.
>
> Is there a way to install Google Cloud Print generally in Linux (maybe
> as a CUPS printer) to be a client linked to the cloud print server that
> I have on my windows 7 machine?
>
> Regards
> swerdna

Just in case I wasn’t clear: I want e.g. to print from LibreOffice to
the goole cloud printer direct, or from any app e.g. gimp, direct,
without creating and then opening a PDF version of the output in
google-chrome first.


Regards
swerdna

This?
http://www.linuxquestions.org/linux/answers/applications_gui_multimedia/howto_use_google_cloud_print_linux


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 3 days 21:45, 4 users, load average: 0.02, 0.06, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On 05/09/2012 09:53 AM, malcolmlewis wrote:
>

> This?
> http://www.linuxquestions.org/linux/answers/applications_gui_multimedia/howto_use_google_cloud_print_linux
>
Thanks Malcolm.

That’s for attaching a printer in Linux as a server for the cloud print
process.

I have my printer already acting as a server on the windows computer. I
want to print to that service from Linux, but not using the chrome
browser as an intermediary. Rather, I want to print direct from an app
(like Kwrite or whatever) to the remote cloud printer.

Thoughts?


Regards
swerdna

> This?
> http://www.linuxquestions.org/linux/answers/applications_gui_multimedia/howto_use_google_cloud_print_linux
>
Thanks Malcolm.

That’s for attaching a printer in Linux as a server for the cloud print
process.

I have my printer already acting as a server on the windows computer. I
want to print to that service from Linux, but not using the chrome
browser as an intermediary. Rather, I want to print direct from an app
(like Kwrite or whatever) to the remote cloud printer.

Thoughts?

[/QUOTE]
Via cups…
http://www.niftiestsoftware.com/cups-cloud-print/
https://github.com/simoncadman/CUPS-Cloud-Print


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 3 days 23:26, 4 users, load average: 0.17, 0.08, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Interesting thread. I’m following with interest (not that I’ve ever tried to play with Google Cloud Print) :slight_smile:

Hi
I’ve built an rpm for openSUSE (it needed some tweaking) it’s in my Misc
repository. Quite cool prints as a pdf up to google docs;
https://build.opensuse.org/package/show?package=cupscloudprint&project=home%3Amalcolmlewis%3AMiscellanous

Assuming cups is running, as root user run the helper script to add
your local printer;


/usr/lib/cloudprint-cups/setupcloudprint.py


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 4 days 2:13, 4 users, load average: 0.16, 0.06, 0.06
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On 05/09/2012 02:41 PM, malcolmlewis wrote:
>

> Hi
> I’ve built an rpm for openSUSE (it needed some tweaking) it’s in my Misc
> repository. Quite cool prints as a pdf up to google docs;
> https://build.opensuse.org/package/show?package=cupscloudprint&project=home%3Amalcolmlewis%3AMiscellanous
>
> Assuming cups is running, as root user run the helper script to add
> your local printer;
>


> /usr/lib/cloudprint-cups/setupcloudprint.py
> 

>

Holy mackerel: it works
No browser involved, no conscious login to google, no need for google
docs or PDF intermediary files. It prints like a normal physical printer.

I’ll write more later – gotta go now


Regards
swerdna

> Hi
> I’ve built an rpm for openSUSE (it needed some tweaking) it’s in my
> Misc repository. Quite cool prints as a pdf up to google docs;
> https://build.opensuse.org/package/show?package=cupscloudprint&project=home%3Amalcolmlewis%3AMiscellanous
>
> Assuming cups is running, as root user run the helper script to add
> your local printer;
>


> /usr/lib/cloudprint-cups/setupcloudprint.py
> 

Holy mackerel: it works
No browser involved, no conscious login to google, no need for google
docs or PDF intermediary files. It prints like a normal physical
printer.

I’ll write more later – gotta go now

[/QUOTE]
Awesome :wink:

I have it working for SLE and openSUSE now, but noted the permissions
on /etc/cloudprint.conf need hardening, so run;


chmod 600 /etc/cloudprint.conf

It really needs to be encrypted, so am having a play to see what can be
done.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 4 days 13:44, 6 users, load average: 0.00, 0.08, 0.12
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

> Hi
> I’ve built an rpm for openSUSE (it needed some tweaking) it’s in my
> Misc repository. Quite cool prints as a pdf up to google docs;
> https://build.opensuse.org/package/show?package=cupscloudprint&project=home%3Amalcolmlewis%3AMiscellanous
>
> Assuming cups is running, as root user run the helper script to add
> your local printer;
>


> /usr/lib/cloudprint-cups/setupcloudprint.py
> 

Holy mackerel: it works
No browser involved, no conscious login to google, no need for google
docs or PDF intermediary files. It prints like a normal physical
printer.

I’ll write more later – gotta go now

[/QUOTE]
Awesome :wink:

I have it working for SLE and openSUSE now, but noted the permissions
on /etc/cloudprint.conf need hardening, so run;


chmod 600 /etc/cloudprint.conf

It really needs to be encrypted, so am having a play to see what can be
done.

[/QUOTE]
Hi
OK, it borks cups changing that, so need to look elsewhere… so just
remember it’s plain text…


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 4 days 18:48, 5 users, load average: 0.05, 0.07, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

OK, so chmod and chown to the lp group works for the moment;


chmod 0640 /etc/cloudprint.conf
chown root:lp /etc/cloudprint.conf


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 4 days 21:12, 5 users, load average: 0.00, 0.01, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On 05/10/2012 09:21 AM, malcolmlewis wrote:
>

> OK, so chmod and chown to the lp group works for the moment;
>


> chmod 0640 /etc/cloudprint.conf
> chown root:lp /etc/cloudprint.conf
> 

>
Malcolm, when I did chmod 600 it stopped workimg. Now I’ve changed it
back as you suggested and it still won’t work. In cupas admin at
localhost 631 I see this for tje job description:
> cloudlbp6000-12 Name=Unknown User=Withheld 26k Pages=Unknown
> pending since Thu 10 May 2012 09:36:23 PM EST

Any thoughts


Regards
swerdna

> OK, so chmod and chown to the lp group works for the moment;
>


> chmod 0640 /etc/cloudprint.conf
> chown root:lp /etc/cloudprint.conf
> 

>
Malcolm, when I did chmod 600 it stopped workimg. Now I’ve changed it
back as you suggested and it still won’t work. In cupas admin at
localhost 631 I see this for tje job description:
> cloudlbp6000-12 Name=Unknown User=Withheld
> 26k Pages=Unknown pending since Thu 10 May 2012 09:36:23 PM
> EST

Any thoughts

[/QUOTE]
Hi
Restart cups and the job via localhost:631


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 5 days 10:44, 5 users, load average: 0.02, 0.02, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Hi
OK, there should be a newer rpm available now, I also packaged up
cloudprint which is the daemon for connecting a printer to the google
cloud print service.

Rerun the setup routine as this will set permissions/ownership, restart
cups as well.

So in summary, there is;
cupscloudprint: CUPS Driver for Google Cloud Print.
cloudprint: Share your CUPS printers with google’s cloud print.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 5 days 12:43, 5 users, load average: 0.72, 0.88, 0.56
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On 05/11/2012 12:54 AM, malcolmlewis wrote:
> Hi
> OK, there should be a newer rpm available now, I also packaged up
> cloudprint which is the daemon for connecting a printer to the google
> cloud print service.
>
> Rerun the setup routine as this will set permissions/ownership, restart
> cups as well.
>
> So in summary, there is;
> cupscloudprint: CUPS Driver for Google Cloud Print.
> cloudprint: Share your CUPS printers with google’s cloud print.
>
That fixed it, thank you Malcolm; you’re a star!

It’s very disturbing that the .conf file has permissions 777 and plain
text. I think that might be a dealbreaker for me. I’ll have to think
about a way around it; let me know if you think of something too.


Regards
swerdna

Interesting thread. Will try and test Malcolm’s packages as well. Specially being able to print the my home printer when I’m on my way is nice. Another way to make our cats go berserk :smiley:

Hi
This is cupscloudprint? So what are the permissions/ownership now? As a
normal user it should be permission denied?


ll /etc/cloudprint.conf

-rw-r----- 1 root lp 62 May  9 23:50 /etc/cloudprint.conf

I have pushed my patch upstream for this (link in the changelog).


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 5 days 19:19, 4 users, load average: 0.02, 0.04, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

On 05/11/2012 07:30 AM, malcolmlewis wrote:
>

> Hi
> This is cupscloudprint? So what are the permissions/ownership now? As a
> normal user it should be permission denied?
>


> ll /etc/cloudprint.conf
>
> -rw-r----- 1 root lp 62 May  9 23:50 /etc/cloudprint.conf
> 

>
> I have pushed my patch upstream for this (link in the changelog).
>
My result is this:
john@tumbleweed121:~> ls -l /etc | grep cloudprint
-rwxrwxrwx 1 root root 53 May 9 21:27 cloudprint.conf

And that’s just nuts. maybe I woke at 1am and did that in my sleep.

I’ll delete the file, uninstall the RPM and then reinstall and rerun the
…py config file (so I can see if I get your result)


Regards
swerdna

On 05/11/2012 12:06 PM, swerdna wrote:
> On 05/11/2012 07:30 AM, malcolmlewis wrote:
>>

>> Hi
>> This is cupscloudprint? So what are the permissions/ownership now? As a
>> normal user it should be permission denied?
>>


>> ll /etc/cloudprint.conf
>>
>> -rw-r----- 1 root lp 62 May 9 23:50 /etc/cloudprint.conf
>> 

>>
>> I have pushed my patch upstream for this (link in the changelog).
>>
> My result is this:
> john@tumbleweed121:~> ls -l /etc | grep cloudprint
> -rwxrwxrwx 1 root root 53 May 9 21:27 cloudprint.conf
>
> And that’s just nuts. maybe I woke at 1am and did that in my sleep.
>
> I’ll delete the file, uninstall the RPM and then reinstall and rerun the
> .py config file (so I can see if I get your result)
>
All I had to do was delete the conf file and rerun setupcloudprint.py
That correctly recreated the conf file

So it’s all good now. I’m impressed with Google hugely this year.


Regards
swerdna