Add Google cloud print to your printer

When I switched to Chromebook as my primary computer one thing I wasn’t so happy about was printing. I had to keep another Windows machine running and share its printing via Google cloud print service. As a Chromebook user I want to get rid of Windows and don’t like the idea of booting up the machine every time I want to print. Well, thanks to Raspberry Pi and Google CUPS connector I now can build a Google cloud print server box which I can leave it on all the time.
Basically the steps involved are setup Raspberry Pi to boot up Arch Linux, install CUPS, hook up the printer and load driver, and then add Google CUPS connector.

The hardware setup
  • One Raspberry Pi2 board.
  • Power adapter for your Rasberry Pi 2.
  • One microSD card at least 2GB.
  • Your printer connect to Rasberry Pi 2 USB slot.
  • Network cable from Rasberry Pi to your router.
The software setup
  • Install Arch Linux
    Visit Click on Platforms/ARMV7/Broadcom/Raspberry PI 2. Here the current direct link.
    Click on Installation tab and follow the instruction there. The instructions are for Linux host. You can use your “croutoned” Chromebook and run Linux command from chroot terminal. See my how to install Ubuntu on Chromebook for details. If you can’t run mkfs.vfat and mkfs.ext4 command, install dosfstools: .
    sudo apt-get install dosfstools
  • Install CUPS
    Remove the micro SD card from your host and insert it into the Raspberry Pi 2 box. Insert ethernet cable, and USB power to power it on. Run this command at your Ubuntu terminal to ssh in your Raspberry Pi box
    ssh alarm@192.168.1.xx
    Replace the IP with whatever the IP assigned by your router. Enter “alarm” for password.
    Get into root by run su command and use “root” for password.
    First update the installed packages with
    pacman -Syu
    Then install CUPS with
    pacman -S cups ghostscript
    Hit enter and y to choose default and proceed with cups installation.
    Start up CUPS and see if its working.
    systemctl start org.cups.cupsd.service
    Now you need to modify cups configuration file so you be able to remotely log in CUPS web interface.
    nano /etc/cups/cupsd.conf
    And modify the file to add these hi-lighted lines.

    Restart CUPS
    systemctl restart org.cups.cupsd.service
    Open a browser in another tab and log in CUPS web interface and see if it works. Use the same IP as SSH session above but add port 631.
    Go ahead and enable CUPS to start on every boot with
    systemctl enable org.cups.cupsd.service
  • Install the printer driver
    Back to the browser with the CUPS web interface, click Administration and then Add Printer tabs. Your printer should be listed under Local Printers or Network Printers. Click on the bubble on the connected printer and hit Continue. On next screens choose the Make and Model of your printer from the default CUPS driver. If the driver is not available you can download the PPD file from At openprinting website, enter Manufactuer and Model and download the PPD file to your host machine.
    Sometime the recommended driver is not really working. You can look through users comments and see if they recommend a better driver listed under Other drivers. Like in my case, the website recommends hpijs-pcl5e driver but hl1250 ends up as better driver for the Brother HL-2170W printer.
    Anyhow, click Choose File button and load the PPD file you just download from Hit Add Printer button to continue. After the driver is installed, print the test page by click on Manage Printers, click on the printer under Queue Name, then click on Maintenance and Print Test Page.
  • Install Google CUPS connector
    First install the required Avahi package

    Currently there is no Google CUPS connector binary available for Raspberry Pi on Arch Linux. So you have the option of building the google-cup-connector binary from the scratch by following the instruction at Or you can can download the binary I already built and here are the instructions.
    Back to the terminal with ssh session. First make sure you are in root. Run su and use “root” if not. Then run these commands to download the binary and the service unit for systemd.

    Then enable and start the google cloud print connector via systemd.

Your printer should now be recognized in your Chromebook. To test, hit Ctrl-P in Chrome browser and choose the printer, and print.

Resources for this hack

Arch Linux for ARM
Google CUPS connector
Arch Linux CUPS

How to install Ubuntu on your Chromebook.

Turn on developer mode

I’m using a Samsung ARM Chromebook so to enter developer mode I would need to first invoke the recovery mode by holding down Esc and Refresh keys and poke the Power button.
At the recovery screen press Ctrl-D (there’s no prompt). It will ask you to confirm, then reboot into developer mode. It’ll take about 15 minutes or so to reinstall the computer for developer mode.
In developer mode the Chromebook will show the scary boot recovery screen every time it boots up from powered-off state. You can either press Ctrl+D or wait 30 seconds to continue booting. Don’t hit the space bar unless you want to go back to original mode.
See the resource link below how to enter developer mode for other machines.

Install Ubuntu.

Log into your Chromebook and download latest Crouton at
Open a new terminal tab by hit Ctrl+Alt+T, and type shell and hit enter.
If you just want command line interface and no Ubuntu graphic desktop, run sh ~/Downloads/crouton -t cli-extra
This will save a lot of disk space and installation time. If you are more comfortable with regular Ubuntu desktop then use sh ~/Downloads/crouton -t unity. To see other available targets, run sh ~/Downloads/crouton -t help. The crouton script will take a while to finish. Just wait and hit enter when prompted.


You can now run Ubuntu on your Chromebook. You can open an Ubuntu terminals by hit Ctrl+Alt+T and

Resources for this hack

Developer information for Chrome-os devices

Expand SD root filesystem.

Run df -h

Insert SD card and run df -h again.

/dev/sdc2 is partition 2 which contains the root filesystem. We’re going to expand this filesystem to match its partition size.

And then enter these commands: d, 2, n, p, 2, hit enter, hit enter, w.

Now we need to resize the filesystem in partition 2. First we need to un-mount this partition. Refer to the df -h listing to see the mount point for /dev/sdc2.

Then do these commands:

When completed, run sync and then remove the SD card. Re-insert the SD card and run df -h again to confirm if the partition is expanded.