Google Cloud Print is Dead - Long Live Remote Printing..!!

Moderator: Forum moderators

Post Reply
User avatar
p310don
Posts: 357
Joined: Tue Dec 03, 2019 7:17 am
Location: Brisbane, Australia
Has thanked: 72 times
Been thanked: 103 times

Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by p310don »

Google Cloud Print (GCP) was a service that allowed you to print to a remote printer from anywhere. For business use it was very handy. I used it a LOT. But, in the BIG G's infinite wisdom, they canned it as of 2021 (I guess they couldn't glean as much data from print jobs as they thought they could!).

A year ago I made some attempts to make a replacement for GCP , but I've done more now. This was last year's efforts:

http://www.murga-linux.com/puppy/viewto ... =110831531

I've taken a few of the skills I've learned in the past 12 months and improved on it. To make this work, you need to have a printer installed at the receiving end and google drive (or other cloud server) working as a "local" filesystem. To do that, I used the technique here:

viewtopic.php?f=161&t=616

to create a "local" cloud drive. The one above is using Google Drive with rclone, but rclone can use a bunch of cloud services so take your pick. One big advantage of google drive is you can use this method to print from your phone (if that takes your fancy).
On the cloud drive (google drive) I've created two directories, "Print" & "Printed" & and a directory at /root "print_temp". Then I've created this basic script to print all pdf files from the "Print" directory to my Brother printer

Code: Select all

#!/bin/sh

cp ~/cloud/gdrive/Print/*.pdf ~/print_temp

lpr -o fit-to-page -o media=A4 -P Brother ~/cloud/print_temp/*.pdf

mv ~/cloud/print_temp/*.pdf ~/cloud/gdrive/Printed

rm ~/cloud/gdrive/Print/*.pdf

This copies all the pdf files from the remote drive (gdrive) to the local "print_temp" directory, then sends the pdf files directly to my "Brother" printer (you can change this to whatever the name of your printer is), then copies all the pdf files to the "Printed" directory on the remote drive (this step isn't necessary, but I like to keep a backup of my files to go over later, probably like google did with GCP!), then the last line deletes the files from the "Print" folder.

To make it all work just right, I made a cron job that runs the above script every 2 minutes. If there's a PDF in the "Print" folder, it'll print it, if there's nothing there, it just fails and ends.

This is working nicely for me. I have it all set up in Fatdog, but it will work in any Pup (or linux) with all the pre-requisites.

User avatar
mikewalsh
Moderator
Posts: 6163
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 795 times
Been thanked: 1982 times

Re: Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by mikewalsh »

@p310don :-

Hm. Interesting....

I don't know much about rclone.....like, zilch! :lol: But; d'you think this would work with ANY GDrive 'client'? Like, say, Fred's two-pane GDrive file-manager thingy? He built this a couple of years ago, around the same time Mikeb was playing around with his Dropbox variant of the same idea; I've been using the 'portable' version of it for long enough, and it works very well.....although it runs via a Google API that's been around since, like, FOREVER.

There's rumours this very API will be getting the boot later this year, 'cos as we all know, 'Big Bruvva' really wants you to access all their services via your browser (preferably Chrome, of course!! :roll: )

Buggers, aren't they??! :shock: :lol:

I take it the 'standard' ability to print stuff off through your browser - any of the Chromium 'clones' - isn't going anywhere, anytime soon?

Mike. ;)

User avatar
p310don
Posts: 357
Joined: Tue Dec 03, 2019 7:17 am
Location: Brisbane, Australia
Has thanked: 72 times
Been thanked: 103 times

Re: Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by p310don »

@mikewalsh

I'm not sure that it'd work with Fred's file manager. It uses "drive" which I don't think can mount a google drive, only push and pull to and from it, but I am not an expert at that at all.

When I first started playing with mounting a google drive, I was going to use Fred's tool somehow, but it didn't work with Fatdog. I couldn't get drive to work, because I can't compile for nuts. On the other hand, rclone works as a single file, no compile needed. There is a handy little rclone gui available too (actually lots) which I'll link to for your perusal.

https://github.com/odeke-em/drive

https://drive.google.com/file/d/1ymVGXs ... sp=sharing

User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by rcrsn51 »

Nice! I have a Dropbox account that I access with mikeb's dropboxgui app, but this is easier. Once you mount the remote storage, it acts just like a Samba share, so you have more options to manipulate the data.

The only tricky part was getting my existing Dropbox access token into rclone.

IIRC, Cloud Print was Google's attempt at "driverless printing". But Apple's AirPrint is becoming the industry standard and it's compatible with Linux.

User avatar
p310don
Posts: 357
Joined: Tue Dec 03, 2019 7:17 am
Location: Brisbane, Australia
Has thanked: 72 times
Been thanked: 103 times

Re: Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by p310don »

@rcrsn51

The only tricky part was getting my existing Dropbox access token into rclone.

What was there a drama getting it to work? I don't use dropbox, but I have dropbox, and did set it up as a remote drive months ago (it sits there unused) and don't recall dramas getting it to work.

I always thought that GCP was about remote printing, which it did really well. AFAIK, CGP required at least one computer / device to have a printer installed. I haven't used or looked at AirPrint. From my cursory glance it's just about driverless printing, not remote printing. I assume you could still remote print using AirPrint if that's how you have a printer installed?

User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by rcrsn51 »

p310don wrote: Fri Jan 22, 2021 9:49 pm

What was there a drama getting it to work? I don't use dropbox, but I have dropbox, and did set it up as a remote drive months ago (it sits there unused) and don't recall dramas getting it to work.

Every time that I ran the config dialog, it wanted me to generate a new access token. I finally located the Advanced section where I could enter my current token.

User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by rcrsn51 »

Unlike Cloud Print, AirPrint is primarily for LAN-only. The client device (computer, phone, tablet) will be on the same subnet as the printer. (Although if you set up your router with static IP and port forwarding, I suppose that you could print remotely across the web.)

"Driverless" is a misnomer. A better description would be "Universal driver". The client sends the print job in a standard format. If the printer is AirPrint compatible, it recognizes the job and prints it.

The latest versions of CUPS have this universal driver built-in, so the Linux client does not need a specific driver package like HPLIP.

User avatar
p310don
Posts: 357
Joined: Tue Dec 03, 2019 7:17 am
Location: Brisbane, Australia
Has thanked: 72 times
Been thanked: 103 times

Re: Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by p310don »

If they ever get the driverless / universal driver thing really sorted out, it'll make all your previous hard work providing instructions & drivers redundant :D

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by step »

@rcrsn51 do you know if this universal driver aims to befriend most printer hardware and page description languages or if the printers will need to comply with a universal driver spec in order to be accessible?

User avatar
rcrsn51
Posts: 1390
Joined: Sun Aug 23, 2020 4:26 pm
Been thanked: 357 times

Re: Google Cloud Print is Dead - Long Live Remote Printing..!!

Post by rcrsn51 »

step wrote: Sun Jan 24, 2021 6:15 pm

@rcrsn51 do you know if this universal driver aims to befriend most printer hardware and page description languages or if the printers will need to comply with a universal driver spec in order to be accessible?

The printer must be advertised as "AirPrint-compatible". If it's "iOS-compatible", that probably means AirPrint. All the major vendors (HP, Canon, Epson, Brother) are now selling AirPrint-capable models that work from Linux in "driverless" mode.

It's too bad that people don't follow my Starter Kit threads. I have already discussed this issue at length.

Post Reply

Return to “Utility”