Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Mercy Corps

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents
Up to --> Basic Administration

· Printers and Interfaces
· advanced formatting
· printcap
· remote printing

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Recommend Us
Surveys

Features
HOWTOs
News
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 225 guest(s) and 15 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  
Linux Tutorial - Basic Administration - Printers and Interfaces - printcap
  advanced formatting ---- remote printing  


printcap

As with the termcap file, each entry in the printcap file is separated by a colon. Boolean characteristics, such as suppressing the header (sh), exist by themselves. Characteristics that can take on a value, such as the name of the output device, are followed by an equal sign (=) and the value (lp=/dev/lp1). For a complete list of characteristics, see the printcap man-page.

Each entry in the /etc/printcap file consists of single logical line. There is one entry for each printer on your system. To make the entry easier to read, you can break each logical line into several physical lines. As an example, lets look at the entry for the default, generic printer:

lp:lp=/dev/lp1:sd=/usr/spool/lp1:sh

The first part of the line is the name of the printer, in this case, lp. Each field is separated from the others with a colon, so in this example, there are three fields (plus the printer name).

If we were to break this example into multiple physical lines, it might look like this:

lp:\ :lp=/dev/lp1:\ :sd=/usr/spool/lp1:\ :sh

At the end of each physical line, there is a back-slash to tell lpd that the logical line continues. You'll also see that each field now has a colon before it and after it.

Although it is not necessary, you may find a file minfree in each of the spool directories. This is a simple text file that contains the number of disk blocks that should be left to keep the print spooler from filling up the disk. As a safety mechanism on a system with a lot of print jobs, the spool directory can be put on a separate file system. Should it fill up, the rest of the system won't suffer.

Often, data is sent directly to the printer devices, either because it is supposed to be raw ASCII text or because the program that created the data did its own formatting. This is referred to as raw data as the system doesn't do anything with it.

Sometimes the data is sent by the lpd daemon through another program that processes the data in preparation of sending it to the printer. Such programs are called filters. The stdin of the input filters receive what the lpd puts out. The stdout of the filter then goes to printer. Such filters are often called input filters and are specified in the printcap file with if=.

Because of this behavior, a print filter can be anything that understands the concept of stdin and stdout. In most cases on Linux, the input filters that I have seen are simply shell scripts. However, they can also be perl scripts.

With the exception of an input filter or a log file (which is specified using lf=), I have rarely used any other option for local printing. However, using the printcap file, you can configure your printer to print on a remote system, which is the subject of the next section.

 Previous Page
advanced formatting
  Back to Top
Table of Contents
Next Page 
remote printing


MoreInfo

Test Your Knowledge

User Comments:


You can only add comments if you are logged in.

Copyright 2002-2009 by James Mohr. Licensed under modified GNU Free Documentation License (Portions of this material originally published by Prentice Hall, Pearson Education, Inc). See here for details. All rights reserved.
  
Show your Support for the Linux Tutorial

Purchase one of the products from our new online shop. For each product you purchase, the Linux Tutorial gets a portion of the proceeds to help keep us going.


Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
The Linux Tutorial welcomes your suggestions and ideas.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.05 Seconds