Comment by amluto
10 years ago
One of these days, someone may give me a credible explanation of why printing involves a systemwide daemon, but I kind of doubt it. I'd love to see a rearchitecting of the whole mess such that the whole print daemon runs in in a sandbox with user privileges.
How would you avoid having a common print queue, when all the documents can't fit in the printer memory?
It's been a while since I bought a printer that connected via any means other than Ethernet or Wifi, so the printer already needs to manage its own queue regardless of what the client computers do.
For printer that attach directly, there could be a daemon that arbitrates access and handles accounting or the system could simply allocate the printer to the logged-in user. For directly connected printers on multi-user systems, you'd want a real daemon, of course.
For daemons that mediate access, IMO the arbitration and accounting should be split from formatting and rasterization (if needed). For accounting and arbitration, the right way to do it is to speak something like Printer Job Language. I actually wrote a daemon like this years ago. I wonder if I still have the code. It actually counted pages regardless of how they were submitted.
Anyway, for a normal desktop machine, I think that the system daemon is silly these days.
I think you overestimate the queue size of a regular printer. Many still only have 32MB of RAM, so they can barely hold more than a few pages, if they have graphics. In my office, it's common for the OS queue to be waiting for the printer queue to free up some space.
2 replies →
Have the printer act as a server to which each of the sandboxed print queues talks directly, seeking permission to send data, and let the printer handle flow control.
Not saying this is necessarily a good idea, but it avoids a system-wide print queue, all you need at the system level is a service locator to let you know where the printer is that you need to contact.
It's not a bad idea, that's a print server or IP printer. But it's a modern system, and the print daemon architecture predates printers having their own microprocessors. It may even predate TCP.
1 reply →
Ostensibly, you're right, but then the answer to "why do we need a system daemon" is "because Linux distros don't control the firmware of all printers nor can they tell manufacturers what to do."
2 replies →