{"id":779,"date":"2009-07-26T18:42:35","date_gmt":"2009-07-26T17:42:35","guid":{"rendered":"http:\/\/cyberelk.net\/tim\/?p=779"},"modified":"2014-05-20T09:07:28","modified_gmt":"2014-05-20T08:07:28","slug":"d-bus-system-services-for-print-queues","status":"publish","type":"post","link":"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/","title":{"rendered":"D-Bus system services for print queues"},"content":{"rendered":"<p>Further to the recent work on replacing hal-cups-utils, I&#8217;ve now split out the parts that use CUPS into a D-Bus system service.  This allows udev to simply call the D-Bus methods and let the activated service deal with the potentially time-consuming bits.  It also makes it a bit easier to get the SELinux security labelling right.<\/p>\n<p>The interface is simple:<\/p>\n<p>bus <code>com.redhat.PrinterConfig<\/code><br \/>\nobject <code>\/com\/redhat\/PrinterConfig<\/code><br \/>\ninterface <code>com.redhat.PrinterConfig<\/code><\/p>\n<p><code>UsbPrinterAdd (STRING devpath, STRING deviceid)<br \/>\nUsbPrinterRemove (STRING devpath)<\/code><\/p>\n<p>Next step: a D-Bus service for finding an appropriate PPD file for a given IEEE 1284 Device ID.  This would allow the <code>PrinterConfig<\/code> implementation to avoid running a Python helper script to actually add the queue.  The same goes for bluetooth devices.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Further to the recent work on replacing hal-cups-utils, I&#8217;ve now split out the parts that use CUPS into a D-Bus system service. This allows udev to simply call the D-Bus methods and let the activated service deal with the potentially time-consuming bits. It also makes it a bit easier to get the SELinux security labelling [&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":[61,33,60,14,96,50,63,62],"class_list":["post-779","post","type-post","status-publish","format-standard","hentry","category-software","tag-bluetooth","tag-cups","tag-dbus","tag-printers","tag-software","tag-system-config-printer","tag-udev","tag-usb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>D-Bus system services for print queues - 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\/2009\/07\/26\/d-bus-system-services-for-print-queues\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"D-Bus system services for print queues - PRINT HEAD\" \/>\n<meta property=\"og:description\" content=\"Further to the recent work on replacing hal-cups-utils, I&#8217;ve now split out the parts that use CUPS into a D-Bus system service. This allows udev to simply call the D-Bus methods and let the activated service deal with the potentially time-consuming bits. It also makes it a bit easier to get the SELinux security labelling [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/\" \/>\n<meta property=\"og:site_name\" content=\"PRINT HEAD\" \/>\n<meta property=\"article:published_time\" content=\"2009-07-26T17:42:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-05-20T08:07:28+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=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2009\\\/07\\\/26\\\/d-bus-system-services-for-print-queues\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2009\\\/07\\\/26\\\/d-bus-system-services-for-print-queues\\\/\"},\"author\":{\"name\":\"Tim Waugh\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#\\\/schema\\\/person\\\/23b749f30a67f1b1c6af17024fc94bf6\"},\"headline\":\"D-Bus system services for print queues\",\"datePublished\":\"2009-07-26T17:42:35+00:00\",\"dateModified\":\"2014-05-20T08:07:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2009\\\/07\\\/26\\\/d-bus-system-services-for-print-queues\\\/\"},\"wordCount\":109,\"publisher\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#\\\/schema\\\/person\\\/23b749f30a67f1b1c6af17024fc94bf6\"},\"keywords\":[\"bluetooth\",\"cups\",\"dbus\",\"printers\",\"Software\",\"system-config-printer\",\"udev\",\"usb\"],\"articleSection\":[\"Software\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2009\\\/07\\\/26\\\/d-bus-system-services-for-print-queues\\\/\",\"url\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2009\\\/07\\\/26\\\/d-bus-system-services-for-print-queues\\\/\",\"name\":\"D-Bus system services for print queues - PRINT HEAD\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/#website\"},\"datePublished\":\"2009-07-26T17:42:35+00:00\",\"dateModified\":\"2014-05-20T08:07:28+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2009\\\/07\\\/26\\\/d-bus-system-services-for-print-queues\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2009\\\/07\\\/26\\\/d-bus-system-services-for-print-queues\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/2009\\\/07\\\/26\\\/d-bus-system-services-for-print-queues\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/cyberelk.net\\\/tim\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"D-Bus system services for print queues\"}]},{\"@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":"D-Bus system services for print queues - 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\/2009\/07\/26\/d-bus-system-services-for-print-queues\/","og_locale":"en_GB","og_type":"article","og_title":"D-Bus system services for print queues - PRINT HEAD","og_description":"Further to the recent work on replacing hal-cups-utils, I&#8217;ve now split out the parts that use CUPS into a D-Bus system service. This allows udev to simply call the D-Bus methods and let the activated service deal with the potentially time-consuming bits. It also makes it a bit easier to get the SELinux security labelling [&hellip;]","og_url":"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/","og_site_name":"PRINT HEAD","article_published_time":"2009-07-26T17:42:35+00:00","article_modified_time":"2014-05-20T08:07:28+00:00","author":"Tim Waugh","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Tim Waugh","Estimated reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/#article","isPartOf":{"@id":"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/"},"author":{"name":"Tim Waugh","@id":"https:\/\/cyberelk.net\/tim\/#\/schema\/person\/23b749f30a67f1b1c6af17024fc94bf6"},"headline":"D-Bus system services for print queues","datePublished":"2009-07-26T17:42:35+00:00","dateModified":"2014-05-20T08:07:28+00:00","mainEntityOfPage":{"@id":"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/"},"wordCount":109,"publisher":{"@id":"https:\/\/cyberelk.net\/tim\/#\/schema\/person\/23b749f30a67f1b1c6af17024fc94bf6"},"keywords":["bluetooth","cups","dbus","printers","Software","system-config-printer","udev","usb"],"articleSection":["Software"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/","url":"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/","name":"D-Bus system services for print queues - PRINT HEAD","isPartOf":{"@id":"https:\/\/cyberelk.net\/tim\/#website"},"datePublished":"2009-07-26T17:42:35+00:00","dateModified":"2014-05-20T08:07:28+00:00","breadcrumb":{"@id":"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cyberelk.net\/tim\/2009\/07\/26\/d-bus-system-services-for-print-queues\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cyberelk.net\/tim\/"},{"@type":"ListItem","position":2,"name":"D-Bus system services for print queues"}]},{"@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-cz","_links":{"self":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/posts\/779","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=779"}],"version-history":[{"count":5,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/posts\/779\/revisions"}],"predecessor-version":[{"id":784,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/posts\/779\/revisions\/784"}],"wp:attachment":[{"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/media?parent=779"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/categories?post=779"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cyberelk.net\/tim\/wp-json\/wp\/v2\/tags?post=779"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}