Printing from legacy apps on the pocket desktop

Bug #1541787 reported by Till Kamppeter
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
avahi (Ubuntu)
New
Undecided
Unassigned
cups-filters (Ubuntu)
New
Undecided
Unassigned
libertine (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

I have worked out a concept on how to introduce printing support to the phone (tablet, mobile devices) keeping the resource consumption low, starting the needed daemons on-demand.

The daemons needed for printing are avahi-daemon, cups-browsed, and CUPS. avahi-daemon discovers printers on the network, cups-browsed creates local CUPS queues pointing to the remote printers and CUPS does the actual printing.

CUPS is started socket-activated by Upstart and stops by itself when it gets idle. So CUPS for example starts when cups-browsed tries to create a print queue or an app sends a job to be printed. avahi-daemon and cups-browsed will be started by the print dialog of Ubuntu Touch, right before the dialog opens, making available printers on the network appear within seconds in the dialog. When the dialog closes, either because the user sent the print job or because he has cancelled, it kills avahi-daemon. cups-browsed and CUPS terminate automatically then as soon as the user's job is printed (plus a timeout).

If you connect a monitor to the pone and so fire up the pocket desktop you are able to run legacy apps (apps designed for a conventional PC) which have print functionalities but their print dialogs do not start and kill daemons, they assume that all daemons and print queues are readily available. CUPS would be fired up automatically by any app's print functionality due to the socket activation, but then we would not have print queues on our phone as avahi-daemon and cups-browsed are not running.

So what has to be made sure is that cups-browsed and avahi-daemon are running if at least one of

 - the native print dialog of Ubuntu Touch
 - any legacy app

are running. So when one of these get started the two daemons need to get started and if all of these terminate avahi-daemon needs to get killed, so that the rest of the printing stack shuts down when all jobs get done.

We assume that ubuntu-app-launch is the place where this should be done, please re-assign if this is not correct. I also add cups-filters (source of cups-browsed) and avahi-daemon tasks for the case that perhaps here something needs to get done, too.

Revision history for this message
Ted Gould (ted) wrote :

I think that this probably belongs more with libertine as it tracks the container's life. It'll probably also need to connect some sockets.

affects: ubuntu-app-launch (Ubuntu) → libertine (Ubuntu)
Stephen M. Webb (bregma)
Changed in libertine (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
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.