12.07.2015 Views

download

download

download

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Network Services—Local Network ServicesFreeBSD has its own built-in generic print spooler called lpd(8) based on RFC 1179definitions. There are also various alternatives to the built-in print spooler such asLPRng (available in ports tree as sysutils/LPRng) that is a more advanced printspooler as compared to FreeBSD's built-in spooler.Another very popular and more complex print spooler is CUPS (for Common UNIXPrinting System) that supports more protocols and is easier to configure.lpd—Print Spooler DaemonThe lpd(8) utility is the legacy print spooler daemon that is built-in to the FreeBSDdistribution. It can handle incoming print requests from the network (or locally) andstore them in the spool directory, and then take care of printing documents correctly.LPD relies on the /etc/printcap file in order to communicate with your printer.This file contains printer definitions. LPD reads this file anytime it needs tocommunicate with a printer. Therefore, you should setup your printer and addappropriate configuration to this file before anything else. Setting up the printcapentries manually is somewhat complex. Luckily there are tools that would makeyour life easier by taking care of configuring printcap for you, based on aninteractive interface. One such tool is apsfilter program that is available in portscollection as print/apsfilter. The apsfilter program helps you in choosing thecorrect printer drivers and configuration, and finally creating relevant entries in the/etc/printcap file.Once you have configured your printer driver, you should enable lpd, so that yourhost can receive print jobs and send them to its attached printer.LPD can be enabled from the rc.conf file by adding the following line:lpd_enable="YES"You can then start the LPD service manually, by running the following command:# /etc/rc.d/lpd startNow LPD is ready to accept print jobs. You can test your setup by sending a sampletext file to the printer. The following command is run to test your print setup:# lpr /etc/motdThis should print the /etc/motd file to your recently configured printer.[ 252 ]

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!