Linux Printer Sharing


for Linux printing services, the printcap script file is the center when it comes to detection and sharing, connection issues.   The configuration parameters used in a printcap file define the printer characteristics that lpd needs to know in order to communicate with the printer.   a glance at the man page shows that there are a large number of printcap parameters.   below are three(3) samples and as follows:


A Sample printcap


Below is the printcap file that is the result of defining three(3) printers using the printconf tool.   One is a locally attached printer, one is a remote printer and a SMB printer.


  # /etc/printcap

  #

  # hand edited changes can

  # be put in

  # /etc/printcap.local

  # and will be included


  lp|Canon:\

   :sh:\

   :ml=0:\

   :mx=0:\

   :sd=/var/spool/lpd/lp:\

   af=/var/spool/lpd/lp/lp.acct:\

   lp=/dev/lp0:\

   lpd_bounce=true:\

   if=/usr/share/printconf/util/mf_wrapper:


  laser:\

   :sh:\

   :ml=0:\

   :mx=0:\

   :sd=/var/spool/lpd/laser:\

   af=/var/spool/lpd/laser/laser.acct:\

   rm=172.16.5.15: \

   rp=lj: \

   lpd_bounce=true:\

   if=/usr/share/printconf/util/mf_wrapper:


  hp:\

   :sh:\

   :ml=0:\

   :mx=0:\

   :sd=/var/spool/lpd/hp:\

   af=/var/spool/lpd/hp/hp.acct:\

   lp=/usr/share/printconf/util/smbprint: \

   lpd_bounce=true:\

   if=/usr/share/printconf/util/mf_wrapper:



Note

 

laser 

   is the Second printer in this file and it's a remote printer

rm 

   the remote machine to which the printer is attached is defined by the rm parameter, 172.16.5.15 

rp 

   the name of the remote printer on that machine is defined by this parameter, in the sample about the value name was lj 

sd 

   defines the path to the spool directory in which print jobs are spooled as they wait for the printer

af 

   defines the path to the accounting file in which print job statistics are written