Google Cloud Print CUPS connector


Primeiramente gostaria de salientar que não sou o autor principal do conteúdo deste artigo. A minha intenção é de mostrar o que outros autores tem realizado (referenciando links para o conteúdo original) neste blog até como um guia pessoal para uso próprio e ainda compartilhar minhas anotações e pequenas modificações que realizo no conteúdo, desejando que possa ajudar mais alguém em algum lugar.
First and foremost, I take no credit for any of this post’s content. I am really just taking what others have done (which I have links to bellow) and am putting it on my blog for a personal reference and hopefully the small changes that I made to their guides will help someone somewhere.

link: https://github.com/google/cloud-print-connector/wiki/Build-from-source#build


apt-get install build-essential libcups2-dev libavahi-client-dev git bzr 

$ git clone https://go.googlesource.com/go ~/go1.4
$ cd ~/go1.4/src
$ git checkout go1.4.3
$ ./all.bash

$ git clone https://go.googlesource.com/go ~/go1.5 $ cd ~/go1.5/src $ git checkout go1.5.2 $ ./all.bash

$ e
cho 'export GOPATH=$HOME/go' >> ~/.bashrc $ echo 'PATH="$PATH:$HOME/go1.5/bin:$GOPATH/bin"' >> ~/.bashrc $ source ~/.bashrc $ go version
go get github.com/google/cloud-print-connector/...





sudo useradd -s /usr/sbin/nologin -r -M cloud-print-connector
sudo mkdir /opt/cloud-print-connector
sudo mv ~/go/bin/gcp-cups-connector /opt/cloud-print-connector
sudo mv ~/go/bin/gcp-connector-util /opt/cloud-print-connector
sudo chmod 755 /opt/cloud-print-connector/gcp-cups-connector
sudo chmod 755 /opt/cloud-print-connector/gcp-connector-util

sudo chown cloud-print-connector:cloud-print-connector /opt/cloud-print-connector/gcp-cups-connector
sudo chown cloud-print-connector:cloud-print-connector /opt/cloud-print-connector/gcp-connector-util
rm -f ~/go/bin/gcp*
/opt/cloud-print-connector/gcp-connector-util init
sudo mv ~/gcp-cups-connector.config.json /opt/cloud-print-connector/
sudo chmod 660 /opt/cloud-print-connector/gcp-cups-connector.config.json
sudo chown cloud-print-connector:cloud-print-connector /opt/cloud-print-connector/gcp-cups-connector.config.json




link: https://github.com/google/cloud-print-connector/wiki/Run-Connector-Automatically-on-Boot

Systems using Systemd

cd /opt/cloud-print-connector/
wget https://raw.githubusercontent.com/google/cloud-print-connector/master/systemd/cloud-print-connector.service
install -o root -m 0664 cloud-print-connector.service /etc/systemd/system
systemctl enable cloud-print-connector.service
systemctl start cloud-print-connector.service
systemctl status cloud-print-connector.service
systemctl stop cloud-print-connector.service


Other Systems

Add the following lines to /etc/rc.local just before the exit 0 line at the end. Note that this assumes gcp-cups-connector is installed at /home/pi/cups-connector/gcp-cups-connector.

# CUPS Connector:
#   sleep:                                      hack to wait for the network interface to come up
#   su ... pi:                                  run as user "pi"
#   --login:                                    environment similar to "pi" instead of "root"
#   --command:                                  run this thing
#   /home/pi/cups-connector/gcp-cups-connector: thing to run
#   &:                                          run the command "in the background"
sleep 60
/opt/cloud-print-connector/gcp-cups-connector &

Take a look at: 
https://www.google.com/cloudprint/#printers


O URL específico do gadget não foi encontrado



Comments