Install Google Cloud Print on a Linux server

This article is for administrators who are familiar with Linux and Python.

In addition to Windows, Mac, or Linux computers, you can run Google Cloud Print on a Linux server in "headless" mode; that is, without a monitor, keyboard, or mouse attached.

  1. Install the latest version of the Chrome browser on your Linux server.
  2. Download the generate_cloudprint_config.py script and uncompress it. You may need to right click and select "Save Link As..." The script will require you to provide following parameters:
    • Username: The Google account to which you want to register printers. For enterprises, this is often an account that multiple admins can access rather than a personal account.
    • Password: The password for the account above. If the account requires 2-step verification, you may need to enter an application-specific password.
    • Connector ID: A unique ID for this Cloud Print Connector instance. For example: googleprinters_mtv_building44.
    • Print Server: If you don't have a specific CUPS print server you want to use, leave this field empty and click Enter to use the default print server of the host machine. To use a specific CUPS print server, enter its name in this format: http://printserver.google.com:631. If you need to use multiple CUPS print servers from the same connector, edit the config file manually.
  3. Run the script. The script generates a Cloud Print config file with the name connector_id.conf in the same folder.
  4. Rename the file Service State, using that exact spacing and capitalization, and move it to the directory in which you want it to reside.
  5. Run the following command to start the Cloud Print Connector:
    /opt/google/chrome/chrome --type=service --enable-cloud-print-proxy --no-service-autorun --noerrdialogs --user-data-dir=path_to_config

    path_to_config is the path to your Service State file without the Service State filename.

    If using a remote terminal, detach the Cloud Print Connector from the current terminal as follows:

    start-stop-daemon -S -m working_dir -x /opt/google/chrome/chrome -- --type=service --enable-cloud-print-proxy --no-service-autorun --noerrdialogs --user-data-dir=path_to_config

    For additional on-screen printer logging, add:

    --enable-logging=stderr --v=1

    To save the printer logs to the chrome_debug.log file, add:

    --enable-logging --v=1

    To stop Cloud Print connector, enter the kill command.

    If Cloud Print connector crashes, you can use any standard Linux tools to run Cloud Print connector on machine startup or restart.

Contact Chrome support for questions on setting up Google Cloud Print with Linux print servers.