Introduction: Raspberry Pi + Google Cloud Print

My first Instructable "blushing".. If anything needs deeper explanation, please let me know and I'll update where needed. I am by far no linux or cloud print expert, just made this after my experience with this configuration. Thought someone else might find part or all of it useful in their search for a similar solution.

I had google cloud print installed on my Windows machine providing the print needs for my kids and wife's chromebooks, android tablets, and phones. It was all working fine as long as my computer was on and functional. However from time to time, my computer wasn't on or had some issue with the printer/cloud print service installed on my machine.

I ventured out to find some kind of cheap out of box solution to my problem. However I as not able to find anything. So I began looking to see what others were doing and to my suprise there were many people claiming to have used the raspberry pi in various configurations to do the same thing. I thought wow, it can do that? I ran out to amazon and bought me one in a package that had mostly everything I needed.

I tried for several days to get google cloud print active on my raspberry pi using just about every available OS and configuration I could find. I have a DCP-7065DN printer, the drivers I downloaded from Brother's website just would not work for the printer using Raspbian. Other OSes were just too console-ish for my liking, coming from a windows background, I like my GUIs.

So I decided to try Ubuntu instead... thats where this instructable begins.

Step 1: Whats Needed?

You'll need the following items get/have the following items.

  1. Raspberry Pi 3
  2. Applicable power supply for the Raspberry Pi (5v 2.5 amp) with Micro USB connection
  3. A network, wired or wireless
  4. A Linux install-able USB/network printer
  5. A 32GB (compatible with Raspberry Pi) micro sd card.
  6. Software
    1. SDFormatter
    2. Win32DiskImager
    3. Ubuntu MATE
    4. 7-zip

Start by downloading the software after you have all the other items.

Step 2: Prepare the Sd Card

Prepare your sd card using the software you downloaded.

  1. Download Ubuntu Mate
    1. Using 7zip, unzip the xz file.
    2. You should have an img file after the unzip process.
  2. Install SDFormatter and format the sd card.
    1. Insert your sd card into a reader attached to your machine and start the software.
    2. Select the drive letter for your card and press format.
    3. When done, close SDFormatter.
  3. Install Win32 Disk Imager and mount the Ubuntu Mate img file onto the sd card.
    1. Insert your sd card into a reader attached to your machine and start the software.
    2. Using the software, locate the img file and select the drive that corresponds with your sd card.
    3. Ensuring that you have selected the correct drive letter, press Write.
    4. When done, close the software.
    5. Eject the card from your computer.
  4. Note that if you mess up the Ubuntu Mate installation, or the sd card goes bad over time, just come back to this step and make a new one.

Step 3: Install Ubuntu Mate on Your Raspberry PI

Install Ubuntu Mate on your Raspberry PI.

  1. Remove the power from the Raspberry if its already powered.
    1. Wait a minute before messing with it if it was powered.
  2. Attach a HDMI device (so you can see what you're doing)
  3. Attach a USB keyboard and mouse (so you can type and stuff)
  4. Attach an Ethernet cable that has access to a network with internet access.
  5. Attach your printer.
    1. If USB, plug in the cable.
    2. If network, make sure its on the same network as the Raspberry Pi.
  6. Insert the SD Card you prepared in the last step.
  7. Apply the power supply.
  8. Wait for the installation to finish.
    1. At the end you will be asked to provide some credentials.
    2. Enter a username/password and select automatically log in.
    3. Press OK.

Step 4: Configuring Your Mate

Now we'll configure your mate.

  1. On the welcome screen click Software
  2. Now find the icon on the top of the window that looks like an arrow pointing down
    1. click it
  3. Scroll down to find Ubuntu Software Center and click Install.
  4. After the install finishes find it in System->Administration->"Ubuntu Software Center" and launch it.
  5. After it comes up type "Google Cloud Print" into the search window.
  6. It might take a minute but the results will display showing one application called "Google Cloud Print Proxy"
    1. Select this item and press install.
  7. Lets install your printer next.
    1. Navigate to System->Administration->Printers
    2. When the dialog opens, select the Add button and follow the instructions to add a new printer.
      1. Due to the many different ways of communicating with printers I cannot spell out each.
      2. However if its USB and connected during this process, it will most likely already be installed, just try to print a test page to ensure its functioning correctly.
      3. If its a network printer I assume you know what you're looking for.
        1. In my case its network, but I had to use the default printer port of 9100 to get it to print correctly, rather than any of those other fancy printer protocols. If nothing else works for you try this configuration.

Step 5: Setup Google Cloud Print

Now lets setup Google Cloud Print to work on the system.

  1. Open a terminal window and type the command "cloudprint"
    1. The first line after the command executes is going to state something like:
    2. Go to http://goo.gl/printer/1QA83s to claim this printer
      1. Copy and paste the link or type it into your browser url field and press enter.
      2. You'll be prompted by google to provide your credentials for your Google account. Enter them.
      3. Now you'll have to click the claim button to claim the printer(s).
      4. In that terminal window where cloudprint is running, you should see it acknowledge that the printers have been claimed. This is good!
      5. After you've claimed them you'll now want to view them to see what's available.
      6. In my case my one printer is now visible! This means we've done well so far. If you do not see your printer, you'll want to review the previous steps to see if something was missed.
      7. Now we want to be sure its actually going to work, so click that "Google Cloud Print Home" link.
      8. It'll bring you to a home page for Google Cloud Print.
      9. There's a "try it now" button, click it.
      10. You'll see your printer(s) again. Click one.
      11. Now that Print button should be enabled... whew... click it.
      12. Shortly there after you should see something in that terminal window where we had started the cloudprint application stating that a new print job has been received!
      13. Now your printer should print the document!

Step 6: Making It Just Work

OK if you've made it this far, you're going to want this to just work all the time without having to mess with it much. So lets setup a terminal command so it runs at startup.

  1. Go to menu item System->Preferences->Personal->"Start Up Applications"
  2. When the dialog displays, click Add.
    1. Enter "mate-terminal -e cloudprint" into both the command and comment fields, without the quotes
    2. Enter a name for it, I named it "googlecloudprint" without the quotes
      1. It's not really needed in the comment field but will show you the command that will be executed in the comment below the command in the list.
    3. Press Save
  3. Now restart the system to verify the startup command is working.
  4. After restarting a terminal window should open and display on the desktop.
  5. DONE!

Step 7: Finishing Up

You really don't need to keep the keyboard, mouse or hdmi cable connected anymore so you can just unplug them. Depending on your printer config, you could only have the ethernet (if you didn't configure wireless) and a power cable connected. Mine just sits next to my pc plugged into the power supply with a wireless connection so no additional cables are needed.