← Back to team overview

touch-packages team mailing list archive

[Bug 1541787] [NEW] Printing from legacy apps on the pocket desktop

 

Public bug reported:

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.

** Affects: avahi (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: cups-filters (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: ubuntu-app-launch (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: cups-filters (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: avahi (Ubuntu)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to avahi in Ubuntu.
https://bugs.launchpad.net/bugs/1541787

Title:
  Printing from legacy apps on the pocket desktop

Status in avahi package in Ubuntu:
  New
Status in cups-filters package in Ubuntu:
  New
Status in ubuntu-app-launch package in Ubuntu:
  New

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1541787/+subscriptions