====== Cloud Print Cups Service ====== ===== Install Cloud Print Service State File Generator ===== * [[https://www.google.com/chrome|Download]] and Install the latest Chrome Browser * Run the generate_cloudprint_config.py script wget http://www.google.com/support/enterprise/static/chromeos/docs/admin/en/generate_cloudprint_config.py.zip unzip generate_cloudprint_config.py.zip chmod 755 generate_cloudprint_config.py ===== Generate Service State File ===== sudo ./generate_cloudprint_config.py Email Address: Password for user@domain.com: Connector Id: Printserver URL with port (keep empty to skip): Config file ptr.conf generated for proxy NAME * This makes a file called **name.conf** in your current directory ===== Setup a Chrome Profile Directory ===== mkdir /etc/cloudprint cp ptr.conf /etc/cloudprint/Service State ===== Run Cloud Print Service (chrome) ===== /opt/google/chrome/chrome --type=service --enable-cloud-print-proxy --no-service-autorun --noerrdialogs --user-data-dir=/etc/cloudprint/ This starts the cloudprint service if you go to the [[https://www.google.com/cloudprint?user=0#printers|Cloud Print Control Panel]] as user **user@domain.com** you should see the printers from your local cups server. This command will not return the terminal so we will need to add a script for that. ===== Startup Script ===== #!/bin/sh /opt/google/chrome/chrome --type=service --enable-cloud-print-proxy --no-service-autorun --noerrdialogs --user-data-dir=/etc/cloudprint/ & #!/bin/sh restart() { killall -9 chrome sleep 2 /scripts/cloud_print.sh } restart TERM="xterm-color" SHELL="/bin/bash" XDG_SESSION_COOKIE="5e1b8a057502aa735ff8be1600000177-1382969815.874167-799647066" USER="root" MAIL="/var/mail/root" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" PWD="/root" LANG="en_US.UTF-8" SHLVL="1" HOME="/root" LOGNAME="root" LESSOPEN="| /usr/bin/lesspipe %s" LESSCLOSE="/usr/bin/lesspipe %s %s" _="/usr/bin/env" ssh root@localhost "/scripts/restart_cloudprint.sh" exit 0 * Lastly configure **key based ssh authentication**. ==== Notes ==== Using ssh was the only way I could get cloudprint to work on startup. I also found that after a few hours cloud print would stop working. I found if I restart chrome every hour the problem went away. You might want to have cron run **ssh root@localhost "/scripts/restart_cloudprint.sh"** every hour.