{"id":239,"date":"2020-08-18T19:23:47","date_gmt":"2020-08-18T20:23:47","guid":{"rendered":"http:\/\/www.linux-tutorial.info\/?page_id=77"},"modified":"2020-08-22T19:26:18","modified_gmt":"2020-08-22T20:26:18","slug":"this-is-the-page-title-toplevel-74","status":"publish","type":"page","link":"http:\/\/www.linux-tutorial.info\/?page_id=239","title":{"rendered":"printcap"},"content":{"rendered":"\n<title>printcap<\/title>\n<question id=\"143\" text=\"What file contains information on your printer's capabilities?\" \/>\n<concept id=\"\" topic=\"Administration\" description=\"The printcap file contains your printer's capabilities.\" \/>\n<p>\nSimilar to the termcap file, the printcap file contains the printer capabilities and\neach entry is separated by a colon. Boolean\ncharacteristics, such as suppressing the <glossary>header<\/glossary>\n(sh), exist by themselves.\nCharacteristics that can take on a value, such as the name of the output device,\nare followed by an equal sign (=) and the value (lp=\/dev\/lp1). For a complete\nlist of characteristics, see the printcap <glossary>man-page<\/glossary>.\n<\/p>\n<p>\nEach entry in the\n<file type=\"\">\/etc\/printcap <\/file>file consists of single logical line. There is one entry for each\nprinter on your system. To make the entry easier to read, you can break each\nlogical line into several physical lines. As an example, lets look at the entry\nfor the default, generic printer:\n<\/p>\n<p>\n<filecontents>lp:lp=\/dev\/lp1:sd=\/usr\/spool\/lp1:sh<\/filecontents>\n<\/p>\n<p>\nThe first part of the line is the name of the printer, in this case, lp.\nEach field is separated from the others with a colon, so in this example, there\nare three fields (plus the printer name).\n<\/p>\n<p>\nIf we were to break this\nexample into multiple physical lines, it might look like this: <\/p>\n<p>\n<filecontents>\nlp:\\\n   :lp=\/dev\/lp1:\\\n   :sd=\/usr\/spool\/lp1:\\\n   :sh\n<\/filecontents>\n<\/p>\n<p>\nAt the end of each physical line, there is a <glossary>back-slash<\/glossary>\nto tell <command>lpd<\/command> that the logical line continues. You&#8217;ll also see that each field now\nhas a colon before it and after it. <\/p>\n<p>\nAlthough it is not necessary, you may find a file <file type=\"\">minfree<\/file>\nin each of the spool directories. This is a simple text\nfile that contains the\nnumber of disk blocks that should be left to keep the <glossary>print spooler<\/glossary>\nfrom filling up the disk. As a safety mechanism on a system with a lot of print jobs, the spool\ndirectory can be put on a separate file system. Should it fill up, the rest of\nthe system won&#8217;t suffer.\n<\/p>\n<p>\nOften, data is sent directly to the printer\ndevices, either because it is supposed to be raw <glossary>ASCII<\/glossary>\ntext\nor because the\nprogram that created the data did its own formatting. This is referred to as raw\ndata as the system doesn&#8217;t do anything with it.<\/p>\n<p>\nSometimes the data is sent\nby the lpd <glossary>daemon<\/glossary>\nthrough another program that processes the data in preparation\nof sending it to the printer. Such programs are called filters. The <glossary>stdin<\/glossary>\nof the\ninput filters receive what the <command>lpd<\/command> puts out. The <glossary>stdout<\/glossary>\nof the filter then goes\nto printer. Such filters are often called input filters and are specified in the\nprintcap file with if=.\n<\/p>\n<p>\nBecause of this behavior, a print filter can be\nanything that understands the concept of <glossary>stdin<\/glossary>\nand <glossary>stdout<\/glossary>.\nIn most cases on Linux, the input filters that I have seen are simply shell scripts. However,\nthey can also be perl scripts.<\/p>\n<p>\nWith the exception of an input filter or a\nlog file (which is specified using lf=), I have rarely used any other option for\nlocal printing. However, using the printcap file, you can configure your printer\nto print on a remote system, which is the subject of the next section.\n<\/p>\n","protected":false},"excerpt":{"rendered":"<p>printcap Similar to the termcap file, the printcap file contains the printer capabilities and each entry is separated by a colon. Boolean characteristics, such as suppressing the header (sh), exist by themselves. Characteristics that can take on a value, such &hellip; <a href=\"http:\/\/www.linux-tutorial.info\/?page_id=239\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-239","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/239","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=239"}],"version-history":[{"count":1,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/239\/revisions"}],"predecessor-version":[{"id":664,"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=\/wp\/v2\/pages\/239\/revisions\/664"}],"wp:attachment":[{"href":"http:\/\/www.linux-tutorial.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=239"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}