Announcing printerd

For the last few weeks I’ve been working on an experimental new print spooler called printerd. It was designed in collaboration with Richard Hughes and it aims to be a modern print spooler for Linux.

It is a polkit-enabled D-Bus system service, written using the GLib object system. Although modelled on concepts from IPP (Internet Printing Protocol), printerd is not in itself an IPP server. Its only interface is D-Bus, although the aim is to be able to implement an IPP server on top of the D-Bus API as a separate process. Having a D-Bus interface means that applications wanting to print automatically get to use printerd asynchronously.

As a design decision, the range of input formats accepted by printerd will be very limited: essentially only PDF. The existing CUPS drivers and backends will be compatible with printerd.

There isn’t much written yet aside from the basic framework and a very simple command line tool.

Feel free to take a look around: http://github.com/hughsie/printerd

$ pd-client -v print-files myprinter ~/Documents/portrait-a4.pdf
TI:15:09:58    getting printerd manager
TI:15:09:58    Getting printer /org/freedesktop/printerd/printer/myprinter
TI:15:09:58    Job created: /org/freedesktop/printerd/job/1
TI:15:09:58    Document added
TI:15:09:58    Job started
Job path is /org/freedesktop/printerd/job/1

# printerd -v
TI:15:02:46    Entering main event loop
TI:15:02:46    add device usb://HP/DESKJET%20990C?serial=US05N1J00XLG [...]
TI:15:02:46    Connected to the system bus
TI:15:02:46    Acquired the name org.freedesktop.printerd on the system message bus
TI:15:08:52    Handling GetDevices
TI:15:08:57    Handling GetDevices
TI:15:09:12    Checking authorization of :1.642 for org.freedesktop.printerd.printer-add
TI:15:09:12    Authorized
TI:15:09:12    Creating printer from device HEWLETT_PACKARD_DESKJET_990C_US05N1J00XLG
TI:15:09:12    add printer myprinter
TI:15:09:58    Checking authorization of :1.647 for org.freedesktop.printerd.job-add
TI:15:09:58    Authorized
TI:15:09:58    Creating job for printer myprinter
TI:15:09:58    New job path is /org/freedesktop/printerd/job/1
TI:15:09:58    Created job path is /org/freedesktop/printerd/job/1
TI:15:09:58    [Job 1] Adding document
TI:15:09:58    [Job 1] Got file descriptor: 10
TI:15:09:58    [Job 1] Starting job
TI:15:09:58    [Job 1] Spooling
TI:15:09:58    [Job 1]   Created temporary file /tmp/printerd-spool-AHFWDW
TI:15:09:58    [Job 1]   Set job state to pending
TI:15:09:58    Job 1 changed state: pending
TI:15:09:58    Printer for job 1 idle so starting job
TI:15:09:58    [Job 1] Starting to process job
TI:15:09:58    [Job 1] Using device URI usb://HP/DESKJET%20990C?serial=US05N1J00XLG
TI:15:09:58    [Job 1] Executing /usr/lib/cups/backend/usb
TI:15:09:58    [Job 1]  Env: DEVICE_URI=usb://HP/DESKJET%20990C?serial=US05N1J00XLG
TI:15:09:58    [Job 1]  Arg: usb://HP/DESKJET%20990C?serial=US05N1J00XLG
TI:15:09:58    [Job 1]  Arg: 1
TI:15:09:58    [Job 1]  Arg: :1.647
TI:15:09:58    [Job 1]  Arg: job 1
TI:15:09:58    [Job 1]  Arg: 1
TI:15:09:58    [Job 1]  Arg:
TI:15:09:58    [Job 1] Read 1024 bytes from spool file
TI:15:09:58    Job 1 changed state: processing
TI:15:09:58    [Job 1] Wrote 1024 bytes to backend
TI:15:09:58    [Job 1] Read 1024 bytes from spool file
TI:15:09:58    [Job 1] Wrote 1024 bytes to backend
TI:15:09:58    [Job 1] Read 1024 bytes from spool file
TI:15:09:58    [Job 1] Wrote 1024 bytes to backend
TI:15:09:58    [Job 1] Read 1024 bytes from spool file
TI:15:09:58    [Job 1] Wrote 1024 bytes to backend
TI:15:09:58    [Job 1] Read 1024 bytes from spool file
TI:15:09:58    [Job 1] Wrote 1024 bytes to backend
TI:15:09:58    [Job 1] Read 1024 bytes from spool file
TI:15:09:58    [Job 1] Wrote 1024 bytes to backend
TI:15:09:58    [Job 1] Read 1024 bytes from spool file
TI:15:09:58    [Job 1] Wrote 1024 bytes to backend
TI:15:09:58    [Job 1] Read 1024 bytes from spool file
TI:15:09:58    [Job 1] Wrote 1024 bytes to backend
TI:15:09:58    [Job 1] Read 564 bytes from spool file
TI:15:09:58    [Job 1] Wrote 564 bytes to backend
TI:15:09:58    [Job 1] Spool finished
TI:15:09:58    [Job 1] backend: STATE: +connecting-to-device
TI:15:09:58    [Job 1] backend: DEBUG: Printer using device file "/dev/usb/lp0"...
TI:15:09:58    [Job 1] backend: STATE: -connecting-to-device
TI:15:09:58    [Job 1] backend: DEBUG: backendRunLoop(print_fd=0, device_fd=3, snmp_fd=-1, addr=(nil), use_bc=1, side_cb=0x7f053adc6c30)
TI:15:09:58    [Job 1] backend: DEBUG: Read 8192 bytes of print data...

UPDATE: Fixed URL as the project has moved to github.com.


Posted

in

by

Comments

23 responses to “Announcing printerd”

  1. Juergen Beisert avatar
    Juergen Beisert

    What is happen to the ‘printerd’ project? The link to the repository is dead. Any further progress?

  2. tim avatar

    There hasn’t been any progress for quite a while, largely due to other commitments. I’m not sure why the link is dead. Does gitorious aggressively purge idle repos?