{"id":981,"date":"2012-05-23T16:56:40","date_gmt":"2012-05-23T15:56:40","guid":{"rendered":"http:\/\/cyberelk.net\/tim\/?p=981"},"modified":"2014-05-20T09:06:41","modified_gmt":"2014-05-20T08:06:41","slug":"some-benefits-of-printerd","status":"publish","type":"post","link":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/","title":{"rendered":"Some benefits of printerd"},"content":{"rendered":"<p>Recently I <a href=\"https:\/\/cyberelk.net\/tim\/2012\/05\/10\/announcing-printerd\" target=\"_blank\">talked about<\/a> a new print spooler under development, printerd. In that post I mentioned briefly how printerd is structured, but did not go very deeply into why or what the project is for.<\/p>\n<p>Firstly, printerd is experimental and is very far from being a functional print spooler. It doesn&#8217;t yet run any filters, for instance, and has no backends of its own to transport jobs to devices. So far it is just a test of what a Linux print spooler would look like if it were written today.<\/p>\n<p>There are several problems printerd aims to solve. Some of the solutions come automatically from implementing it as a polkit-enabled D-Bus system service.\u00a0 I mentioned one of them in the original post about printer: the fact of having an asynchronous client API. All D-Bus services can be used asynchronously thanks to the D-Bus client library. This approach means the print dialog will be able to use printerd without blocking (and without having to start another thread to use it).<\/p>\n<p><!--more--><\/p>\n<p>Another benefit is the fact that security\/authentication can be made much cleaner and more well integrated into a desktop system if polkit is the basis for policy decisions. Although there is some support for adding polkit support to CUPS in the shape of <a href=\"http:\/\/www.vuntz.net\/journal\/post\/2010\/02\/19\/A-few-words-about-cups-pk-helper...\" target=\"_blank\">cups-pk-helper<\/a>, the way this works is to effectively bypass the standard CUPS policy mechanism. In order to completely limit some operation from users, two different policies must be changed: the built-in CUPS policy in cupsd.conf, and the polkit policy for cups-pk-helper.<\/p>\n<p>In contrast, printerd&#8217;s only interface is D-Bus and it uses polkit to authenticate operations. If extra security policy is added in future that cannot be expressed using polkit (for instance, printer-specific policy rules like CUPS has), that extra policy layer will be in addition to polkit, not an alternative. Currently, for example, cancelling a job requires that the user is permitted to use the org.freedesktop.printerd.job-cancel action (a polkit check), as well as being the user that submitted the job in the first place (an additional check). Both requirements must be fulfilled.<\/p>\n<p>One more benefit of printerd is the idea of splitting the IPP server out from the local spooler. Currently printerd only spools files and does not provide IPP services but the idea is that when it does, this will be implemented out-of-process by a program that acts as a client to printerd. It will use printerd&#8217;s D-Bus interface, just like any other client. That way, users that want to print to local printers but are not interested in sharing those printers on the network don&#8217;t even have to run the IPP server. In fact, as printerd is an activatable system service, the spooler itself won&#8217;t even be running unless there is something for it to do.<\/p>\n<p>By accepting only one format for printing, some complexity can be removed from the spooler. Generally people print from applications that generate PDF for printing. By using PDF as the required format, the task of selecting pages and arranging several pages onto each side (i.e. number-up) is hopefully made a little easier, as the structure of PDF makes this task more straightforward than PostScript does. Increasingly printers are able to understand PDF natively themselves. This means converting between formats can be kept to a minimum.<\/p>\n<p>Finally, printerd is experimental, so ideas can be tested and developed. For example, I hope to get printerd to improve the latency between cancelling a job and having the printer stop feeding paper, by splitting the backend out of the filter pipeline, killing its input, and telling it to discard its send buffer. Another idea related to separating the filter pipeline from the backend is to begin filtering the next job before the backend finishes clearing out the last of its send buffer. I&#8217;m sure there are other areas for improvement that can be played around with in a project like printerd.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently I talked about a new print spooler under development, printerd. In that post I mentioned briefly how printerd is structured, but did not go very deeply into why or what the project is for. Firstly, printerd is experimental and is very far from being a functional print spooler. It doesn&#8217;t yet run any filters, [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[3],"tags":[77,28],"class_list":["post-981","post","type-post","status-publish","format-standard","hentry","category-software","tag-printerd","tag-printing"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Some benefits of printerd - PRINT HEAD<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Some benefits of printerd - PRINT HEAD\" \/>\n<meta property=\"og:description\" content=\"Recently I talked about a new print spooler under development, printerd. In that post I mentioned briefly how printerd is structured, but did not go very deeply into why or what the project is for. Firstly, printerd is experimental and is very far from being a functional print spooler. It doesn&#8217;t yet run any filters, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/\" \/>\n<meta property=\"og:site_name\" content=\"PRINT HEAD\" \/>\n<meta property=\"article:published_time\" content=\"2012-05-23T15:56:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-05-20T08:06:41+00:00\" \/>\n<meta name=\"author\" content=\"Tim Waugh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Tim Waugh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2012\\\/05\\\/23\\\/some-benefits-of-printerd\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2012\\\/05\\\/23\\\/some-benefits-of-printerd\\\/\"},\"author\":{\"name\":\"Tim Waugh\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#\\\/schema\\\/person\\\/23b749f30a67f1b1c6af17024fc94bf6\"},\"headline\":\"Some benefits of printerd\",\"datePublished\":\"2012-05-23T15:56:40+00:00\",\"dateModified\":\"2014-05-20T08:06:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2012\\\/05\\\/23\\\/some-benefits-of-printerd\\\/\"},\"wordCount\":657,\"publisher\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#\\\/schema\\\/person\\\/23b749f30a67f1b1c6af17024fc94bf6\"},\"keywords\":[\"printerd\",\"printing\"],\"articleSection\":[\"Software\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2012\\\/05\\\/23\\\/some-benefits-of-printerd\\\/\",\"url\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2012\\\/05\\\/23\\\/some-benefits-of-printerd\\\/\",\"name\":\"Some benefits of printerd - PRINT HEAD\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#website\"},\"datePublished\":\"2012-05-23T15:56:40+00:00\",\"dateModified\":\"2014-05-20T08:06:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2012\\\/05\\\/23\\\/some-benefits-of-printerd\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2012\\\/05\\\/23\\\/some-benefits-of-printerd\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2012\\\/05\\\/23\\\/some-benefits-of-printerd\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Some benefits of printerd\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#website\",\"url\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/\",\"name\":\"PRINT HEAD\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#\\\/schema\\\/person\\\/23b749f30a67f1b1c6af17024fc94bf6\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#\\\/schema\\\/person\\\/23b749f30a67f1b1c6af17024fc94bf6\",\"name\":\"Tim Waugh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/printhead.png\",\"url\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/printhead.png\",\"contentUrl\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/printhead.png\",\"width\":731,\"height\":140,\"caption\":\"Tim Waugh\"},\"logo\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/wp-content\\\/uploads\\\/2023\\\/01\\\/printhead.png\"},\"sameAs\":[\"http:\\\/\\\/cyberelk.net\\\/tim\"],\"url\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/author\\\/twaugh\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Some benefits of printerd - PRINT HEAD","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/","og_locale":"en_GB","og_type":"article","og_title":"Some benefits of printerd - PRINT HEAD","og_description":"Recently I talked about a new print spooler under development, printerd. In that post I mentioned briefly how printerd is structured, but did not go very deeply into why or what the project is for. Firstly, printerd is experimental and is very far from being a functional print spooler. It doesn&#8217;t yet run any filters, [&hellip;]","og_url":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/","og_site_name":"PRINT HEAD","article_published_time":"2012-05-23T15:56:40+00:00","article_modified_time":"2014-05-20T08:06:41+00:00","author":"Tim Waugh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tim Waugh","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/#article","isPartOf":{"@id":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/"},"author":{"name":"Tim Waugh","@id":"https:\/\/cyberelk.net\/tim\/#\/schema\/person\/23b749f30a67f1b1c6af17024fc94bf6"},"headline":"Some benefits of printerd","datePublished":"2012-05-23T15:56:40+00:00","dateModified":"2014-05-20T08:06:41+00:00","mainEntityOfPage":{"@id":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/"},"wordCount":657,"publisher":{"@id":"https:\/\/cyberelk.net\/tim\/#\/schema\/person\/23b749f30a67f1b1c6af17024fc94bf6"},"keywords":["printerd","printing"],"articleSection":["Software"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/","url":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/","name":"Some benefits of printerd - PRINT HEAD","isPartOf":{"@id":"https:\/\/cyberelk.net\/tim\/#website"},"datePublished":"2012-05-23T15:56:40+00:00","dateModified":"2014-05-20T08:06:41+00:00","breadcrumb":{"@id":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cyberelk.net\/tim\/2012\/05\/23\/some-benefits-of-printerd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cyberelk.net\/tim\/"},{"@type":"ListItem","position":2,"name":"Some benefits of printerd"}]},{"@type":"WebSite","@id":"https:\/\/cyberelk.net\/tim\/#website","url":"https:\/\/cyberelk.net\/tim\/","name":"PRINT HEAD","description":"","publisher":{"@id":"https:\/\/cyberelk.net\/tim\/#\/schema\/person\/23b749f30a67f1b1c6af17024fc94bf6"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cyberelk.net\/tim\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/cyberelk.net\/tim\/#\/schema\/person\/23b749f30a67f1b1c6af17024fc94bf6","name":"Tim Waugh","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/cyberelk.net\/tim\/wp-content\/uploads\/2023\/01\/printhead.png","url":"https:\/\/cyberelk.net\/tim\/wp-content\/uploads\/2023\/01\/printhead.png","contentUrl":"https:\/\/cyberelk.net\/tim\/wp-content\/uploads\/2023\/01\/printhead.png","width":731,"height":140,"caption":"Tim Waugh"},"logo":{"@id":"https:\/\/cyberelk.net\/tim\/wp-content\/uploads\/2023\/01\/printhead.png"},"sameAs":["http:\/\/cyberelk.net\/tim"],"url":"https:\/\/cyberelk.net\/tim\/author\/twaugh\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pnnS2-fP","_links":{"self":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/posts\/981","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/comments?post=981"}],"version-history":[{"count":4,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/posts\/981\/revisions"}],"predecessor-version":[{"id":1035,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/posts\/981\/revisions\/1035"}],"wp:attachment":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/media?parent=981"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/categories?post=981"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/tags?post=981"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}