For printing on Ubuntu Touch with daemons running on-demand, correct *.override files are needed

Bug #1538701 reported by Till Kamppeter
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical System Image
In Progress
Undecided
Unassigned
lxc-android-config (Ubuntu)
In Progress
High
Unassigned

Bug Description

I am working on getting the Ubuntu printing stack onto the phone, see bug 1520346, bug 1519914, and bug 1509423 (see details about my setup in these bug reports).

For that the packages cups-daemon, cups-browsed, avahi-daemon, cups-core-drivers, cups-filters-core-drivers, cups-client, and their dependencies are planned to be added to the system.

In addition, the system needs to be configured to run avahi-daemon, cups-browsed, and cupsd on-demand. To do so, the following three *.override files are needed in /etc/init/:

avahi-daemon.override:

----------
# avahi-daemon - mDNS/DNS-SD daemon
# overrides for touch
# do not start avahi-daemon on boot
manual
----------

cups-browsed.override:

----------
# cups-browsed - Bonjour remote printer browsing daemon
# overrides for touch
# do not start cups-browsed on boot
manual
# do not respawn when cups-browsed shuts down by itself
normal exit 0
# start cups-browsed in auto-shutdown mode, creating queues for native IPP
# network printers, and using IPv4 IPs to reference remote printers
exec /usr/sbin/cups-browsed --autoshutdown=avahi -o IPBasedDeviceURIs=IPv4 -o CreateIPPPrinterQueues=Yes
----------

cups.override:

----------
# cups - CUPS Printing spooler and server
# overrides for touch
# socket activation
start on socket PROTO=inet PORT=631 ADDR=127.0.0.1
# do not respawn when cupsd shuts down by itself
normal exit 0
# start cupsd in auto-shutdown mode
exec /usr/sbin/cupsd -f -l
----------

I have tested these files on a Nexus 4 with the current Xenial development environment:

ubuntu-device-flash touch --channel=ubuntu-touch/devel-proposed/ubuntu

A print dialog working according to the principles of the attached script phone-print.sh will print in this environment and all daemons will terminate when printing is done.

Run the script always with three arguments:

./phone-print.sh <seconds> <queue> <file>

<seconds> is the time how long the printer list is shown, <queue> is the queue on which you print the test job, and <file> is the file to be printed, preferably PDF. The script will at first show the printer list updating every second, then print a job and afterwards observe the cups-related processes, so that it demoes nicely the process.

A merge proposal for the *.override files will be added to this bug report.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Changed in lxc-android-config (Ubuntu):
importance: Undecided → High
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :
Changed in canonical-devices-system-image:
status: New → In Progress
Changed in lxc-android-config (Ubuntu):
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.