User Tools

Site Tools


chromebooks:cloudprint_cups

This is an old revision of the document!


Cloud Print Cups Service

Install Cloud Print Service State File Generator

  • 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: <user@domain.com>
Password for user@domain.com: <PASSWORD>
Connector Id: <NAME>
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 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

/scripts/cloud_print.sh
#!/bin/sh
 
/opt/google/chrome/chrome --type=service --enable-cloud-print-proxy --no-service-autorun --noerrdialogs --user-data-dir=/etc/cloudprint/ &
/scripts/restart_cloudprint.sh
#!/bin/sh
 
restart()
{       killall -9 chrome
        sleep 2
        /scripts/cloud_print.sh
}
 
restart
/etc/rc.local
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.

Using ssh was the only way I could get cloudprint to work on startup. I also found running ssh root@localhost “/scripts/restart_cloudprint.sh” every hour from cron helped to keep the connection to cloud print current.

chromebooks/cloudprint_cups.1384463070.txt.gz · Last modified: 2013/11/14 15:04 by tschulz