{"id":1066,"date":"2014-03-26T12:05:54","date_gmt":"2014-03-26T19:05:54","guid":{"rendered":"http:\/\/jim-zimmerman.com\/?p=1066"},"modified":"2015-07-20T17:52:34","modified_gmt":"2015-07-21T00:52:34","slug":"cups-notes","status":"publish","type":"post","link":"https:\/\/jim-zimmerman.com\/?p=1066","title":{"rendered":"CUPS notes"},"content":{"rendered":"<p>OS: Ubuntu 12.04 LTS<\/p>\n<p>I decided it was about time to solve a couple issues that seem to constantly come up for me when it comes to using CUPS in linux for printing.<\/p>\n<p>The first was getting access to the configuration page from a machine other than the console.  To do this you have to modify the \/etc\/cups\/cupsd.conf file.<\/p>\n<blockquote><p>&#8230;<br \/>\n# JGZ &#8211; 3\/26\/2014 &#8211; To listen on the eth0 interface<br \/>\nListen 10.10.10.9:631<br \/>\n&#8230;<br \/>\n# Restrict access to the server<br \/>\n<Location \/><br \/>\n  Order allow,deny<br \/>\n#  JGZ &#8211; 3\/26\/2014 &#8211; To allow access to \/<br \/>\n  Allow all<br \/>\n<\/Location><\/p>\n<p># Restrict access to the admin pages<br \/>\n<Location \/admin><br \/>\n  Order allow,deny<br \/>\n#  JGZ &#8211; 3\/26\/2014 &#8211; To allow access to \/admin<br \/>\n  Allow all<br \/>\n<\/Location><\/p>\n<p># Restrict access to configuration files<br \/>\n<Location \/admin\/conf><br \/>\n  AuthType Default<br \/>\n  Require user @SYSTEM<br \/>\n  Order allow,deny<br \/>\n#  JGZ &#8211; 3\/26\/2014 &#8211; To allow access to \/admin\/conf<br \/>\n  Allow all<br \/>\n<\/Location><br \/>\n&#8230;<\/p><\/blockquote>\n<p>After the changes are made to the \/etc\/cups\/cupsd.conf file, you need to restart cups:<\/p>\n<blockquote><p># service cups restart<\/p><\/blockquote>\n<p>The next issue I had is the default size of the font.  I frequently print files I create in vi or configuration files or scripts, and the font is too big by default to make the document readable.  For this, I added the following to the printers.conf file in \/etc\/cups.   <\/p>\n<blockquote><p>&#8230;<br \/>\n# JGZ &#8211; 3\/26\/2014 &#8211; decrease default font size<br \/>\nOption cpi 15.000000<br \/>\nOption lpi 9.000000<br \/>\n&#8230;\n<\/p><\/blockquote>\n<p>I put this un the ErrorPolicy line in between the <em><Printer myprinter><\/em> and <em><\/Printer><\/em> directives.  If you have multiple printers, make sure that <em>myprinter<\/em> is the printer that you want to modify.  Obviously, when you look at the printers.conf file, you will find many other options you can modify.  In my case, I had to add the missing entries (see man printers.conf).  For this change, you do not need to restart cups.<\/p>\n<p>Note: To set the margins while printing a text file, you specify the options in the lp command line:<\/p>\n<blockquote><p>lp -d myprinter -o page-top=18 -o page-bottom=18 -o page-left=18 -o page-right=18 mytextfile<\/p><\/blockquote>\n<p>The options are in points (72 points are in an inch).  Eighteen points would be a quarter of inch margin.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OS: Ubuntu 12.04 LTS I decided it was about time to solve a couple issues that seem to constantly come up for me when it comes to using CUPS in linux for printing. The first was getting access to the configuration page from a machine other than the console. To do this you have to [&#038;hellip<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[362,363,132],"class_list":["post-1066","post","type-post","status-publish","format-standard","hentry","category-documentation","tag-cups","tag-print","tag-ubuntu"],"share_on_mastodon":{"url":"","error":""},"_links":{"self":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1066"}],"version-history":[{"count":5,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1066\/revisions"}],"predecessor-version":[{"id":1307,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=\/wp\/v2\/posts\/1066\/revisions\/1307"}],"wp:attachment":[{"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jim-zimmerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}