\documentclass[letterpaper]{article}
\nonstopmode
\akai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{The Linux Printing HOWTO ÖÐÎÄ°æ}
\author{×÷Õß : Grant Taylor {\ttfamily \onlynameurl{{$<$}gtaylor+pht@picante.com{$>$}}}\\ 
ÒëÕß : ÈÎºãÓî {\ttfamily \onlynameurl{{$<$}henryjen@mail.net.tw{$>$}}}}
\date{v3.29, 9 March 1999
·­ÒëÈÕÆÚ : 15 ÁùÔÂ 1999}
\abstract{ÕâÒ»ÆªÊÇ Linux Printing HOWTO µÄÖÐÒë±¾, ÄÚÈÝ°üÀ¨ÁËÈçºÎÔÚ Linux Ö®ÏÂ²úÉú,
Ô¤ÀÀ,ÁÐÓ¡¼°´«ÕæÈÎºÎÎÄ¼þµÄÏà¹Ø×ÊÑ¶ (»ù±¾ÉÏÒà¿ÉÊÊÓÃì¶ÆäËûµÄ Unices).}


\begin{document}
\maketitle
\tableofcontents

\section{¼ò½é}

Õâ·Ý Printing HOWTO Ó¦¸Ã°üÀ¨ÁËÄÜ°ïÖúÄãÔÚ Linux Æ½Ì¨ÉÏ¼ÜÉèÁÐÓ¡·þÎñµÄËùÓÐÑ¶Ï¢.
Õâ²»ÏñÔÚ Microsoft »ò Apple »·¾³ÏÂÓÃ»¬ÊóµãÑ¡ÄÇ÷áÈÝÒ×, 
µ«Ò»¶¨±È¹ÜÀíÒ»¸ö´óÐÍµÄÇøÓòÍøÂ·À´µÃÇáËÉ.

Õâ·ÝÎÄ¼þµÄ±àÅÅ·½Ê½ÊÇÏ£ÍûÄÜÈÃ´ó²¿·ÝµÄÊ¹ÓÃÕßÖ»ÐëÔÄ¶ÁÇ°°ë¶Î.
½ÏÄÑÀí½âµÄ¸ö°¸Çé¿öÔò°ÚÔÚáá°ë¶Î, ¶øÇÒÄã¿ÉÒÔºÜÈÝÒ×µØ´ÓÄ¿Â¼ÖÐÕÒµ½.
ËùÒÔ´ó²¿·ÝÈË¿ÉÄÜÖ»Ðë¿´µ½µÚ¾Å»òÊ®½Ú¾Í¿ÉÒÔÁË.

ÒòÎª 3.x °æµÄÎÄ¼þÖØÐÂÐ´¹ý, Ç°Ãæ°æ±¾ÖÐµÄÐí¶àÄÚÈÝÒÑ¾­ÄÃµôÁË.
ÕâÊÇ¹ÊÒâµÄ, ÒòÎªÇ°°æµÄ HOWTOs ³¤´ï 60 ¶àÒ³, ¶øÇÒ±àÅÅ·½Ê½²¢²»ÊÇºÜÀíÏë.
Èç¹ûÄãÔÚÕâ·ÝÎÄ¼þÖÐÕÒ²»µ½ËùÐèµÄ´ð°¸, Äã¿ÉÒÔ a) ²ÎÔÄÎ»ì¶ \nameurl{http://www/picante.com/~gtaylor/pht/}{Printing HOWTO Home Page}
µÄ¾É°æÎÄ¼þ. Ò²¿ÉÒÔ b) ¸æËßÎÒÈ±ÉÙÁËÊ²÷á²¿·Ý.

Äã¿ÉÒÔÔÚ \nameurl{http://www.picante.com/~gtaylor/pht/}{Printing HOWTO Home Page} ÕÒµ½Õâ·ÝÎÄ¼þµÄ×îÐÂ°æ±¾; µ±È»ÄãÒ²¿ÉÒÔÔÚ
Metalab ({\ttfamily metalab.unc.edu}) ºÍ¸½½üµÄ LDP mirror Õ¾ÕÒµ½.




\subsection{ÀúÊ·}

ÕâÊÇµÚÈý´úµÄ Printing HOWTO, Ò²¾ÍÊÇµÚÈý´ÎµÄÍêÈ«¸Ä°æ, ÒÔÄê·ÝÀ´¿´:
\begin{enumerate}
\item ÎÒÔÚ 1992 ÄêÒòÎª¿´µ½ÔÚ comp.os.linux ÓÐºÜ¶à¹Øì¶ÁÐÓ¡µÄÎÊÌâ, 
±ãÐ´ÏÂ²¢·¢±íÁË printing-howto. ±È HOWTO ¼Æ»­»¹Ôç¼¸¸öÔÂ, Í¬Ê±Ò²ÊÇµÚÒ»·Ý³ÆÎª
`howto' µÄ³£¼ûÎÊ´ð¼¯. ÕâÒ»°æÊÇ´¿ÎÄ×Ö¸ñÊ½.
\item ¼ÓÈëÁË HOWTO ¼Æ»­áá, Printing-HOWTO ºÍÓÉ Brian McCauley 
{\ttfamily $<$B.A.McCauley@bham.ac.uk{$>$}} ËùÐ´µÄ Lpd FAQ ºÏ²¢; ÎÒÃÇ¼ÌÐøºÏÐ´ PHT
²î²»¶àÁ½Äê. ÓÐÐ©µØ·½ÔòÄÉÈëÁË Karl Auer {\ttfamily $<$Karl.Auer@anu.edu.au{$>$}} µÄ×÷Æ·.
ÕâÒ»°æµÄ PHT ÊÇÒÔ TeXinfo Ð´³É, Ò²Ìá¹©ÁË PS, HTML, Ascii ºÍ Info µÄ°æ±¾.
\item ÔÚ PHT ¾­¹ýÒ»Äê¶àµÄÊ±¼äÖð½¥³ÉÊìÒÔ¼°Ò»´Î³¢ÊÔÒÆ×ª¸ø±ðÈËÎ¬»¤µÄÊ§°Ü¾­Ñéáá,
²úÉúÁËÕâ·ÝÖØÐÂ¸Ä°æ. ÕâÒ»°æµÄ PHT ÊÇÓÃ LinuxDoc DTD ºÍ SGML-Tools-1 Ì×¼þÒÔ SGML
ËùÐ´³ÉµÄ. ´Ó 3.27 °æ¿ªÊ¼, ÄÉÈëÁËÒ»·ÝÖ§Ô®Ó¡±í»ú×ÊÁÏ¿âµÄÕªÒª; ÔÚ 3.27 °æÖ®Ç°,
Õâ·Ý HOWTO ÖÐ´ÓÀ´Ã»ÓÐÒ»·ÝÏàÈÝÓ¡±í»úÇåµ¥ (!).
\end{enumerate}



\subsection{°æÈ¨ÉùÃ÷}

Õâ·ÝÎÄ¼þµÄ°æÈ¨ (c) 1992-1999 Îª Grant Taylor ËùÓÐ. Äã¿ÉÒÔÒÀÕÕ GNU General
Public License, revision 2 »òÖ®áá°æ±¾ÖÐµÄÌõ¿î×ÔÓÉµØ¸´ÖÆÓëÉ¢²¼.

This document is Copyright (c) 1992-1999 by Grant Taylor.  Feel free
to copy and redistribute this document according to the terms of the
GNU General Public License, revision 2 or later.


\section{ÈçºÎÁÐÓ¡}

Èç¹ûÄã»òÄãµÄÏµÍ³¹ÜÀíÕß»ò³§ÉÌÒÑ¾­Éè¶¨ºÃ lpd µÄ»°, ÄãËùÐèÒª×öµÄ±ãÖ»ÊÇÑ§Ï°ÈçºÎÊ¹ÓÃ
lpr Ö¸Áî¶øÒÑ. \nameurl{http://metalab.unc.edu/LDP/HOWTO/Printing-Usage-HOWTO.html}{Printing Usage HOWTO} 
°üº¬ÁËÕâ²¿·ÝµÄ×ÊÑ¶, »¹ÓÐÒ»Ð©Äã¿ÉÄÜÓ¦¸ÃÒªÖªµÀµÄÁÐÓ¡ØùÁÐ´¦ÀíÖ¸Áî.

Èç¹ûÄãÓÐÒ»¸öÈ«ÐÂÏµÍ³»òÕßÐÂµÄÓ¡±í»ú, ÄÇÄã¾Í±ØÐëÔÚ¿ªÊ¼ÁÐÓ¡Ç°ÏÈÉè¶¨ºÃÁÐÓ¡·þÎñ.
Èç¹ûÊÇÕâÑù, Çë¼ÌÐø¿´ÏÂÈ¥!




\section{ºËÐÄÓ¡±í»ú×°ÖÃ}

Æ½ÐÐ²ºÓÐÁ½ÖÖÍêÈ«²»Í¬µÄ×°ÖÃÇý¶¯³ÌÊ½; ÄãµÄºËÐÄ°æ±¾¾ö¶¨ÁËÄãÓÃµÄÊÇÄÇÒ»ÖÖ.
Çý¶¯³ÌÊ½ÊÇÔÚ Linux 2.1.33 °æËù×öµÄ¸Ä±ä.

Á½ÖÖÇý¶¯³ÌÊ½µÄÐÍÌ¬½öÔÚºÜÉÙµÄÒ»Ð©Ï¸½ÚÉÏÏàÍ¬. ×îÖµµÃ×¢ÒâµÄÊÇ,
Ðí¶àÈË·¢ÏÖ Linux ²»»áÕì²âËûÃÇµÄÆ½ÐÐ²º³ý·ÇËûÃÇÔÚ PC BIOS µÄÉè¶¨ÖÐ°Ñ
"Plug and Play" ¹Øµô. (ÕâÒ»µãÒ²²»ÁîÈË¾ªÑÈ; ¹ýÈ¥µÄ¼ÇÂ¼ÏÔÊ¾ÔÚ Windows
ºÍÆäËüµØ·½¶Ô·Ç PCI ×°ÖÃµÄ PnP ÒÑ¾­³ÉÁËÄ³ÖÖÔÖÄÑ).




\subsection{lp ×°ÖÃ (ºËÐÄ°æ±¾ $<$=2.1.32)}

¼ÙÈçÄãÒÑ¾­±àÒë»òÔØÈëÁË lp ×°ÖÃ(Èç¹ûÔØÈëÁËµÄ»°, {\ttfamily cat /proc/devices}
µÄ½á¹ûÓ¦¸Ã»á¿´µ½ lp), Linux ºËÐÄ ($<$=2.1.32) »áÌá¹©Ò»¸ö»ò¶à¸öµÄ
{\itshape /dev/lp0\/}, {\itshape /dev/lp1\/}, {\itshape /dev/lp2\/} ×°ÖÃµµ°¸.
ÕâÐ©µµ°¸²»ÊÇËæÒâÖ¸¶¨µÄ, Ïà·´µÄ, Ã¿Ò»¸öµµ°¸½Ô¶ÔÓ¦µ½Ò»¸öÌØ¶¨µÄ I/O Î»Ö·.
Õâ±íÊ¾ÄãµÄµÚÒ»²¿Ó¡±í»ú¿ÉÄÜÊÇ {\itshape lp0\/} »ò {\itshape lp1\/}, ÍêÈ«ÊÓÄãµÄÓ²ÌåÇé¿ö¶ø¶¨.
Á½¸ö¶¼ÊÔÊÔ¿´°É!

ÓÐÐ©Ê¹ÓÃÕßÌáµ½Èç¹ûÊ¹ÓÃ½Ï¾ÉµÄµ¥ÏòÓ¡±í»úÁ¬½ÓÏß,
¾ÍÎÞ·¨Õì²âµ½ËûÃÇµÄË«ÏòÓ¡±í»úÁ¬½Ó²º. È·¶¨ÄãÊ¹ÓÃÁËÕýÈ·µÄÁ¬½ÓÏß.

Ò»¸öÓ¡±í»ú²º²»ÄÜÍ¬Ê±ÔØÈë plip ºÍ lp µÄÇý¶¯³ÌÊ½, Èç¹ûÄãÓÃµÄÊÇ 2.x »òÊÇ 1.3.x
°æÒÔááµÄºËÐÄ, Äã¿ÉÒÔÓÃÊÖ¶¯»òºËÐÄµÄ·½Ê½Ñ¡ÔñÔØÈë²»Í¬µÄÇý¶¯³ÌÊ½.
Ö»ÒªÐ¡ÐÄµÄÉè¶¨ÖÐ¶ÏµÈÉè¶¨, ÄãÓ¦¸Ã¿ÉÒÔÔÚÒ»¸ö²ºÉÏÖ´ÐÐ plip, ¶øÔÚÁíÒ»¸ö²ºÉÏÔØÈë
lp µÄÇý¶¯³ÌÊ½. Ôø¾­ÓÐÈËÐÞ¸ÄÇý¶¯³ÌÊ½¶ø³É¹¦;
ÎÒÏ£ÍûÄÜÔçÈÕÌýµ½ÓÐÈËÒÔÒ»¸ö¼òµ¥µÄÖ¸ÁîÍê³ÉÏàÍ¬µÄÊÂÇé.

ÓÐÒ»¸öÐ¡³ÌÊ½ {\ttfamily \onlynameurl{tunelp}}, Èç¹ûÄãÊÇ root, ¿ÉÒÔÓÃÀ´Éè¶¨ Linux 2.0 lp ×°ÖÃÊ¹ÓÃµÄÖÐ¶Ï
(interrupt), ÂÖÑ¯ËÙÂÊ(polling rate) ºÍÆäËüµÄÏîÄ¿.

ÈôÊÇºËÐÄ±àÒëÊ±°üÀ¨ÁË lp Çý¶¯³ÌÊ½, ºËÐÄ½ÓÊÜ {\ttfamily lp=}
²ÎÊýÉè¶¨ÖÐ¶Ï¼° IO Î»Ö·:
\begin{tscreen}
\begin{verbatim}
Èô½« lp Çý¶¯³ÌÊ½±àÒëÈëºËÐÄ, Äã¿ÉÒÔÓÃ LILO/LOADLIN µÄÃüÁîÁÐÀ´Ö¸¶¨Ê¹ÓÃµÄ
IO Î»Ö·¼°ÖÐ¶Ï.

Óï·¨:      lp=port0[,irq0[,port1[,irq1[,port2[,irq2]]]]]

¡õÀý:   lp=0x378,0   »ò   lp=0x278,5,0x378,7 **

Òª×¢ÒâµÄÊÇ¼ÙÈçÄãÊ¹ÓÃÕâ¸ö¹¦ÄÜ, Äã±ØÐëÖ¸¶¨ *ËùÓÐ* ÒªÓÃµÄÓ¡±í»ú²º,
ÏµÍ³²»Ìá¹©Ô¤ÉèÖµ. Äã¿ÉÒÔÓÃ lp=0 À´Í£ÓÃÄÚ½¨µÄÇý¶¯³ÌÊ½.
\end{verbatim}
\end{tscreen}


ÈôÊÇÒÔÔØÈëÄ£×éµÄ·½Ê½Ö´ÐÐ, ¿ÉÒÔÔÚ insmod
Ö¸ÁîµÄÃüÁîÁÐ(»òÊÇÔÚ {\itshape /etc/conf.modules\/} À´Ä£ÄâºËÐÄÄ£Ê½)
ÒÔÆ½³£Ä£×é²ÎÊýµÄÓï·¨À´Ö¸¶¨ IO Î»Ö·ºÍÖÐ¶Ï.
²ÎÊýÎª {\ttfamily io=port0,port1,port2}
ºÍ {\ttfamily irq=irq0,irq1,irq2}. Çë²Î¿¼ {\itshape \onlynameurl{insmod}\/} µÄÏßÉÏÊÖ¡õÒÔÈ¡µÃ¸ü½øÒ»²½µÄ×ÊÑ¶.



**¸øÄÇÐ©µ±ÐèÒªÊ±È´×ÜÊÇÕÒ²»µ½±ê×¼Ó¡±í»ú²ºÎ»Ö·µÄÈË, Î»Ö·±ãÈçÍ¬µÚ¶þ¸ö¡õÀýÖÐËùÊ¾,
ÁíÒ»¸öÓ¡±í»ú²º ({\itshape lp0\/}) ÔòÔÚ 0x3bc. ÎÒ²»ÖªµÀÒ»°ãËùÓÃµÄÖÐ¶ÏÊÇÄÇÒ»¸ö.



Linux 2.0 ²¢ÁÐ²ºÇý¶¯³ÌÊ½µÄÔ­Ê¼ÂëÔÚ /usr/src/linux/drivers/char/lp.c.




\subsection{parport ×°ÖÃ (ºËÐÄ°æ±¾ $>$= 2.1.33)}

´Ó 2.1.33 °æ±¾ááµÄºËÐÄ(2.0.30 °æºËÐÄ¿ÉÈ¡µÃÐÞÕýµµ), lp 
×°ÖÃ³ÉÎªÐÂÔö¼ÓµÄ parport ×°ÖÃµÄ¿Í»§¶Ë. Ôö¼Ó parport 
×°ÖÃ½â¾öÁËÐí¶àÀ§ÈÅ¾ÉÓÐ lp ×°ÖÃÇý¶¯³ÌÊ½µÄÎÊÌâ - 
ÏñÊÇ¿ÉÒÔºÍÆäËüµÄÇý¶¯³ÌÊ½¹²ÓÃÒ»¸öÁ¬½Ó²º,
¿ÉÒÔ¶¯Ì¬Ö¸¶¨¿ÉÓÃµÄ²¢ÁÐ²º¶ø²»Ðë½«×°ÖÃµµ¶ÔÓ¦µ½¹Ì¶¨µÄ I/O 
Î»Ö·µÈµÈ.

parport ×°ÖÃµÄ³öÏÖÊ¹µÃºÜ¶àÐÂµÄ²¢ÁÐ²ºÉè±¸, ÏñÊÇ Zip ´Åµú»ú, 
¿ÉÐ¯Ê½ CD-ROM ºÍ´Åµú»úµÈµÈ, µÄÇý¶¯³ÌÊ½µÃÒÔ³öÏÖ. 
ÆäÖÐÒ»Ð©Ò²ÓÐÌá¹© 2.0 ºËÐÄ¿ÉÓÃµÄ°æ±¾, µ½ÍøÂ·ÉÏÕÒÕÒ¿´°É.

Äã»á×¢Òâµ½µÄÖ÷Òª²îÒì, ÒÔÄ¿Ç°ÁÐÓ¡À´¿´, ÊÇ»ùì¶ parport
µÄºËÐÄ»á¶¯Ì¬µØÖ¸¶¨ lp ×°ÖÃ¸øÆ½ÐÐ²º. ËùÒÔÔÚ Linux 2.0 ÖÐµÄ lp1 ÔÚ Linux 2.2
ÖÐ¿ÉÄÜÊÇ lp0. Èç¹ûÄã´ÓÊ¹ÓÃ lp Çý¶¯³ÌÊ½µÄºËÐÄÉý¼¶µ½Ê¹ÓÃ parport
Çý¶¯³ÌÊ½µÄºËÐÄ, ¼ÇµÃ¼ì²éÕâÒ»µã.

µ±ÎÒÊ¹ÓÃÁË parport Çý¶¯³ÌÊ½áá, ÎÒ»á¸üÍêÕûµØÌ½ÌÖËü.
Ä¿Ç°Äã¿ÉÒÔ¿´Ò»ÏÂºËÐÄÔ­Ê¼µµÖÐµÄ \onlynameurl{Documentation/parport.txt}. »òÕßÄãÒ²¿ÉÒÔµ½ \nameurl{http://www.cyberelk.demon.co.uk/parport.html}{parport web site} ¿´¿´.




\subsection{ÐòÁÐ×°ÖÃ(Serial devices)}

ÐòÁÐ×°ÖÃÔÚ Linux ÖÐÍ¨³£ÓÐ¸öÏñ {\itshape /dev/ttyS1\/} ÕâÀàµÄÃû³Æ. {\ttfamily \onlynameurl{stty}} Õâ¸ö¹¤¾ß³ÌÊ½¿ÉÒÔÈÃÄã²é¿´¼°Éè¶¨ÐòÁÐ²º.
{\ttfamily \onlynameurl{setserial}}
¿ÉÒÔÈÃÄãµ÷Õû¸ü¶àµÄÊôÐÔ¼°Éè¶¨Ê¹ÓÃ·Ç±ê×¼µÄ IRQ ¼° I/O Î»Ö·µÄÐòÁÐ²º.
\nameurl{http://metalab.unc.edu/mdw/HOWTO/Serial-HOWTO.html}{Serial-HOWTO} 
»á¶Ô Linux ÏÂµÄÐòÁÐ²º×ö¸ü½øÒ»²½µÄÌ½ÌÖ.



Èç¹ûÄãÊ¹ÓÃµÄÊÇÓÐÁ÷Á¿¿ØÖÆµÄÂýËÙÐòÁÐÓ¡±í»ú, ¿ÉÄÜ»á·¢ÏÖÓÐÐ©±¨±í±»½Ø¶Ï.
ÕâÊÇÒòÎªÏµÍ³Ô¤¶¨ÔÚ³ÌÊ½¹Ø±ÕÐòÁÐ²º 30 Ãëáá, 
ËùÓÐÔÚ»º³åÇøÄÚÉÐÎ´´«ËÍµÄ×ÖÔª¶¼»á±»Çå³ý. »º³åÇøÄÚ¿ÉÈÝÄÉ×î¶à 4096 
¸ö×ÖÔª, ¼ÙÊ¹ÄãµÄÓ¡±í»úÊ¹ÓÃÁ÷Á¿¿ØÖÆ, ¶øÇÒÂýµ½ÎÞ·¨ÔÚ³ÌÊ½¹Ø±ÕÐòÁÐ²ºáá 30 
ÃëÄÚÓ¡³ö»º³åÇøÄÚµÄËùÓÐ×ÖÔª, ÄÇ÷á»º³åÇøÄÚ×îááµÄÄÚÈÝ¾Í»áÒÅÊ§. Èç¹û
{\ttfamily cat file $>$ /dev/ttyS2}
Õâ¸öÖ¸Áî¿ÉÒÔÍêÕûÓ¡³ö½ÏÐ¡µÄµµ°¸, µ«»á½Ø¶Ï½Ï³¤µÄµµ°¸Ê±, 
Äã¿ÉÄÜ¾ÍÊÇÓöµ½ÁËÕâÖÖÇé¿ö.



30 ÃëµÄÖÜÆÚ¿ÉÒÔÓÃ setserial (2.12 ¼°ÒÔááµÄ°æ±¾) Ö¸ÁîµÄ "closing\_wait" 
Ñ¡ÏîÀ´µ÷Õû. Ò»Ì¨»úÆ÷Í¨³£ÊÇÔÚ rc.serial ¿ª»úµµÖÐºô½Ð setserial
À´³õÊ¼»¯ÐòÁÐ²º. ¿ÉÒÔÔÚÕâÐÞ¸ÄÁ¬½ÓÓ¡±í»úµÄÐòÁÐ²ºµÄ closing\_wait Ñ¡Ïî.




\section{Ö§Ô®µÄÓ¡±í»ú}

Linux ºËÐÄ´óÖÂÉÏÖ§Ô®ËùÓÐÄÜ¹»½Óµ½ÐòÁÐ»ò²¢ÁÐ²ºµÄÓ¡±í»ú, 
µ«»¹ÊÇÓÐÐ©Òª×¢ÒâµÄÊÂÏî, ºÍÒ»Ð©ËäÈ»ÄÜÓë Linux ¹µÍ¨(¾Íµç×ÓÑ¶ºÅ¶øÑÔ)
È´ÎÞ·¨Ê¹ÓÃµÄÓ¡±í»ú.
Óë Linux ²»ÏàÈÝµÄÖ÷ÒªÊÇÄÇÐ©±»³ÆÎª "Windows" »òÊÇ "GDI" Ó¡±í»úµÄ»úÖÖ.
ËüÃÇÖ®ËùÒÔ»á±»ÕâÑù³ÆºôÊÇÒòÎª²¿·Ý,
ÉõÖÁÈ«²¿µÄÓ¡±í»ú¿ØÖÆÓïÑÔºÍÁÐÓ¡»úÖÆµÄÉè¼ÆÏ¸½Ú¶¼È±·¦ËµÃ÷ÎÄ¼þ.
Í¨³£ÕâÖÖ³§ÉÌ»áÌá¹© Windows µÄÇý¶¯³ÌÊ½, ¶øÇÒÒ²ºÜÂú×ãì¶Ö»Âô¸ø Windows
µÄÊ¹ÓÃÕß; Õâ¾ÍÊÇÎªÊ²÷áËüÃÇ±»³ÆÎª Winprinters.
Ä³Ð©Ê±ºò³§ÉÌÒ²»áÌá¹© NT, OS/2 »òÆäËü×÷ÒµÏµÍ³µÄÇý¶¯³ÌÊ½.

Ðí¶àÕâÖÖÓ¡±í»úÔÚ Linux ÏÂ{\itshape ²»ÄÜÓÃ\/}.
ÓÐÉÙ²¿·ÝµÄ¿ÉÒÔ, Ò²ÓÐÒ»Ð©Ö»ÓÐ²¿·Ý¹¦ÄÜ¿ÉÓÃ
(Í¨³£ÊÇÓÉì¶ÓÐÈËÕë¶ÔÐ´Çý¶¯³ÌÊ½ËùÐèµÄÏ¸½Ú½øÐÐ·´Ïò¹¤³Ì).
Çë²ÎÔÄááÃæµÄÓ¡±í»úÖ§Ô®Çåµ¥È¡µÃÌØ¶¨»úÖÖµÄ×ÊÑ¶.

ÓÐÉÙÊýµÄÓ¡±í»úÊÇ½éì¶ÖÐ¼äµÄ. ¾ÙÀýÀ´Ëµ, ÓÐÐ© NEC µÄ»úÖÖÊ¹ÓÃ±ê×¼Ó¡±í»úÓïÑÔ PCL
ÖÐ½Ï¼òµ¥µÄ¹¦ÄÜ, ÈÃ¶® PCL µÄÈíÌå¿ÉÒÔ´ïµ½ÁÐÓ¡ 300 dpi µÄË®×¼, ¶øÖ»ÓÐ NEC
²ÅÖªµÀÈçºÎÈÃÕâÐ©Ó¡±í»ú·¢»Ó 600 dpi µÄÁÐÓ¡ÄÜÁ¦.

ÍòÒ»ÄãÒÑ¾­ÓÐÕâÖÖÓ¡±í»ú, ÈÔÈ»ÓÐ±äÍ¨Ö®µÀ, Ö»²»¹ýÏàµ±µÄ±¿×¾, 
ËùÒÔÎÒ¾ø¶Ô²»»áÊ¹ÓÃÕâÖÖ·½Ê½. Ïë¸üÉîÈëµÄ¡õ½â Windows-only Ó¡±í»úÇë¿´µÚ 12 ½Ú




\subsection{Postscript}

ÄÇÐ©Ó¡±í»ú{\itshape Ò»¶¨\/}¿ÉÒÔÓÃÄØ? ×îºÃµÄÑ¡Ôñ¾ÍÊÇÂò¾ß±¸ PostScript 
Ö§Ô®µÄÓ¡±í»ú. ¼¸ºõËùÓÐµÄ Unix ÈíÌå¶¼ÒÔ PostScript À´²úÉú±¨±í,
ËùÒÔºÜÃ÷ÏÔµÄ, Èç¹ûÄÜÓÐÒ»²¿Ö±½ÓÖ§Ô® PostScript µÄÓ¡±í»úµÄ»°ÊÇÔÙºÃ²»¹ýÁË!
²»ÐÒµÄÊÇ³ýÁËÀ×ÉäÓ¡±í»úÍâ, ÆäËüÖÖÀàµÄÓ¡±í»ú¼¸ºõ¶¼²»Ö§Ô® PostScript, 
Òª²»È»¾ÍÊÇÏàµ±°º¹óµÄÑ¡¹ºÅä±¸.



Unix ÏÂµÄÈíÌåºÍÒ»°ãÓ¡Ë¢ÒµÖ®ËùÒÔÑ¡Ôñ PostScript
×öÎªÓ¡±í»ú¿ØÖÆÓïÑÔµÄ±ê×¼ÊÇÓÐÔ­ÒòµÄ:
\begin{description}
\item[Ê±»ú] \mbox{}

PostScript Ê×´Î³öÏÖÔÚ Apple Laserwriter Ó¡±í»úÖÐ, Laserwriter ÊÇ
Macintosh µÄÒ»¸öÍêÃÀ´îµ², ¶ø Macintosh ÏµÍ³ÔòÊÇµ¼ÖÂ 80
Äê´ú×ÀÉÏÅÅ°æ¸ïÃüµÄÖ÷ÒªÔ­Òò.

\item[ËüÓë×°ÖÃÎÞ¹Ø(device-independant)] \mbox{}

PostScript ³ÌÊ½¿ÉÒÔÔÚ»­ËØÓ©Ä», ÏòÁ¿Ó©Ä»,
´«Õæ»ú, »òÊÇ¼¸ºõÈÎºÎÒ»ÖÖÁÐÓ¡»úÖÆ²úÉúÊä³ö½á¹û, ¶ø²»ÐèÒª¸Ä±äÔ­À´µÄ³ÌÊ½.  
PostScript ÔÚÈÎºÎ PostScript ×°ÖÃÏÂËù²úÉúµÄÊä³ö½á¹û¿´ÆðÀ´¶¼Ò»Ñù,
ÖÁÉÙÔÚ×°ÖÃµÄÄÜÁ¦ÏÞÖÆÖ®ÄÚÊÇÈç´Ë. ÔÚ PDF ³öÏÖÖ®Ç°, ÈËÃÇÊÇÒÔ PostScript
¸ñÊ½ÔÚÏßÉÏ½»»»¸´ÔÓµÄÎÄ¼þ. ¶øÕâ¸ö±ê×¼Ã»ÄÜÈ«Ãæ³É¹¦µÄÎ©Ò»Ô­Òò¾ÍÔÚì¶ Windows
»úÆ÷ÉÏÍ¨³£²¢Ã»ÓÐ°²×° POstScript Ô¤ÀÀÆ÷, ì¶ÊÇ Adobe Ö¸¶¨ÁË PostScript
ÖÐµÄ³¬Á¬½á(hyperlinks) ºÍÑ¹Ëõ·¨(compression), °Ñ½á¹û³ÆÖ®Îª PDF,
²¢·ÖËÍËüµÄÔ¤ÀÀÆ÷, Ò²ÌæËûÃÇµÄÎÄ¼þ²úÉú¹¤¾ß (ghostscript µÄ ps2pdf ºÍ pdf2ps
Á½¸ö³ÌÊ½Ò²Ìá¹©ÁËÕâÐ©¹¦ÄÜ) ¿ª·¢³öÒ»¸öÐÂµÄÊÐ³¡.

\item[ËüÊÇÒ»¸öÕæÕýµÄ³ÌÊ½ÓïÑÔ] \mbox{}

PostScript ÊÇÒ»¸öÍêÕûµÄ³ÌÊ½ÓïÑÔ;
Äã¿ÉÒÔÓÃËü×«Ð´ÈíÌåÀ´×ö´ó²¿·ÝµÄÊÂÇé. ÕâÈÃÄã¿ÉÒÔÔÚ³ÌÊ½µÄ¿ªÍ·¶¨Òå¸±³£Ê½,
µ±ÄãÐèÒªÔÚÎÄ¼þÖÐÖØ¸´×öÐ©¸´ÔÓÐ§¹ûµÄÊ±ºò,
ÏñÊÇÔÚ±³¾°ÖÐ·ÅÉÏÉÌ±êÍ¼°¸»òÊÇÒ»¸ö´ó´óµÄ "DRAFT" ×ÖÑùµÄÊ±ºò, Õâ¸öÌØµã±ãºÜÓÐÓÃÁË.

\item[ËüÊÇ¿ª·ÅµÄ±ê×¼] \mbox{}

PostScript µÄÍêÕû¹æ¸ñ¶¼ÔÚÒ»ÏµÁÐÈËÈË¶¼¿ÉÈ¡µÃµÄÊéÖÐ
(Äã¿ÉÒÔÔÚËæ±ãÒ»¼ÒºÃµÄÊéµêÖÐÕÒµ½). ËäÈ» Adobe ·¢Ã÷ÁËËü¶øÇÒÌá¹©ÁËÖ÷ÒªµÄÉÌÒµÊµ×÷,
ÆäËüµÄ³§ÉÌÏñÊÇ Aladdin Ò²¿ÉÒÔ×ö³ö×Ô¼º¶ÀÁ¢¿ª·¢µÄÊµ×÷.

\end{description}





\subsection{Non-PostScript}

Èç¹ûÔ¤Ëã²»ÔÊÐíÂòÒ»²¿ PostScript Ó¡±í»ú, Äã¿ÉÒÔÂòÈÎºÎ Ghostscript 
Ö§Ô®µÄÓ¡±í»ú. GhostScript ÊÇÒ»¸öÃâ·ÑµÄ PostScript ½âÒëÆ÷,
¿ÉÒÔÓÃÀ´Ä£ÄâÊµ¼ÊµÄÓ¡±í»úÖ§Ô®. 
\nameurl{http://www.cs.wisc.edu/~ghost/}{Ghostscript µÄÊ×Ò³}
ÖÐÓÐÖ§Ô®µÄÓ¡±í»úÇåµ¥, ÒÔ¼°ÐÂµÄºÍ¿ª·¢ÖÐµÄÇý¶¯³ÌÊ½µÄ×îÐÂÏûÏ¢. 
×¢ÒâÒ»µã¾ÍÊÇÕâ¸öÍøÒ³ÁÐ³öµÄÊÇ×îÐÂ°æµÄ Ghostscript ËùÖ§Ô®µÄÓ¡±í»ú,
¶ø´ó²¿·ÝµÄ Linux ·¢ÐÐÌ×¼þÒòÎª°æÈ¨µÄ¹ØÏµÖ»ÄÜ³ö»õ½Ï¾ÉµÄ Ghostscript °æ±¾.
ÐÒÔËµÄÊÇÔÚÃ¿Ò»¸ö·¢ÐÐÌ×¼þµÄ¾èÔùÇø(contrib area) ÖÐÍ¨³£¶¼ÓÐÏÈ°ü×°ºÃµÄÄ¿Ç°°æ±¾.
ÇëÄã½«³É¹¦»òÊ§°ÜµÄ¾­ÑéÈçÍ¬ÍøÒ³ÖÐËùÒªÇóµÄ¸æËßËûÃÇÒÔ°ïÃ¦¸Ä½øÕâ¸öÍøÒ³.



 
Adobe ¹«Ë¾ÓÐÒ»ÖÖÐÂµÄÓ¡±í»úÓïÑÔ½Ð×ö "PrintGear". ÎÒÏëËüÊÇ¾ßÓÐ PostScript 
¹ÛÄîµ«ÓëÆä²»ÏàÈÝµÄÒ»ÖÖ´ó·ù¼ò»¯µÄ¶þ½øÎ»ÓïÑÔ. ¶øÎÒÒ²Ã»ÌýËµ ghostscript
Ö§Ô®Ëü. µ«ÊÇÓÐÐ© PrintGear Ó¡±í»úËÆºõÒ²Ö§Ô®ÆäËüÓïÑÔÈç PCL , 
¶øÕâÖÖÓ¡±í»ú±ã¿ÉÒÔÔÚ Linux ÏÂÊ¹ÓÃ (¼ÙÈç PCL ÊÇÔÚÓ¡±í»úÖÐÊµ×÷¶ø²»ÊÇÔÚ Windows
Çý¶¯³ÌÊ½ÖÐ).




\subsection{ÄÇÐ©Ó¡±í»ú¿ÉÒÔÓÃ?}

Èç¹ûÄã´òËãÂòÒ»²¿Ó¡±í»ú, Äã¿ÉÒÔµ½Ò»Ð©µØ·½È¥¿´¿´ËüÊÇ·ñ±»Ö§Ô®. ¹²Í¬ºÏ×÷Î¬»¤µÄ
Printing HOWTO Ó¡±í»ú
\nameurl{http://www.picante.com/~gtaylor/pht/printer_list.cgi}{×ÊÁÏ¿â} ¾ÍÊÇÏ£ÍûÄÜÌá¹©Ò»¸ö¼òµ¥Ò×¶®µÄ Linux Ó¡±í»úÖ§Ô®×´Ì¬µÄÁÐ±í.
¼òµ¥µØ½«Ö®ÕªÒªÈçáá; ÇÐ¼Çµ½ÏßÉÏ²éÑ¯¸ü¶àµÄÏ¸½ÚÒÔ¼°¸ÃÊ¹ÓÃÄÇ¸öÇý¶¯³ÌÊ½µÄ×ÊÁÏ.



Ghostscript µÄ \nameurl{http://www.cs.wisc.edu/~ghost/printer.html}{ÏàÈÝÓ¡±í»úÍøÒ³} ÁÐ³öÁËÒ»Ð©Ö§Ô®µÄÓ¡±í»ú, Í¬Ê±Ò²Á¬½áµ½ÆäËüµÄÍøÒ³.
ÁíÍâ Dejanews Ò²ÓÐÊý°Ù¸ö"ÄÜÓÃ"ºÍ"²»ÄÜÓÃ"µÄ»Ø±¨. ÊÔÊÔÕâÈý¸öµØ·½,
ÔÚÄãÍê³ÉÒÔáá, ÇëÈ·ÈÏÔÚ
\nameurl{http://www.picante.com/~gtaylor/pht/printer_list.cgi}{×ÊÁÏ¿â} ÖÐÓÐÄãÓ¡±í»úµÄÕýÈ·×ÊÁÏ,
ÒÔ±ãÒÔááÕâ·ÝÎÄ¼þ¿ÉÒÔÕýÈ·µØÁÐ³öÄãµÄÓ¡±í»ú.




\subsubsection{Ó¡±í»úÏàÈÝÐÔÁÐ±í}

ÕâÒ»½ÚÊÇÏßÉÏ°æ±¾µÄÕªÒª. ÏßÉÏ°æ±¾°üº¬ÁË»ù±¾¹æ¸ñ, ×¢ÒâÊÂÏî,
µ½Çý¶¯³ÌÊ½×ÊÑ¶µÄÁ¬½á, Ê¹ÓÃÕßÎ¬»¤µÄÎÄ¼þ, ÖÆÔìÉÌµÄÍøÒ³, ÖîÈç´ËÀàµÄ×ÊÁÏ.
Õâ¸öÁÐ±íµÄÏßÉÏ°æ±¾»¹ÊÇ»¥¶¯Ê½µÄ; ÈËÃÇ¿ÉÒÔËæÊ±Ôö¼ÓÓ¡±í»ú, ËùÒÔ¼ÇµÃÈ¥²éÒ»ÏÂ.
×îáá, Èç¹ûÄãµÄÓ¡±í»úÃ»ÓÐ±»ÁÐ³öÀ´, Çë°ÑËü¼Ó½øÈ¥.



Õâ¡õ°ÑÓ¡±í»ú·ÖÎªËÄÀà:
\begin{description}
\item[ÍêÃÀ] \mbox{}

ÕâÒ»ÀàµÄÓ¡±í»ú¹¤×÷ÆðÀ´ÍêÃÀ¼«ÁË - Äã¿ÉÒÔÓÃµ½Ó¡±í»úËùÓÐµÄ¹¦ÄÜ,
°üÀ¨ÑÕÉ«, ËùÓÐµÄ½âÎö¶È, µÈµÈ. ÔÚÉÙÊýµÄÇé¿öÏÂ,
Ó¡±í»ú¾ßÓÐÎ´¹«¿ªµÄ"½âÎö¶È¼ÓÇ¿"Ä£Ê½, ÈôÊÇÕâÖÖÄ£Ê½ÎÞ·¨Ê¹ÓÃ,
ÎÒÃÇÈÔ½«ËüÁÐÎªÍêÃÀ; Í¨³£ÕâÖÖÁÐÓ¡Æ·ÖÊµÄ²î±ð²»´ó, ËùÒÔ²»ÐèÒªµ£ÐÄ.

\item[Á¼ºÃ] \mbox{}

Äã¿ÉÒÔÁÐÓ¡, ¸÷·½ÃæµÄÇé¿ö¶¼²»´í,
µ«ÊÇ¿ÉÄÜ»áÓÐÒ»Ð©ÔÚÁÐÓ¡»òÆäËü¹¦ÄÜÉÏµÄÐ¡ÏÞÖÆ.

\item[ÃãÇ¿] \mbox{}

Äã¿ÉÒÔÁÐÓ¡, µ«ÊÇÃ»ÓÐ°ì·¨×ö²ÊÉ«ÁÐÓ¡»òÊÇÖ»ÄÜÓÃºÜ²îµÄ½âÎö¶È.
Çë²ÎÔÄÏßÉÏÁÐ±íµÄ×¢ÒâÊÂÏîÒ»À¸ÒÔµÃÖªÏà¹ØµÄÏÞÖÆ.

\item[±¯²Ò] \mbox{}

Äã¸ù±¾Ã»°ì·¨ÁÐÓ¡; Í¨³£ÕâÊÇÒòÎªÈ±·¦Çý¶¯³ÌÊ½,
¶øÇÒ/»òÕßÊÇÈ±·¦ÈçºÎ×«Ð´Çý¶¯³ÌÊ½µÄÎÄ¼þ

\end{description}

ÓÉì¶Õâ¶ùµÄÄÚÈÝÊÇÓÉ´ó¼ÒËùÌá¹©µÄ, ËùÒÔÃ»·¨±£Ö¤Ò»¶¨ÊÇÕýÈ·µÄ.
µ«ÊÇÕâÓ¦¸ÃºÜÈÝÒ×ÓÉÇý¶¯³ÌÊ½ÍøÒ³ºÍÖÆÔìÉÌµÄÍøÕ¾µÃµ½ corroborate.
In all cases, since this information is provided by dozens of people,
none of it is guaranteed to be correct.  It should, however, be easy
to corroborate from the driver web pages and manufacturer web sites.



·Ï»°²»¶àËµ, ÏÂÃæÊÇÓ¡±í»úÏàÈÝÐÔÁÐ±í:
\begin{description}
\item[Brother] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

HL-10V,
HL-660,
HL-720,
HL-760.

\item[Á¼ºÃ] \mbox{}

HL-1050.

\end{description}


\item[Canon] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

BJ-10e,
BJ-20,
BJ-200,
BJC-210,
BJC-240,
BJC-250,
BJC-610,
BJC-620,
BJC-70,
BJC-800,
LBP-8II,
LIPS-III.

\item[Á¼ºÃ] \mbox{}

BJ-300,
BJC-4000,
BJC-4100,
BJC-4200,
BJC-4300,
BJC-4400,
BJC-7000,
BJC-7004.

\item[ÃãÇ¿] \mbox{}

BJC-4550,
MultiPASS C2500,
MultiPASS C3500.

\item[±¯²Ò] \mbox{}

BJC-5000,
LBP-460,
LBP-660.

\end{description}


\item[Epson] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

ActionLaser 1100,
LP 8000,
LQ 850,
Stylus Color,
Stylus Color 400,
Stylus Color 500,
Stylus Color 600,
Stylus Color 640,
Stylus Color 850,
Stylus Color II,
Stylus Color IIs,
Stylus Pro XL.

\item[Á¼ºÃ] \mbox{}

Stylus Color 800,
Stylus Photo 750.

\item[ÃãÇ¿] \mbox{}

Stylus Color 740.

\end{description}


\item[HP] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

2000Cse,
2500C,
DesignJet 650C,
DeskJet 1200C,
DeskJet 1600C,
DeskJet 1600Cm,
DeskJet 400,
DeskJet 420C,
DeskJet 500,
DeskJet 550C,
DeskJet 600,
DeskJet 660Cse,
DeskJet 690C,
DeskJet 850C,
DeskJet 855C,
DeskJet 870,
DeskJet 870Cxi,
DeskJet 890,
LaserJet 1100,
LaserJet 2100,
LaserJet 2100M,
LaserJet 4000N,
LaserJet 4L,
LaserJet 5,
LaserJet 5L,
LaserJet 5MP,
LaserJet 6L,
LaserJet 6MP,
LaserJet 8000,
LaserJet 8100,
Laserjet 5000,
Mopier 320,
PaintJet XL300.

\item[Á¼ºÃ] \mbox{}

HP 660C.

\item[ÃãÇ¿] \mbox{}

DeskJet 1000C,
DeskJet 670C,
DeskJet 710,
DeskJet 720C,
DeskJet 722C,
DeskJet 820C.

\item[±¯²Ò] \mbox{}

LaserJet 3100.

\end{description}


\item[IBM] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

Jetprinter 3852.

\end{description}


\item[Lexmark] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

Optra Color 1200,
Optra Color 1275,
Optra Color 40,
Optra Color 45,
Optra E,
Optra E+,
Optra Ep,
Optra S 1250.

\item[ÃãÇ¿] \mbox{}

1020 Business,
3000,
5700,
7000.

\item[±¯²Ò] \mbox{}

1000,
1020,
1100,
2030,
2050,
2070,
5000,
7200,
Winwriter 100,
Winwriter 150c,
Winwriter 200.

\end{description}


\item[Minolta] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

PagePro 6,
PagePro 8.

\end{description}


\item[NEC] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

P2X.

\item[ÃãÇ¿] \mbox{}

SuperScript 100C,
SuperScript 1260,
SuperScript 150C,
SuperScript 650C,
SuperScript 750C,
SuperScript 860,
SuperScript 870.

\item[±¯²Ò] \mbox{}

SuperScript 660i,
SuperScript 660plus.

\end{description}


\item[Okidata] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

OL 410e,
OL 610e/PS,
OL 810e/PS,
Okipage 6e,
Okipage 6ex,
Okipage 8c.

\item[Á¼ºÃ] \mbox{}

Okipage 4w.

\item[±¯²Ò] \mbox{}

Okipage 8w,
okijet 2010.

\end{description}


\item[Olivetti] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

JP350S.

\end{description}


\item[Panasonic] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

KX-P1123,
KX-P4440,
KX-P5400,
KX-P8420,
KX-P8475.

\item[ÃãÇ¿] \mbox{}

KX-P6500.

\item[±¯²Ò] \mbox{}

KX-P6100,
KX-P8410.

\end{description}


\item[QMS] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

2425 Turbo EX.

\end{description}


\item[Ricoh] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

4801,
6000.

\end{description}


\item[Xerox] \mbox{}

\begin{description}
\item[ÍêÃÀ] \mbox{}

DocuPrint C55,
DocuPrint N17,
DocuPrint N32.

\end{description}


\end{description}





\section{Ó¡±íÁ¬Ïß×÷ÒµÈíÌå(spooling software) ÄØ?}

Ö±µ½×î½ü, Linux µÄÊ¹ÓÃÕßµÄÑ¡ÔñºÜ¼òµ¥ - Ã¿¸öÈËÅÜµÄ¶¼ÊÇ¹ÅÀÏµÄ´Ó BSD µÄ Net-2 
³ÌÊ½ÂëÒÆ¹ýÀ´µÄ lpd. ¼´Ê¹ÔÚ½ñÌì, ´ó²¿·Ý³§ÉÌÈÔÒÔÕâ¸öÈíÌå³ö»õ. 
µ«ÊÇÕâ¸öÇé¿öÒÑ¾­¿ªÊ¼ÔÚ¸Ä±ä. SVR4 Ò»ÅÉµÄÏµÍ³, °üÀ¨ÉýÑôµÄ Solaris 
ÔÚÄÚËù¸½µÄÊÇ¸öÍêÈ«²»Í¬µÄÓ¡±í»úÁ¬Ïß×÷ÒµÌ×¼þ, Õâ¸öÌ×¼þÒÔ lpsched ÎªÖÐÐÄ.
ÁíÍâ»¹ÓÐ¼£ÏóÏÔÊ¾ÓÐÐ© Linux ³§ÉÌ»á¸Ä³ÉÌá¹©ÐÂµÃ¶à¶øÇÒÃâ·ÑµÄ LPRng.
LPRng µÄ³ÌÊ½ÂëÔ¶±È¾ÉÓÐµÄ lpd À´µÄÓÐ¹æ»®, ÔÚ´óÁ¿°²×°Ê±(×¢:
³¬¹ýÒ»Ì¨Ó¡±í»ú, ÐòÁÐÊ½Ó¡±í»ú, »òÈÎºÎ·Ç lpd µÄÍøÂ·Ó¡±í»ú)Ò²½ÏÎªÈÝÒ×¹ÜÀí.
ËüÉõÖÁ¿ÉÒÔÕæµÄ³ÆµÃÉÏ°²È« - Ã»ÓÐ SUID µÄÖ´ÐÐµµ, »¹Ö§Ô®Í¸¹ý PGP »ò 
Kerberos ×öÊ¹ÓÃÕßÑéÖ¤. 



ËäÈ»ÓÐÕâÐ©ÐÂÑ¡Ôñ, Ä¿Ç° lpd ¶Ô´ó²¿·ÝµÄ Linux Ê¹ÓÃÕß¶øÑÔÓ¦¸ÃÊÇ×ã¹»ÁË. 
ËäÈ»Ëü²»ÊÇ×îÐÂ³±µÄÏµÍ³, µ«Ö»ÒªÉè¶¨ºÃ¾ÍÃ»ÎÊÌâ, ¶øÇÒËü¹ãÎªÈËÃÇËùÊìÏ¤,
Í¬Ê±ºÜ¶àµÄ Unix Êé¼®Ò²Ìá¹©ÁË´óÁ¿µÄËµÃ÷ÎÄ¼þ.



Èç¹ûÄãÏëÖªµÀ¸ü¶àÓÐ¹Ø LPRng µÄ×ÊÑ¶, Çëµ½ \nameurl{http://www.astart.com/lprng/LPRng.html}{LPRng µÄÍøÒ³}. ÔÚÎ´À´Õâ·Ý HOWTO 
ÖÐ½«»á°üº¬Ê¹ÓÃ LPRng ÒÔ¼°Ê¹ÓÃÆÕÍ¨ lpd µÄÏà¹ØÑ¶Ï¢.




\section{»ù±¾ÔË×÷·½Ê½}



ÎªÁËÈÃÁÐÓ¡¹¦ÄÜÄÜ¹»Õý³£ÔË×÷, ÄãÐèÒªÁË½â lpd ÏµÍ³ÊÇÈçºÎÔË×÷µÄ.

Lpd ÊÇ Line Printer Daemon µÄËõÐ´, ¸ù¾ÝÉÏÏÂÎÄÖ¸µÄ¿ÉÒÔÊÇ¼à¿Ø³ÌÊ½(the daemon) 
±¾Éí»òÊÇÖ´ÐÐÓ¡±í»úÁ¬Ïß×÷ÒµµÄÈ«Ì×³ÌÊ½. °üÀ¨ÁËÓÐ:

\begin{description}
\item[{\ttfamily \onlynameurl{lpd}}] \mbox{}

Ó¡±í»úÁ¬Ïß×÷Òµ¼à¿Ø³ÌÊ½(The spooling daemon). ÓÐÒ»¸ö¸ºÔð¿ØÖÆËùÓÐÊÂÇé, 
ÁíÍâÕë¶ÔÃ¿Ò»²¿ÁÐÓ¡ÖÐµÄÓ¡±í»úÒ²»áÖ´ÐÐÒ»·Ý.

\item[{\ttfamily \onlynameurl{lpr}}] \mbox{}

Ê¹ÓÃÕßµÄÁÐÓ¡Ö¸Áî. Lpr »áÁªÂç lpd ²¢½«ÁÐÓ¡¹¤×÷ËÍ½øÁÐÓ¡ÔÝ´æÆ÷.

\item[{\ttfamily \onlynameurl{lpq}}] \mbox{}

ÁÐ³öØùÁÐÖÐµÈ´ýÁÐÓ¡µÄ¹¤×÷.

\item[{\ttfamily \onlynameurl{lpc}}] \mbox{}

Lpd ÏµÍ³¿ØÖÆÖ¸Áî. Äã¿ÉÒÔÓÃ lpc À´¿ØÖÆØùÁÐ, ÈçÍ£Ö¹, ¿ªÊ¼, µ÷ÕûË³ÐòµÈµÈ.

\item[{\ttfamily \onlynameurl{lprm}}] \mbox{}

{\ttfamily lprm} ¿ÉÒÔ´ÓØùÁÐÖÐÒÆ³ýÒ»¼þÁÐÓ¡¹¤×÷.

\end{description}


ÄÇÕâÒ»ÇÐÊÇÈçºÎ´ÕÔÚÒ»ÆðµÄÄØ? µ±ÏµÍ³¿ª»úÊ±»áÖ´ÐÐ lpd. Ëü»á¼ì²é {\itshape /etc/printcap\/} ÖÐÓÐÄÇÐ©Ó¡±í»úÒªÉèÁ¢ÁÐÓ¡ÔÝ´æÆ÷. Ã¿µ±ÓÐÊ¹ÓÃÕßÖ´ÐÐ lpr Ê±, lpr »áÍ¸¹ý 
{\itshape /dev/printer\/} µÄ²å×ù(socket) ÕÒµ½ lpd, 
²¢½«ÒªÁÐÓ¡µÄµµ°¸ºÍÒ»Ð©¹Øì¶ÁÐÓ¡µÄÈËÒÔ¼°ÁÐÓ¡·½·¨µÄ×ÊÑ¶´«ËÍ¸ø lpd.
È»áá lpd ÔÙ½«µµ°¸ËÍµ½µÄÊÊµ±Ó¡±í»ú.

lp ÏµÍ³Éè¼ÆµÄÊ±ºò, ´ó²¿·ÝµÄÓ¡±í»ú¶¼ÊÇÁÐÊ½Ó¡±í»ú(line printer) - Ò²¾ÍÊÇËµ, 
´ó²¿·ÝµÄÊ¹ÓÃÕßÊÇÁÐÓ¡´¿ÎÄ×Ö¸ñÊ½(plain ascii). 
½á¹û¾ÍÊÇÎÒÃÇ»¹µÃ×öÒ»Ð©¶îÍâµÄÃüÁî¸å´¦Àí(scripting) ²ÅÄÜÊ¹ lpd 
ÊÊÓÃì¶ÏÖ½ñµÄÁÐÓ¡¹¤×÷, Í¨³£ÊÇ PostScript, »òÊÇÎÄ×Ö¸ñÊ½, »òÊÇ dvi, ...




\section{»ù±¾ÏµÍ³Éè¶¨}


\subsection{´«Í³µÄ lpd Éè¶¨}

×î»ù±¾µÄ lpd Éè¶¨Ö»ÄÜÈÃÏµÍ³ØùÁÐµµ°¸È»ááÁÐÓ¡, ¶ø²»¹ÜÄãµÄÓ¡±í»úÄÜ·ñÈÏµÃÕâÐ©µµ°¸,
¿ÉÄÜÒ²ÎÞ·¨ÈÃÄã²úÉúÎüÒýÈËµÄ±¨±í. µ«ÎÞÂÛÈçºÎ, ÕâÊÇ¿çÏòÀí½âµÄµÚÒ»²½.
ËùÒÔÈÃÎÒÃÇ¿´ÏÂÈ¥.

»ù±¾ÉÏ, ÒªÔö¼ÓÒ»¸öÁÐÓ¡ØùÁÐ, Äã±ØÐëÔÚ {\itshape /etc/printcap\/} ÖÐ¼ÓÒ»±Ê¼ÇÂ¼, 
ÒÔ¼°ÔÚ {\itshape /var/spool/lpd\/} Ö®ÏÂ½¨Á¢Ò»¸öÁÐÓ¡ÔÝ´æÆ÷µÄ¹¤×÷Ä¿Â¼(spool 
directory).

{\itshape /etc/printcap\/} ÖÐµÄ¼ÇÂ¼¿´ÆðÀ´ÏñÕâ¸öÑù×Ó:
\begin{tscreen}
\begin{verbatim}
# LOCAL djet500
lp|dj|deskjet:\
        :sd=/var/spool/lpd/dj:\
        :mx#0:\
        :lp=/dev/lp0:\
        :sh:
\end{verbatim}
\end{tscreen}

Õâ¸öÀý×Ó¶¨ÒåÁËÒ»¸öÃûÎª {\itshape lp\/}, {\itshape dj\/}, »òÊÇ {\itshape deskjet\/} µÄÁÐÓ¡ÔÝ´æÆ÷,
ÔÝ´æÆ÷µÄ¹¤×÷Ä¿Â¼ÔÚ {\itshape /var/spool/lpd/dj\/}, Ã»ÓÐµ¥Ò»¹¤×÷´óÐ¡µÄÉÏÏÞ, 
ÁÐÓ¡µÄ×°ÖÃÊÇ {\itshape /dev/lp0\/}, ¶øÇÒ²»»áÔÚÃ¿Ò»¸ö¹¤×÷Ö®Ç°¼ÓÉÏ±êÌâÒ³
(ÓÐÖøÁÐÓ¡ÈËµÄÐÕÃûÖ®ÀàµÄ×ÊÁÏ).

ÏÖÔÚ¾ÍÈ¥¿´¿´ {\itshape \onlynameurl{printcap}\/}.
µÄÏßÉÏÊÖ¡õ.

ÉÏÃæÕâ¸öÀý×Ó¿´ÆðÀ´·Ç³£¼òµ¥, µ«ÊÇÓÐÒ»¸öÎÊÌâ - ³ý·Ç DeskJet 500 
ÄÜ¿´¶®ÎÒËÍ³öÈ¥µÄµµ°¸, ·ñÔò±ã»áÓ¡³öÂÒÂë. ¾ÙÀýÀ´Ëµ,
¼ÙÈçËÍÒ»¸ö´«Í³µÄ Unix ÎÄ×Öµµ°¸¸ø deskjet »áµ¼ÖÂÐÂÐÐ×ÖÔª(newline)
±»Öð×ÖÁÐÓ¡, ¶øµÃÏÂÃæµÄ½á¹û:
\begin{tscreen}
\begin{verbatim}
This is line one.
                 This is line two.
                                  This is line three.
\end{verbatim}
\end{tscreen}

Í¬ÑùµÄ, ÁÐÓ¡Ò»¸ö PostScript µµµ½Õâ¸öÁÐÓ¡ÔÝ´æÆ÷»áµÃµ½Í¬Ñù½×ÌÝ×´µÄ
PostScript ÃüÁîÁÐ±í, ¶ø²»ÊÇÎÒÃÇÐèÒªµÄ½á¹û.

ºÜÏÔÈ»ÎÒÃÇ»¹ÐèÒªÐ©Ê²÷á, Õâ¾ÍÊÇ filtering µÄÄ¿µÄ. ¿´¹ý printcap 
ÏßÉÏÊÖ¡õµÄ±È½ÏÏ¸ÐÄµÄ¶ÁÕß¿ÉÄÜÒÑ¾­×¢Òâµ½ {\itshape if\/} ¼° {\itshape of\/} 
ÕâÁ½¸öÊôÐÔ. ÆäÖÐµÄ {\itshape if\/}, input filter ¾ÍÊÇÎÒÃÇÏÖÔÚËùÐèÒªµÄ.

¼ÙÊ¹ÎÒÃÇÐ´¸ö¶Ì¶ÌµÄ shell script ½Ð {\itshape filter\/} 
Ê¹Ö®ÔÚÐÂÐÐ×ÖÔªÖ®Ç°¼ÓÉÏ»Ø³µ×ÖÔª(carriage return), ¾Í¿ÉÒÔÏû³ý½×ÌÝ×´. 
ËùÒÔÎÒÃÇ±ØÐëÔÚÇ°ÃæµÄ printcap µÄ¼ÇÂ¼ÖÐ¼ÓÉÏ {\itshape if\/} ÕâÒ»ÐÐ:
\begin{tscreen}
\begin{verbatim}
lp|dj|deskjet:\
        :sd=/var/spool/lpd/dj:\
        :mx#0:\
        :lp=/dev/lp0:\
        :if=/var/spool/lpd/dj/filter:\
        :sh:
\end{verbatim}
\end{tscreen}

Õâ¸ö¶Ì¶ÌµÄ filter script ¿ÉÒÔÊÇ:
\begin{tscreen}
\begin{verbatim}
#!perl
# The above line should really have the whole path to perl
# This script must be executable: chmod 755 filter
while(<STDIN>){chop $_; print "$_\r\n";};
# You might also want to end with a form feed: print "\f";
\end{verbatim}
\end{tscreen}

¼ÙÈçÎÒÃÇÕÕÉÏÃæµÄ·½·¨, ÎÒÃÇ¾Í»áµÃµ½Ò»¸öÄÜÕý³£Ó¡³öÆÕÍ¨ Unix ÎÄ×ÖµµµÄÁÐÓ¡ÔÝ´æÆ÷.
(»¹ÓÐÆäËûËÄ°ÙÍòÖÖ¸üºÃµÄ·½·¨À´Ð´Õâ¸öÃüÁî¸å, µ«ÊÇÕâ¸öºÜÊÊºÏ¾ÙÀý, 
Äã¿ÉÒÔ×Ô¼ºÐ´Ò»¸ö¸üÓÐÐ§ÂÊµÄ.)

Ê£ÏÂµÄÎ¨Ò»ÎÊÌâÊÇÖ»ÄÜÓ¡³ö´¿ÎÄ×ÖµµÊµÔÚÊÇ²»¹»ºÃ - Èç¹ûÄÜ¹»Ó¡³ö PostScript
»òÊÇÆäËü¸ñÊ½»¯µÄ»òÊÇÍ¼ÐÎÊä³ö¾Í¸ü°ôÁË. Õâ¿ÉÒÔ×öµÄµ½, Ò²ºÜÈÝÒ××öµ½.
·½·¨¾ÍÊÇÑÓÉìÇ°ÃæµÄ filter. Èç¹ûÄãÐ´³öÒ»¸öÄÜ½ÓÊÜÈÎÒâµµ°¸¸ñÊ½,
È»ááÕë¶ÔÃ¿ÖÖÇé¿ö¶¼¿ÉÒÔ²úÉú DeskJet ËùÒªµÄ×ÊÁÏµÄ filter, 
ÄÇÄã¾ÍÓÐÁËÒ»¸öÖÇ»ÛÐÍµÄÁÐÓ¡ÔÝ´æÆ÷.

ÕâÖÖ filter ³ÆÖ®Îª {\itshape magic\/} filter. ÄãÎÞÐè×Ô¼ºÐ´Ò»¸ö, ³ý·ÇÄãÒªÓ¡µÄ¶«Î÷ºÜÆæ¹Ö.
ÍøÂ·ÉÏÒÑ¾­ÓÐºÜ¶àÐ´ºÃµÄ, APS Filter ¾ÍÊÇ·Ç³£°ôµÄÒ»¸ö. Ò²Ëµ²»¶¨ÄãµÄ Linux
·¢ÐÐ°æ±¾(distribution) ÒÑ¾­°üÀ¨ÁËÒ»¸öÓ¡±í»úÉè¶¨¹¤¾ßÊ¹µÃÕâÒ»ÇÐ¶¼ºÜÈÝÒ×.




\subsection{µµ°¸È¨ÏÞ}

Ó¦´óÖÚÒªÇó, ÎÒ°ÑÎÒÏµÍ³ÉÏÒ»Ð©Ïà¹Øµµ°¸µÄÈ¨ÏÞÁÐ³ö. »¹ÓÐÆäËü¸üºÃµÄÉè¶¨·½·¨,
×îºÃÊÇÖ»½«Ö´ÐÐµµÉèÎª SGID ¶ø²»ÒªÉèÎª SUID root, µ«ÕâÊÇÎÒÏµÍ³Ô¤ÉèµÄÉè¶¨,
¶øÇÒÔË×÷Õý³£.(ÀÏÊµËµ, Èç¹ûÄãµÄ³§ÉÌÁ¬¿ÉÒÔÔË×÷µÄ lpd ¶¼ÎÞ·¨Ìá¹©, Äã¾ÍÓÐ¿àÍ·³ÔÁË.)
\begin{tscreen}
\begin{verbatim}
-r-sr-sr-x   1 root     lp    /usr/bin/lpr*
-r-sr-sr-x   1 root     lp    /usr/bin/lprm*
-rwxr--r--   1 root     root  /usr/sbin/lpd*
-r-xr-sr-x   1 root     lp    /usr/sbin/lpc*
drwxrwxr-x   4 root     lp    /var/spool/lpd/
drwxr-xr-x   2 root     lp    /var/spool/lpd/lp/
\end{verbatim}
\end{tscreen}


Lpd Ä¿Ç°±ØÐëÒÔ root Éí·ÝÖ´ÐÐ²ÅÄÜÁ¬½Óµ½µÍºÅ(Á¬½Ó²ººÅµÍì¶ 1024)µÄ lp ·þÎñ²º. 
¿ÉÄÜÓ¦¸Ã¸Ä³ÉÔÚÁ¬½Óáá½«Ê¹ÓÃÕßÉí·Ý±ä³É lp »òÆäËûÉí·Ý, µ«ÊÇÎÒ²»ÈÏÎªÏÖÔÚÓÐÕâÑù×ö. 
ÁîÈËÓÐÐ©Ê§Íû.




\section{È¡µÃÁÐÓ¡ÈíÌå}

Ðí¶àÔ¤ÏÈÐ´ºÃµÄ filter Ì×¼þ (ÒÔ¼°ÆäËüÓëÓ¡±íÓÐ¹ØµÄÈíÌå) ÔÚ {\ttfamily \nameurl{ftp://metalab.unc.edu/pub/Linux/system/printing/}{Metalab}} ¶¼ÓÐÌá¹©. ÏñÊÇ psutils, a2ps, mpage, dvitodvi, flpr 
µÈ¹¤¾ß¶¼¿ÉÒÔÔÚÄÇ¶ùÕÒµÃµ½.



ÓÐÒ»Õó×Ó, ºÜ¶àÌ×¼þ¶¼ÏëÈÃÉè¶¨Ó¡±í»ú¼òµ¥Ò»µã. ÕâÐ©Ì×¼þ¿ÉÄÜ¶¼»¹ÔÚ,
µ«ÊÇÆäÖÐ×îÐÂ×îºÃ¾ÍÊô Andreas Klemm µÄ APS Filter Ì×¼þÁË.
Õâ¸öÌ×¼þÌá¹©ÁËÒ»¸öÑ¡µ¥Ê½µÄ printcap Éè¶¨³ÌÊ½, 
¶øÇÒ¼¸ºõ¿ÉÒÔ´¦ÀíÈÎºÎÄãËùÄÜÏëµ½µÄÊäÈë¸ñÊ½. 
¼ÙÊ¹ÄãµÄ³§ÉÌ²¢Î´Ìá¹©Ò»×éºÃµÄÓ¡±í»úÉè¶¨¹¤¾ß, Ñ¡ APS Filter ¾Í¶ÔÁË.




\section{³§ÉÌµÄ½â¾ö·½°¸}

ÀíÂÛÉÏ, ÕâÒ»½ÚÊÇ²»ÍêÕûµÄ. Çë±ð¿ÍÆøÀ´¸æËßÎÒÄã×îÏ²ºÃµÄ·¢ÐÐ°æ±¾(distribution)
µÄÏà¹ØÏ¸½Ú.




\subsection{Red Hat}

Red Hat Ìá¹©Ò»¸ö GUI ½çÃæµÄÓ¡±í»ú¹ÜÀí³ÌÊ½ (ÔÚ control panel ¡õ),
¿ÉÒÔÈÃÄã¼ÓÉÏÍøÂ·Ó¡±í»ú»òÁ¬½Ó±¾µØ×°ÖÃµÄÓ¡±í»ú. ËüÈÃÄãÑ¡Ôñ ghostscript
Ö§Ô®µÄÓ¡±í»úÖÖÀàºÍËùÊ¹ÓÃµÄ Unix ×°ÖÃµµ°¸, È»áá»áÔÚ {\itshape /etc/printcap\/} 
ÖÐÉè¶¨ÁÐÓ¡ØùÁÐ, ÔÙÐ´ÈëÒ»¸ö¼ò¶ÌµÄÀûÓÃ {\ttfamily gs} ºÍ {\ttfamily \onlynameurl{nenscript}} 
ÒÔ´¦Àí PostScript ºÍ ascii µÄ magic filter. Õâ¸ö·½·¨»¹²»´í, 
¶ÔÒ»°ãµÄÇé¿ö¶øÑÔ, Ò²ºÜÈÝÒ×Éè¶¨.

µ«Èç¹ûÄãµÄÓ¡±í»ú²»ÔÚ Red Hat ±ê×¼Åä±¸µÄ Ghostscript(GNU °æ¶ø²»ÊÇ Aladdin,
Ö§Ô®µÄÓ¡±í»úÖÖÀà½ÏÉÙ) Ö§Ô®Ö®ÁÐ¾Í²»Ì«ÃîÁË. ¼ÙÈçÄã·¢ÏÖÓÃ Red Hat
Ëù¸½µÄÈíÌåÎÞ·¨Õý³£ÁÐÓ¡µÄÊ±ºò, Çë²ÎÔÄÉÏÃæµÄÓ¡±í»úÏàÈÝÐÔÁÐ±í
(»òÊÇµ½ \nameurl{http://www.picante.com/~gtaylor/pht/printer_list.cgi}{ÏßÉÏ×ÊÁÏ¿â}). Èç¹û Red Hat µÄ¹¤¾ß²»Ö§Ô®ÄãµÄÓ¡±í»úµÄ»°,
Äã¿ÉÄÜÐèÒª°²×°Ãâ·Ñ°æµÄ Aladdin Ghostscript, Èç¹ûÄãÊ¹ÓÃ apsfilter 
Ì×¼þ¿ÉÄÜ»á¸üºÃ. apsfilter Ì×¼þÄÜ´¦ÀíËùÓÐÐÂ½ü Ghostscript Ö§Ô®µÄÓ¡±í»ú.




\subsection{Debian}

Debian ÈÃÄãÑ¡ÔñÆÕÍ¨ lpd »ò LPRng; LPRng ¿ÉÄÜÊÇ±È½ÏºÃµÄÑ¡Ôñ.
ÎÒÏàÐÅ Debian Ò²Ìá¹©Ó¡±í»úÉè¶¨¹¤¾ßµÄÑ¡Ôñ; apsfilter 5
»òÖ®ááµÄ°æ±¾Ó¦¸ÃÊÇ×îÊÊºÏÄãµÄ, ÒòÎªÕâÒ»°æÔö¼ÓÁË¶Ô LPRng ºÍ Ghostscript
Í³Ò»Çý¶¯³ÌÊ½(uniprint driver scheme) µÄÖ§Ô®.




\subsection{ÆäËüµÄ·¢ÐÐ°æ±¾(Other Distributions)}

Çë½«ÆäËü·¢ÐÐ°æ±¾µÄ´¦Àí·½·¨µÄÑ¶Ï¢¼Ä¸øÎÒ!




\section{Ghostscript.}

\onlynameurl{Ghostscript} 
ÊÇ¸ö¶Ô Linux ÁÐÓ¡ÓÐÖø¼«´óÒâÒåµÄ³ÌÊ½. ´ó²¿·ÝÔÚ Unix ÏÂÁÐÓ¡µÄ³ÌÊ½¶¼»á²úÉú 
PostScript, ¶øÓ¡±í»úµÄ PostScript ´¦ÀíÄÜÁ¦Í¨³£ÊÇ¼ÛÖµ 100 ÃÀÔªµÄÑ¡¹ºÅä±¸.
µ«ÊÇ ghostscript È´ÊÇÃâ·ÑµÄ, ¶øÇÒËüÄÜ½« PostScript ×ª³ÉÄãµÄÓ¡±í»úËùÓÃµÄÓïÑÔ.
µ±ËüºÍÄãµÄ {\ttfamily lpd} input filter ½áºÏÖ®áá, Äã¾ÍÓÐÁËÒ»²¿ÐéÄâµÄ PostScript 
Ó¡±í»ú, ¶øÇÒÄÜ¹»´ó·ù¼ò»¯ÄãµÄÉú»î.

Ghostscript ÓÐÁ½¸ö°æ±¾. ÉÌÒµ°æ³ÆÎª Aladdin Ghostscript, ¸öÈË¿ÉÒÔ×ÔÓÉÊ¹ÓÃ, 
µ«ÊÇ²»ÄÜËæÖøÉÌÒµÓÃµÄ Linux ·¢ÐÐ°æ±¾É¢²¼. Aladdin Ghostscript Í¨³£±ÈÃâ·ÑµÄ 
ghostscript ÁìÏÈÒ»Äê×óÓÒ; ¾ÙÀýÀ´Ëµ, ËüÖ§Ô®Ðí¶àÃâ·Ñ°æÉÐÎ´Ö§Ô®µÄ²ÊÉ«ÅçÄ«»ú.

Ãâ·Ñ°æµÄ ghostscript Îª GNU Ghostscript, ÆäÊµ¾ÍÊÇ½Ï¾É°æµÄ Aladdin Ghostscript.
(Aladdin µÄÕâÖÖ°²ÅÅÖµµÃÎÒÃÇÔÞÉÍ; Ó¦¸ÃÓÐ¸ü¶àÎÞ·¨ÍêÈ«ÒÔ GPL
À´É¢²¼Ô­Ê¼ÂëµÄÈíÌå³§ÉÌÒÔÕâÖÖ·½Ê½Ö§³Ö×ÔÓÉÈíÌå (free software).

ÎÞÂÛÄãÓÃ {\ttfamily \onlynameurl{gs}} ×öÊ²÷á, 
¼ÇµÃ²»ÒªÈÃËüÄÜ¹»´æÈ¡µµ°¸ (ÓÃ {\ttfamily -dSAFER} Ñ¡Ïî). PostScript 
ÊÇ¸ö¾ßÓÐÍêÕû¹¦ÄÜµÄÓïÑÔ, ¶øÒ»¸ö¶ñÒâµÄ PostScript ³ÌÊ½¿ÉÒÔÈÃÄã³Ô×ã¿àÍ·.

ÔÙÌ¸µ½ PDF, Adobe µÄ Portable Document Format Êµ¼ÊÉÏ¾ÍÊÇ°Ñ PostScript 
¸ü×éÖ¯»¯, ¼ÓÉÏÒ»Ð©À©³ä¹¦ÄÜ, ¾­¹ýÑ¹ËõµÄµµ°¸¸ñÊ½. Ghostscript ¿ÉÒÔÏñ´¦Àí 
PostScript °ãµØ´¦Àí PDF. ËùÒÔÄã¿ÉÄÜÊÇÄãÖÜÔâµÚÒ»¸öÓµÓÐ¾ßÓÐ´¦Àí PDF 
ÄÜÁ¦µÄÓ¡±í»úµÄÈË.


\subsection{Æô¶¯ ghostscript}

µäÐÍµÄ×÷·¨ÊÇÔÚÄãµÄ magic filter(¼ÙÈçÄãµÄ³§ÉÌÃ»ÓÐÌá¹©Ò»¸öÊÊºÏÄãÓÃµÄ,
ÎÒ½¨Òé apsfilter) ÖÐÊ¹ÓÃ ghostscript, µ«ÊÇÈç¹ûÎªÁË³ý´í, 
Ö±½ÓÖ´ÐÐÍ¨³£»á±È½Ï·½±ãÐ©.

{\ttfamily gs -help} »á¼ò¶ÌµØÁÐ³öÓÐÓÃµÄÑ¡ÏîÒÔ¼°ËùÌá¹©µÄÇý¶¯³ÌÊ½.
(×¢ÒâÕâ¶ùËùÁÐ³öµÄ½öÊÇ±àÒë½øÈ¥µÄÇý¶¯³ÌÊ½, ¶ø²¢·ÇËùÓÐµÄÇý¶¯³ÌÊ½).

Äã¿ÉÒÔÓÃÏÂÃæµÄ·½Ê½Ö´ÐÐ gs À´²âÊÔ:
{\ttfamily gs {\itshape options\/} -q -dSAFER -sOutputFile=/dev/lp1 test.ps}.




\subsection{µ÷Õû ghostscript µÄÊä³ö½á¹û}

¼ÙÈç gs µÄÊä³ö²»ÄÜÈÃÈËÂúÒâ, »¹ÓÐÒ»Ð©°ì·¨.(ÊÂÊµÉÏ, Äã¿ÉÒÔ×öÈÎºÎÊÂ, 
ÒòÎªÄã¿ÉÒÔÈ¡µÃÔ­Ê¼Âë).




\subsubsection{Êä³öµÄÎ»ÖÃ¼°´óÐ¡}

Î»ÖÃ, ´óÐ¡, »¹ÓÐÓ°ÏñÔÚÒ³ÃæÉÏµÄÊÓ¾õ±ÈÀýÊÇÓÉ ghostscript 
ÖÐµÄÓ¡±í»úÇý¶¯³ÌÊ½Ëù¿ØÖÆµÄ. Èç¹ûÄã·¢ÏÖÁÐÓ¡³öÀ´Ì«¶Ì, Ì«³¤»òÊÇ´óÁËÁ½±¶,
Äã¿ÉÄÜ»áÏëÒª¿´Ò»ÏÂÇý¶¯³ÌÊ½µÄÔ­Ê¼Ä£×é²¢ÇÒµ÷ÕûÈÎºÎËùÄÜÏëµ½µÄ²ÎÊý.
²»ÐÒµÄÊÇÃ¿Ò»¸öÇý¶¯³ÌÊ½¶¼ÓÐ²»Í¬µÄ·½Ê½, ËùÒÔÎÒÒ²ÎÞ·¨¸æËßÄãÈçºÎµ÷Õû,
»¹ºÃ´ó²¿·ÝµÄÇý¶¯³ÌÊ½¶¼ÓÐ»¹ËãÇå³þµÄ×¢½â.




\subsubsection{Gamma, dotsizes, µÈµÈ}

´ó²¿·ÝµÄ·ÇÀ×ÉäÓ¡±í»úÒòÎªÁÐÓ¡µÄµã±È½Ï´ó, ¹Ê»áµ¼ÖÂÓ¡³öÀ´µÄÍ¼°¸Ì«ºÚ.
¼ÙÊ¹ÄãÓöµ½Õâ¸öÎÊÌâ, ÄãÓ¦¸ÃÊ¹ÓÃ×Ô¼ºµÄ×ª»»º¯Êý. Ö»ÒªÔÚ ghostscript 
µÄ lib-dir ÏÂ½¨Á¢ÈçÏÂµÄµµ°¸, ²¢ÔÚºô½Ð gs 
µÄÊ±ºò½«Õâ¸öµµÃû¼ÓÔÚÒªÁÐÓ¡µÄµµ°¸Ö®Ç°¾Í¿ÉÒÔÁË.
Äã¿ÉÄÜ»áÐèÒªµ÷ÕûÒ»ÏÂÊµ¼ÊµÄÖµ²ÅÄÜÊÊºÏÄãµÄÓ¡±í»ú. ½ÏÐ¡µÄÖµ»áµ¼ÖÂ½ÏÁÁµÄÁÐÓ¡Ð§¹û. 
ÌØ±ðÊÇµ±ÄãµÄÓ¡±í»úÊ¹ÓÃ Floyd-Steinberg ÑÝËã·¨À´»ìÉ« ( rasterize color )
¿ÉÄÜÊÇ±È½ÏºÃµÄÑ¡Ôñ.

\begin{tscreen}
\begin{verbatim}
---8<---- gamma.ps ----8<---
%!
%transfer functions for cyan magenta yellow black
{0.3 exp} {0.3 exp} {0.3 exp} {0.3 exp} setcolortransfer
---8<------------------8<---
\end{verbatim}
\end{tscreen}




ÄãÒ²¿ÉÒÔµ÷ÕûÕâÐ©ÖµÀ´²¹¾ÈÓ¡±í»úÑÕÉ«ÉÏµÄÎÊÌâ. ¼ÙÈçÄãÒªÕâ÷á×ö, ½¨ÒéÄã¿ÉÒÔÓÃ 
ghostscript ÄÚ¸½µÄ colorcir.ps ( ÔÚ examples/ Ä¿Â¼ÏÂ ) ×öÎª²âÊÔÒ³.



ºÜ¶à½ÏÐÂÐÍµÄ²ÊÉ«ÅçÄ«Ó¡±í»úµÄÇý¶¯³ÌÊ½¾ß±¸ÃüÁîÁÐÑ¡Ïî,
»òÊÇÓÐ²»Í¬µÄ upp Çý¶¯³ÌÊ½µµÀ´Êµ×ö gamma ¼°ÆäËü¸Ä±äÒÔÈÃÓ¡±í»úÊÊÓ¦²»Í¬ÀàÐÍµÄÖ½ÕÅ.
ÔÚÄãÓÃ Postscript À´ÐÞÕýÎÊÌâÖ®Ç°, Ó¦¸ÃÏÈ´ÓÕâ·½ÃæÖøÊÖ.




\section{ÈçºÎÁÐÓ¡µ½ÍøÂ·Ó¡±í»ú}

Lpd µÄÒ»¸öÌØÐÔ±ãÊÇ¿ÉÒÔÍ¸¹ýÍøÂ·½«±¨±íÁÐÓ¡µ½ÊµÌåÁ¬½ÓÔÚÆäËü»úÆ÷ÉÏµÄÓ¡±í»ú.
Ö»Òª×ÐÏ¸µØ×éºÏ filter ÃüÁî¸åºÍÏà¹ØµÄ¹¤¾ß³ÌÊ½, Äã¾Í¿ÉÒÔÈÃ lpr µÃÒÔÍ¸Í¨µØ
(transparently) ÁÐÓ¡µ½¸÷ÖÖÍøÂ·ÉÏµÄÓ¡±í»ú.




\subsection{ÁÐÓ¡ÖÁ Unix/lpd}

ÒªÈÃÔ¶¶ËµÄ»úÆ÷ÄÜ¹»Ê¹ÓÃÄãµÄÓ¡±í»úÁÐÓ¡, Äã±ØÐë½«Ô¶¶Ë»úÆ÷ÁÐÃûÔÚ
{\itshape /etc/hosts.equiv\/} »òÊÇ {\itshape /etc/hosts.lpd\/} µµ°¸Ö®ÖÐ.
(Òª×¢Òâ {\itshape hosts.equiv\/} »¹ÓÐÆäËüºÜ¶à×÷ÓÃ; Èç¹ûÄãÒª½«Ò»²¿»úÆ÷ÁÐÔÚÕâ¶ù,
ÇëÈ·¶¨ÄãÖªµÀÄãÔÚ×öÊ²÷á). ÄãÒ²¿ÉÒÔÀûÓÃ {\itshape rs\/} 
ÊôÐÔÀ´ÏÞ¶¨ÆäËü»úÆ÷ÉÏµÄÄ³Ð©ÌØ¶¨Ê¹ÓÃÕß²ÅÄÜÊ¹ÓÃÄãµÄÓ¡±í»ú. Çë¿´ {\ttfamily \onlynameurl{lpd}} µÄÏßÉÏÊÖ¡õÒÔÈ¡µÃÕâ·½ÃæµÄÑ¶Ï¢.




\subsubsection{ÓÃ {\ttfamily lpd}}

ÒªÁÐÓ¡µ½ÁíÒ»²¿»úÆ÷, ÄãÒªÔÚ {\itshape /etc/printcap\/} ÖÐ¼ÓÉÏÕâÑùµÄ¼ÇÂ¼,
\begin{tscreen}
\begin{verbatim}
# REMOTE djet500
lp|dj|deskjet:\
        :sd=/var/spool/lpd/dj:\
        :rm=machine.out.there.com:\
        :rp=printername:\
        :lp=/dev/null:\
        :sh:
\end{verbatim}
\end{tscreen}

Çë×¢ÒâÔÚ±¾µØµÄ»úÆ÷»¹ÊÇÒªÓÐÒ»¸öÓÉ {\ttfamily lpd} ¹ÜÀíµÄÁÐÓ¡ÔÝ´æÆ÷Ä¿Â¼.
Èç¹ûÔ¶¶ËµÄ»úÆ÷ÀëÏß»òÊÇÃ¦²»¹ýÀ´, 
ÁÐÓ¡¹¤×÷»áÁôÔÚ±¾µØµÄÔÝ´æÇøÖÐÖ±µ½ËÍ³öÈ¥ÎªÖ¹.




\subsubsection{ÓÃ {\ttfamily rlpr}}

ÄãÒ²¿ÉÒÔÓÃ {\itshape rlpr\/} ½«ÁÐÓ¡¹¤×÷Ö±½ÓËÍµ½Ô¶¶Ë»úÆ÷µÄØùÁÐÖÐ,
Ê¡ÏÂÉè¶¨ lpd µÄÂé·³. ¼ÙÈçÄãÅ¼¶û²ÅÒªÁÐÓ¡µ½ÆäËü²»Í¬µÄÓ¡±í»ú, 
Õâ¸ö·½·¨¾Í×îÓÐÓÃ. ÒýÒ»¶Î {\itshape rlpr\/} µÄÉùÃ÷:



rlpr ÀûÓÃ TCP/IP ½«ÁÐÓ¡¹¤×÷ËÍµ½ÍøÂ·ÉÏÈÎºÎÎ»ÖÃµÄ lpd ËÅ·þÆ÷.



Óë lpr ²»Í¬µÄÊÇ, ÄãÁÐÓ¡À´Ô´¶ËµÄ»úÆ÷ *²»ÐèÒª* Ã÷È·µØÖªµÀÔ¶¶ËµÄÓ¡±í»ú,
(ÀýÈçÍ¸¹ý {\itshape /etc/printcap\/}) Òò´ËÓÐÏàµ±´óµÄµ¯ÐÔ, 
¹ÜÀíµÄ¸ºµ£Ò²±È½ÏÇá.





rlpr ¿ÉÒÔÓÃÔÚÈÎºÎÊ¹ÓÃ´«Í³ lpr µÄµØ·½, ¶øÇÒºÍ´«Í³µÄ BSD lpr ÏàÈÝ.



rlpr ×î´óµÄºÃ´¦ÔÚì¶¿ÉÒÔ *´ÓÈÎºÎµØ·½ÁÐÓ¡µ½ÈÎºÎµØ·½* 
¶ø²»ÓÃ¹ÜÁÐÓ¡À´Ô´¶ËµÄÏµÍ³Éè¶¨. Ëü¿ÉÒÔÏñ´«Í³µÄ lpr ×öÎªÒ»¸ö filter,
¶øÈÃÔÚÔ¶¶Ë»úÆ÷ÉÏÖ´ÐÐµÄ¿Í»§¶ËÏñ netscape, xemacs 
µÈÄÜ¹»ÇáÒ×µØÁÐÓ¡±¨±íµ½Äã±¾µØµÄ»úÆ÷.



Äã¿ÉÒÔÔÚ {\ttfamily \nameurl{ftp://metalab.unc.edu/pub/Linux/system/printing/}{Metalab}} ÕÒµ½ rlpr.




\subsection{ÁÐÓ¡µ½ Win95, WinNT, LanManager, »ò Samba ÉÏµÄÓ¡±í»ú}

ÔÚ Printing to Windows mini-HOWTO ÖÐÓÐ±ÈÕâ¶ù¸ü¶àµÄ×ÊÑ¶.

Í¸¹ý {\ttfamily \onlynameurl{smbclient}}
Õâ¸ö³ÌÊ½ (samba Ì×¼þµÄÒ»²¿·Ý) ¿ÉÒÔ½« lpd ØùÁÐµ¼Ïòµ½¼Ü¹¹ÔÚ TCP/IP
Ö®ÉÏµÄ SMB ÁÐÓ¡·þÎñ. Samba °üº¬ÁËÒ»¸öÃüÁî¸å {\ttfamily smbprint} À´×öÕâ¼þÊÂ.
¼òµ¥µØËµ, ÌæÕâÑùµÄÓ¡±í»úÔÚÁÐÓ¡ÔÝ´æÆ÷¹¤×÷Ä¿Â¼ (spool directory) ÖÐ¼ÓÉÏÉè¶¨µµ,
È»áá½« {\itshape if\/} ÉèÎª {\ttfamily smbprint} ÃüÁî¸å.

ÔÚ {\itshape /etc/printcap\/} ÖÐµÄ¼ÇÂ¼¿´ÆðÀ´Ó¦¸ÃÏñÕâ¸öÑù×Ó:
\begin{tscreen}
\begin{verbatim}
lp|remote-smbprinter:\
    :lp=/dev/null:sh:\
    :sd=/var/spool/lpd/lp:\
    :if=/usr/local/sbin/smbprint:
\end{verbatim}
\end{tscreen}


ÄãÓ¦¸ÃÔÄ¶ÁÒ»ÏÂ {\ttfamily smbprint} ÃüÁî¸åÖÐµÄËµÃ÷ÒÔµÃµ½¸ü¶àÏà¹ØµÄÑ¶Ï¢.

ÄãÒ²¿ÉÒÔ²»¹Ü {\ttfamily lpd}, Ö±½ÓÓÃ {\ttfamily smbclient} ½«µµ°¸ËÍµ½ SMB 
ÁÐÓ¡·þÎñ. Çë²ÎÕÕÏßÉÏÊÖ¡õ.




\subsection{ÁÐÓ¡µ½ NetWare ÉÏµÄÓ¡±í»ú}

ncpfs Ì×¼þÖÐ°üº¬ÁËÒ»¸öÃûÎª {\ttfamily nprint} µÄ¹¤¾ß³ÌÊ½, ËüÌá¹©ÈçÍ¬ {\ttfamily smbprint}
Ò»°ãµÄ¹¦ÄÜ, Ö»²»¹ýÊÊÓÃµÄ¶ÔÏóÊÇ Netware. Äã¿ÉÒÔÔÚ \onlynameurl{Metalab} È¡µÃ ncpfs.
ÏÂÃæÊÇ´Ó 0.16 °æµÄ LSM ÖÐ½ÚÂ¼³öÀ´µÄ:
\begin{quotation}
With ncpfs you can mount volumes of your netware server under
Linux. You can also print to netware print queues and spool netware
print queues to the Linux printing system. You need kernel 1.2.x or
1.3.54 and above. ncpfs does NOT work with any 1.3.x kernel below
1.3.54.
ÀûÓÃ ncpfs, Äã¿ÉÒÔÔÚ Linux ÏÂ¹ÒÉÏÄãµÄ netware ËÅ·þÆ÷ÉÏµÄÄ¿Â¼.
ÄãÒ²¿ÉÒÔÁÐÓ¡µ½ netware µÄÁÐÓ¡ØùÁÐÒÔ¼°½« netware µÄÁÐÓ¡ØùÁÐÅÅ´æ(spool)
µ½ Linux µÄÁÐÓ¡ÏµÍ³. ÄãÐèÒª 1.2.x »ò 1.3.54 ÒÔÉÏ(º¬ 1.3.54) µÄºËÐÄ. ncpfs
ÎÞ·¨ÔÚ 1.3.54 ÒÔÇ°µÄÈÎºÎÒ»°æ 1.3.x ºËÐÄÏÂÔË×÷.

\end{quotation}




ÒªÊ¹ {\ttfamily nprint} Í¸¹ý lpd ÔË×÷, ÄãÒªÐ´¸öÐ¡Ð¡µÄ shell script ½« stdin
ÁÐÓ¡µ½ Netware ÉÏµÄÓ¡±í»ú, ²¢Éè³É lpd ÁÐÓ¡ØùÁÐµÄ {\itshape if\/}. Äã¿ÉÄÜ»áÓÐ:
\begin{tscreen}
\begin{verbatim}
sub2|remote-NWprinter:\
        :lp=/dev/null:sh:\
        :sd=/var/spool/lpd/sub2:\
        :if=/var/spool/lpd/nprint-script:
\end{verbatim}
\end{tscreen}

{\ttfamily nprint-script} ¿´ÆðÀ´¿ÉÄÜ´óÖÂÉÏÏñ:
\begin{tscreen}
\begin{verbatim}
#! /bin/sh
# You should try the guest account with no password first!
/usr/local/bin/nprint -S net -U name -P passwd -q printq-name -
\end{verbatim}
\end{tscreen}





\subsection{ÁÐÓ¡µ½ EtherTalk (Apple) ÉÏµÄÓ¡±í»ú}

netatalk Ì×¼þ°üº¬ÁËÏñ {\ttfamily nprint} ºÍ {\ttfamily smbclient} µÄ¶«Î÷. 
ÆäËûÈËÒÑ¾­Ð´ÏÂÁËÊ¹ÓÃ Apple ÍøÂ·ÁÐÓ¡µÄ³ÌÐò, Ô¶±ÈÎÒËùÄÜÐ´µÄºÃµÃ¶à; Çë²ÎÔÄ \nameurl{http://thehamptons.com/anders/netatalk/}{Linux Netatalk-HOWTO}.




\subsection{ÁÐÓ¡µ½ HP »òÆäËüµÄÒÔÌ«ÍøÂ·(ethernet) Ó¡±í»ú}

ÓÐÐ© HP ºÍÆäËü³§ÅÆµÄÓ¡±í»úÌá¹©ÁË¿ÉÒÔÖ±½ÓÓÃ lpd ÁÐÓ¡µÄÒÔÌ«ÍøÂ·½éÃæ.
ÄãÓ¦¸Ã×ñÕÕÓ¡±í»ú»òÆäÍøÂ·½éÃæËù¸½µÄÖ¸Ê¾, µ«ÊÇÍ¨³£ÕâÖÖÓ¡±í»úÉÏ "ÅÜ" µÄÊÇ lpd,
¶øÇÒÌá¹©Ò»µ½¶à¸öÄã¿ÉÒÔÊ¹ÓÃµÄØùÁÐ. ¾ÙÀýÀ´Ëµ, Ò»²¿ HP ¿ÉÄÜ¿ÉÒÔÓÃÕâÑùµÄ printcap:
\begin{tscreen}
\begin{verbatim}
lj-5|remote-hplj:\
        :lp=/dev/null:sh:\
        :sd=/var/spool/lpd/lj-5:\
        :rm=printer.name.com:rp=raw:
\end{verbatim}
\end{tscreen}


¾ßÓÐ Jet Direct ½éÃæµÄ HP Laserjet Ó¡±í»úÍ¨³£Ö§Ô®Á½¸öÄÚ½¨µÄ lpd ØùÁÐ - "raw"
½ÓÊÜ PCL (¿ÉÄÜÒ²½ÓÊÜ Postscript), ÒÔ¼° "text" ½ÓÊÜµ¥´¿µÄ ascii
(¶øÇÒ»á×Ô¶¯µØ¿Ë·þ½×ÌÝÐ§Ó¦). Èç¹ûÄãÓÐµÄÊÇ JetDirect Plus3 Èý²ºµÄ½éÃæ,
ØùÁÐµÄÃû³ÆÔòÎª "raw1", "text2" µÈµÈ.

×¢Òâ ISS ¹«Ë¾¼º¾­ÕÒµ½Ä³Ò»ÀàµÄ¹ýÁ¿¹¥»÷(denial of service attacks)
¿ÉÒÔµ¼ÖÂ HP Jetdirect ½çÃæµ±µô. ´ó²¿·ÝÊÇÔÚ 98 ÄêµÄÇïÌì¿ªÊ¼±»·¢ÏÖµÄ.

ÔÚÒ»¸ö´óÐÍµÄ»·¾³, ÌØ±ðÊÇ¸öÓÐÐ©Ó¡±í»ú²»Ö§Ô® PostScript µÄ´óÐÍ»·¾³ÖÐ,
¼ÜÉèÒ»²¿×¨ÃÅµÄÁÐÓ¡ËÅ·þÆ÷, ÈÃËùÓÐµÄ»úÆ÷¶¼ÁÐÓ¡µ½Õâ²¿ËÅ·þÆ÷²¢ÈÃËùÓÐµÄ ghostscript
¹¤×÷¶¼ÔÚÕâ²¿ËÅ·þÆ÷ÉÏÃæÖ´ÐÐ¿ÉÄÜ»áÓÐÓÃ.

ÕâÑù×ÓÒ²¿ÉÒÔÈÃÄãµÄ Linux ×öÎªÓ¡±í»úµÄÅÅ´æËÅ·þÆ÷(spool server),
Èç´ËÒ»À´ÄãµÄÍøÂ·Ê¹ÓÃÕß±ã¿ÉÒÔ¿ìÒ»µãÍê³ÉËûÃÇµÄÁÐÓ¡¹¤×÷È»áá¼ÌÐøÊÖ±ßµÄÊÂÇé,
¶ø²»±ØµÈ´ýÓ¡±í»úÓ¡ÍêÏÈÇ°±ðÈËËùËÍ³öµÄ±¨±í. Èç¹ûÄãÓÐÎÞ·¨µ÷ÕûµÄ¾ÉÐÍ HP Laserjets;
Ò²¿ÉÒÔÕâÑù×öÒÔ½µµÍÓ¡±í»úÛÕÈûµÄ»úÂÊ.

ÒªÕâÑù×ö, ÏÈÔÚÄãµÄ linux »úÆ÷ÉÏÉè¶¨Ò»¸öÁÐÓ¡ØùÁÐÖ¸µ½ÅäÓÐÒÔÌ«ÍøÂ·½éÃæ HP LJ
(ÈçÇ°ËùÊö). ÏÖÔÚ½«ËùÓÐÔÚÄãÇøÓòÍøÂ·ÉÏµÄ¿Í»§¶ËÉè¶¨Ö¸µ½Õâ¸ö Linux ØùÁÐ
(ÈçÇ°Ãæ¡õÀýÖÐµÄ lj-5).

ÓÐÐ© HP ÍøÂ·Ó¡±í»úËÆºõ²»Àí»á¿Í»§¶ËËÍ³öµÄ±êÌâÒ³(banner page) Éè¶¨. 
Äã¿ÉÒÔ¹ØµôËüÃÇÄÚ²¿×ÔÐÐ²úÉúµÄ±êÌâÒ³, ÓÃ telnet Á¬½Óµ½Ó¡±í»ú, °´Á½ÏÂ return ¼ü,
´òÈë "banner: 0", ½ÓÖø´òÈë "quit". »¹ÓÐÆäËü¿ÉÒÔµ÷ÕûµÄÉè¶¨Ò²ÊÇÓÃÕâ¸ö·½Ê½; ´òÈë
"?" ¿ÉÒÔ¿´µ½ËüÃÇµÄ±íÁÐ.

Äã¿ÉÒÔÓÃ HP µÄ \nameurl{http://www.hp.com/go/webjetadmin}{WebJet}
ÈíÌåÀ´¿ØÖÆÈ«²¿µÄÉè¶¨. ÕâÌ×ÈíÌåÊÇÒÔ daemon µÄ·½Ê½Ö´ÐÐ, ½ÓÊÜÔÚÖ¸¶¨²ººÅÉÏµÄ http
Á¬ÏßÐèÇó(http request). ËüÌá¹© http ±í¸ñ(form) ¼° Java applets
À´¿ØÖÆÍøÂ·ÉÏµÄ HP Ó¡±í»ú. ÀíÂÛÉÏ, ËüÒ²¿ÉÒÔ¿ØÖÆ Unix µÄÓ¡±í»úØùÁÐ,
µ«ÊÇÕâµÃÊ¹ÓÃ¼«²»°²È«µÄµÄ rexec ·þÎñ. ÎÒ²»½¨ÒéÊ¹ÓÃÕâ¸ö¹¦ÄÜ.




\subsubsection{ÁÐÓ¡µ½±È½Ï¾ÉµÄ HP Ó¡±í»ú}

ÓÐÐ©Ó¡±í»ú (»òÊÇ½«Ó¡±í»úÁ¬ÉÏÍøÂ·µÄ×°ÖÃ) Ö»Ö§Ô®ºÜÑô´ºµÄ TCP Á¬Ïß.
ÔÚÕâÒ»ÀàÖÐ½ÏÖøÃûµÄ±ãÊÇÔçÆÚµÄ JetDirect (°üÀ¨Ò»Ð© JetDirectEx) ½éÃæ¿¨. »ù±¾ÉÏ, 
ÒªÁÐÓ¡µ½ÕâÀàµÄÓ¡±í»ú, Äã±ØÐë½¨Á¢µ½Ó¡±í»úÉÏÄ³¸öÌØ¶¨²º (µäÐÍÊÇÔÚ 9100, 
»òÊÇÈý²º»úÖÖµÄ 9100, 9101 ºÍ 9102) µÄ TCP Á¬½Ó, È»áá½«ÄãµÄ±¨±íËÍ½øÈ¥. 
LPRng (Èç¹ûÄãÕýÔÚ¶ÁÕâÒ»¶Î, ÄãÕæµÄ¸Ã¸ÄÓÃËü) ÄÚ½¨Ö§Ô®½«ÁÐÓ¡¹¤×÷ËÍµ½ÈÎÒâµÄ
TCP ²º, µ«ÊÇ BSD µÄ lpd ¾Í²»ÊÇÕâ÷á¼òµ¥ÁË. ÎÒÃÇ¿ÉÒÔÓÃ Perl
À´Êµ×ö, »òÊÇÓÃÆäËüµÄ·½Ê½:

\begin{tscreen}
\begin{verbatim}
#!/usr/bin/perl
# Thanks to Dan McLaughlin for writing the original version of this
# script (And to Jim W. Jones for sitting next to Dan when writing me
# for help ;)

$fileName = @ARGV[0];

open(IN,"$fileName") || die "Can't open file $fileName";

$dpi300     = "\x1B*t300R";
$dosCr      = "\x1B&k3G";
$ends = "\x0A";

$port =  9100 unless $port;
$them = "bach.sr.hp.com" unless $them;

$AF_INET = 2;
$SOCK_STREAM = 1;
$SIG{'INT'} = 'dokill';
$sockaddr = 'S n a4 x8';

chop($hostname = `hostname`);
($name,$aliases,$proto) = getprotobyname('tcp');
($name,$aliases,$port) = getservbyname($port,'tcp')
    unless $port =~ /^\d+$/;;
($name,$aliases,$type,$len,$thisaddr) =
        gethostbyname($hostname);
($name,$aliases,$type,$len,$thataddr) = gethostbyname($them);
$this = pack($sockaddr, $AF_INET, 0, $thisaddr);
$that = pack($sockaddr, $AF_INET, $port, $thataddr);

if (socket(S, $AF_INET, $SOCK_STREAM, $proto)) {
#    print "socket ok\n";
}
else {
    die $!;
}
# Give the socket an address.
if (bind(S, $this)) {
#    print "bind ok\n";
}
else {
    die $!;
}

# Call up the server.

if (connect(S,$that)) {
#    print "connect ok\n";
}
else {
    die $!;
}

# Set socket to be command buffered.

select(S); $| = 1; select(STDOUT);

#    print S "@PJL ECHO Hi $hostname! $ends";
#    print S "@PJL OPMSG DISPLAY=\"Job $whoami\" $ends";
#    print S $dpi300;

# Avoid deadlock by forking.

if($child = fork) {
    print S $dosCr;
    print S $TimesNewR;

    while (<IN>) {
        print S;
    }
    sleep 3;
    do dokill();
} else {
    while(<S>) {
        print;
    }
}

sub dokill {
    kill 9,$child if $child;
}
\end{verbatim}
\end{tscreen}





\subsection{ÌæÔ¶¶ËÓ¡±í»úÖ´ÐÐ {\itshape if\/}}

lpd Ò»¸ö²»Ñ°³£µÄµØ·½ÔÚì¶Èç¹ûÊÇÔ¶¶ËÓ¡±í»ú, {\itshape if\/} ²»»á±»Ö´ÐÐ. 
Èç¹ûÄã·¢ÏÖÄãÐèÒªÖ´ÐÐ {\itshape if\/}, Äã¿ÉÒÔÉè¶¨Ë«ÖØØùÁÐ(double queue) ²¢ÖØÐÂØùÁÐ±¨±í.
¾Ù¸öÀý×Ó, ¿´Ò»ÏÂÕâ¸ö {\itshape printcap\/}:
\begin{tscreen}
\begin{verbatim}
lj-5:\
        :lp=/dev/null:sh:\
        :sd=/var/spool/lpd/lj-5:\
        :if=/usr/lib/lpd/filter-lj-5:
lj-5-remote:lp=/dev/null:sh:rm=printer.name.com:\
        :rp=raw:sd=/var/spool/lpd/lj-5-raw:
\end{verbatim}
\end{tscreen}

ºÍÏà¹ØµÄ {\ttfamily filter-lj-5} ÃüÁî¸å(script):
\begin{tscreen}
\begin{verbatim}
#!/bin/sh
gs <options> -q -dSAFER -sOutputFile=- - | \
        lpr -Plj-5-remote -U$5
\end{verbatim}
\end{tscreen}


Ö»ÓÐÔÚ lpr ÒÔ¼à¿Ø³ÌÊ½(daemon) Ä£Ê½Ö´ÐÐµÄÊ±ºò, {\itshape -U\/} Ñ¡Ïî²ÅÓÐ×÷ÓÃ,
Õâ¸öÑ¡Ïî»áÕýÈ·µØÉè¶¨µÚ¶þÖØØùÁÐÖÐµÄËÍ¼þÈËÐÕÃû. 
Äã¿ÉÄÜÓ¦¸ÃÓÃ¸ü¿É¿¿µÄ·½·¨È¡µÃËÍ¼þÈËÐÕÃû, ÒòÎªÓÐÐ©Ê±ºòËü²¢²»ÊÇµÚÎå¸ö²ÎÊý.
Çë²ÎÕÕ {\itshape \onlynameurl{printcap}\/}
µÄÏßÉÏÊÖ¡õ.




\subsection{´Ó Windows ÁÐÓ¡}

ÀûÓÃ SAMBA Ì×¼þ¿ÉÒÔÖ±½ÓÖ§Ô®ÒÔ SMB Ð­¶¨´Ó Windows (»òÐí OS/2) ¿Í»§¶ËÁÐÓ¡µ½ Linux
ËÅ·þÆ÷, Õâ¸öÌ×¼þÍ¬Ê±Ò²Ö§Ô®½«ÄãµÄ Linux µµ°¸ÏµÍ³·ÖÏí¸ø Windows ¿Í»§¶Ë.

Samba °üº¬ÁËÏàµ±ÍêÕûµÄÎÄ¼þ, Ò²ÓÐÒ»·ÝºÜ²»´íµÄ Samba FAQ º­¸Çµ½Õâ·½ÃæµÄÄÚÈÝ.
Äã¿ÉÒÔÔÚ Linux ÉÏÉèÖÃ magic filter È»ááÒÔ PostScript ÁÐÓ¡, »òÊÇÔÚÃ¿Ò»²¿ Windows
»úÆ÷ÉÏ°²×°Ó¡±í»ú×¨ÓÃµÄÇý¶¯³ÌÊ½È»ááÎªËûÃÇÉè¶¨Ò»¸ö²»ÓÃÈÎºÎ filter µÄØùÁÐ. Ê¹ÓÃ
Windows Çý¶¯³ÌÊ½ÓÐÐ©Ê±ºò»áÓÐ±È½ÏºÃµÄÊä³ö, µ«ÊÇÈç¹ûÓÐºÜ¶à²¿ Windows »úÆ÷,
¹ÜÀíÕß¾Í±È½ÏÂé·³. ËùÒÔÏÈÊÔÊÔ¿´ PostScript °É!




\subsection{´Ó Apple ÁÐÓ¡}

Netatalk Ö§Ô®ÓÉ Apple ¿Í»§¶ËÍ¸¹ý EtherTalk ÁÐÓ¡. Çë²ÎÕÕ
\nameurl{http://thehamptons.com/anders/netatalk/}{Netatalk HOWTO Page}
ÒÔÈ¡µÃ¸ü½øÒ»²½µÄ×ÊÑ¶.




\subsection{´Ó Netware ÁÐÓ¡}

ncpfs Ì×¼þº¬ÓÐÒ»¸ö½Ð×÷ pserver µÄ¼à¿Ø³ÌÊ½(daemon) ¿ÉÒÔÌá¹©·þÎñ¸ø NetWare
µÄÁÐÓ¡ØùÁÐ. ¾ÝÎÒËùÁË½â, Õâ¸öÏµÍ³±ØÐë´îÅä Bindery-based µÄ NetWare, ÏñÊÇ
2.x, 3.x, »òÊÇÊ¹ÓÃ bindery ´æÈ¡µÄ 4.x °æ±¾.

ÒªÈ¡µÃ¸ü½øÒ»²½¹Øì¶ ncpfs ºÍÆä pserver ³ÌÊ½µÄ×ÊÑ¶, Çë²ÎÕÕ
\nameurl{ftp://ftp.gwdg.de/pub/linux/misc/ncpfs/}{ncpfs µÄ FTP Õ¾}.




\section{Windows ×¨ÓÃÓ¡±í»ú}

ÈçÍ¬ÉÔÔçÖ®Ç°ÎÒËùÌÖÂÛµÄ, ÓÐÐ©Ó¡±í»úÔ­±¾¾Í²»±»Ö§Ô®,
ÒòÎªËüÃÇ²¢·ÇÊ¹ÓÃÒ»°ãµÄÓ¡±í»úÓïÑÔ, ¶øÊÇÀûÓÃµçÄÔµÄ CPU À´Ãè»æ³öÎ»Ôª×éÁÐ(bitmap),
È»ááÔÙÒÔ¹Ì¶¨µÄËÙÂÊ½«Ö®µ¼µ½(pipe to) Ó¡±í»ú.
ÉÙÊýÕâÀàµÄÓ¡±í»úÒ²Ê¹ÓÃÆÕÍ¨µÄÓ¡±í»úÓïÑÔ, ÏñPCL, µ«ÊÇÍ¨³£¶¼Ã»ÓÐ. ÓÐÐ©
(·Ç³£µÍ½×µÄ) Ó¡±í»úÉõÖÁ²¢·ÇÊ¹ÓÃÆ½ÐÐ²ºÁ¬½Ó,
¶øÊÇ¿¿³§ÉÌµÄÇý¶¯³ÌÊ½À´Ä£ÄâÓ²ÌåµÄÐÐÎª (×îÖØÒªµÄÁ÷Á¿¿ØÖÆ(flow control)).



¼ÙÈçÄã·¢ÏÖÄãÏÝÔÚÕâÖÖ¶ñÁÓµÄÇé¿ö, ÎÞÂÛÈçºÎ, ×Ü»¹ÓÐÒ»Ð©¿ÉÄÜµÄ½â¾öÖ®µÀ.




\subsection{Ghostscript Windows µ¼ÏòÆ÷(redirector)}

ÏÖÔÚÓÐÒ»¸ö Windows µÄÓ¡±í»úÇý¶¯³ÌÊ½¿ÉÒÔÓÃ (½Ð×ö mswinpr2),
Ëü¿ÉÒÔÔÚÁÐÓ¡³ö±¨±íÖ®Ç°ÏÈ½«ÆäËÍµ½ Ghostscript ´¦Àí. (ÓÐµãÏñÔÚ Unix LPD ÖÐµÄ if
filter). Ò²ÓÐÒ»¸öÐÂµÄ Ghostscript Çý¶¯³ÌÊ½¿ÉÒÔÓÃ Windows GDI ºô½ÐÀ´ÁÐÓ¡.
°ÑËüÃÇ¶µÔÚÒ»¿é¶ù, ÕâÑùÓ¦¸Ã¿ÉÒÔÈÃ Windows »úÆ÷ÓÃ³§ÉÌµÄÇý¶¯³ÌÊ½ÁÐÓ¡ PostScript
µ½Ò»²¿ Windows ×¨ÓÃµÄÓ¡±í»ú.

Èç¹ûÄã³É¹¦ÁË, Äã¿ÉÒÔÒÀÕÕÇ°ÃæÈÃ Linux Í¸¹ýÍøÂ·ÁÐÓ¡µ½ Windows Ó¡±í»úµÄËµÃ÷,
ÈÃ Unix (ÒÔ¼°ÆäËüµÄ Windows, Mac µÈ) Ö÷»úÁÐÓ¡µ½ÄãµÄÓ¡±í»ú.

»°ËäÈç´Ë, ÎÒ´ÓÀ´Ã»ÊÔ¹ý, ÒòÎªÎÒÃ»ÓÐ Windows ×¨ÓÃµÄÓ¡±í»ú, ËùÒÔÄãµÄÆÀ¼Û¿ÉÄÜ²»Í¬.
ËùÓÐÕâ¶ùËùÇ£Éæµ½µÄÈíÌåÓ¦¸Ã¶¼¿ÉÒÔ´Ó Ghostscript µÄÊ×Ò³ (Çë¿´Õâ·ÝÎÄ¼þÔÚ
Ghostscript Ò»½ÚÖÐµÄÁ¬½á) ÕÒµ½.




\subsection{pbm2ppa ³ÌÊ½}

ÓÐÐ© HP µÄÓ¡±í»úÊ¹ÓÃ "Printing Performance Architecture" ("ÎÒÃÇÌ«±ãÒËÁË,
ËùÒÔÃ»ÓÐ PCL" µÄÐÐÏúÊõÓï). ÒªÖ§Ô®ÕâÖÖÓ¡±í»ú, ¿ÉÒÔÍ¸¹ýÊ¹ÓÃ Tim Norman ËùÐ´µÄ
pbm2ppa ·­ÒëÆ÷(translator) µÄÕâÖÖÓØ»ØµÄ·½Ê½. »ù±¾ÉÏ, ÄãÊ¹ÓÃ ghostscript ½«
PostScript Ãè»æ³É pbm ¸ñÊ½µÄÎ»Ôª×éÁÐÍ¼°¸(bitmapped image), È»ááÓÃ pbm2ppa
½«Æä·­Òë³É¿ÉÒÔÖ±½ÓÇãÓ¡(dump) µÄÓ¡±í»ú×¨ÊôµÄ ppa ¸ñÊ½µÄÎ»Ôª×éÁÐ(bitmap).
Õâ¸ö³ÌÊ½ÏÖÔÚ¿ÉÄÜÒ²ÒÔ ghostscript Çý¶¯³ÌÊ½µÄÐÍÊ½³öÏÖ.



ppa ÈíÌå¿ÉÒÔÓÉ \nameurl{http://www.rpi.edu/~normat/technical/ppa/}{ppa µÄÊ×Ò³} È¡µÃ. pbm2ppa Ö§Ô® HP 720,
820, ºÍ 1000 µÄÒ»Ð©»úÖÖ; ÇëÔÄ¶ÁÌ×¼þÖÐËù¸½µÄÎÄ¼þÒÔÈ¡µÃÓÐ¹Ø ppa 
Ó¡±í»úÖ§Ô®µÄ¸ü½øÒ»²½×ÊÑ¶.




\subsection{pbm2l7k ³ÌÊ½}

´ó²¿·Ý±ãÒËµÄ Lexmark ÅçÄ«Ó¡±í»úÊ¹ÓÃÒ»ÖÖ×¨ÓÃµÄÓïÑÔ¶ø³ÉÁË Windows ×¨ÓÃµÄÓ¡±í»ú.
»¹ºÃ, Henryk Paluch Ð´ÁËÒ»¸ö³ÌÊ½¿ÉÒÔÔÚ Lexmark 7000 ÉÏ×öºÚ°×ÁÐÓ¡.
ËûÓÐ¿ÉÄÜÄÜ¹»ÕÒ³ö²ÊÉ«ÁÐÓ¡µÄ·½·¨²¢ÇÒÖ§Ô®ÆäËüµÄ Lexmark ÅçÄ«Ó¡±í»ú.
Çë²ÎÕÕ \nameurl{http://bimbo.fjfi.cvut.cz/~paluch/l7kdriver/}{Õâ¸öÍøÕ¾}ÒÔÈ¡µÃ¸ü¶à×ÊÑ¶.




\section{ÈçºÎÁÐÓ¡µ½´«Õæ»ú}


\subsection{Ê¹ÓÃ´«ÕæÊý¾Ý»ú(faxmodem)}

ÍâÃæÓÐºÜ¶àµÄ´«Õæ³ÌÊ½¿ÉÒÔÈÃÄã´«Õæ¼°½ÓÊÕÎÄ¼þ. ×î¸´ÔÓµÄÆäÖÐÒ»¸ö¾ÍÊÇ Sam Leffler
µÄ {\itshape HylaFax\/}, ¿ÉÒÔÔÚ {\ttfamily ftp.sgi.com} È¡µÃ. ËüÓÐ¸÷Ê½¸÷ÑùµÄ¹¦ÄÜ,
´ÓÊ¹ÓÃ¶à²¿Êý¾Ý»úµ½¹ã²¥´«ËÍ(broadcasting).

SuSE ³öÁËÒ»¸ö Java °æµÄ HylaFax ¿Í»§¶ËÓ¦¸Ã¿ÉÒÔÔÚÈÎºÎµÄ Java Æ½Ì¨ÉÏÔË×÷ (°üÀ¨
Windows ºÍ Linux). ´ó²¿·ÝµÄÆ½Ì¨ÉÏÒ²ÓÐ·Ç Java °æµÄ´«Õæ¿Í»§¶Ë; Linux
¼¸ºõ¿ÉÒÔÍêÈ«µØ´¦ÀíÄãµÄÍøÂ·´«ÕæµÄÐèÒª.

¶Ô´ó²¿·ÝµÄ Linux »úÆ÷¶øÑÔ, »¹ÓÐÒ»¸ö½ÏºÃµÄÑ¡Ôñ, ¾ÍÊÇ {\ttfamily \onlynameurl{efax}},
Ò»¸öËÍ´«ÕæµÄ¼òµ¥³ÌÊ½. ¶ø getty µÄ³ÌÊ½ {\ttfamily mgetty} Ôò¿ÉÒÔ½ÓÊÕ´«Õæ
(ÔÚÓÐÐ©Êý¾Ý»úÉÏÉõÖÁ¿ÉÒÔ½ÓÊÕÓïÒôÓÊ¼þ!).




\subsection{Ê¹ÓÃÔ¶¶ËÁÐÓ¡·þÎñ}

ÓÐÈËÌá¹©Ò»ÖÖÊµÑéÐÔµÄ·þÎñ, ÈÃÄã¿ÉÒÔÓÃµç×ÓÓÊ¼þËÍ³öÄãÏëÒªÁÐÓ¡µÄÄÚÈÝ,
È»áá´Ó±ð´¦µÄ´«Õæ»úÁÐÓ¡³öÀ´. Õâ¸ö·þÎñÖ§Ô®Ò»Ð©²»´íµÄ¸ñÊ½, ÏñÊÇ PostScript,
ËäÈ»º­¸ÇµÄÇøÓò²»¹»¹ã·º, ÈÔ²»Ê§ÎªÒ»¸öºÜÓÐÓÃµÄ·þÎñ.
ÏëÒªÖªµÀ¸ü¶àÓÐ¹Øì¶Ê¹ÓÃÔ¶¶ËÁÐÓ¡·þÎñµÄÑ¶Ï¢, Çë²ÎÕÕ \nameurl{http://www.tpc.int/}{Remote Printing WWW Site}.




\section{ÈçºÎ²úÉúÖµµÃÁÐÓ¡µÄ¶«Î÷}

ÎÒÃÇ¿ÉÒÔÊ¹ÓÃµÄÈíÌåÕæÊÇÓÖ¶àÓÖÔÓ. »ù±¾ÉÏ, Linux ¿ÉÒÔÖ´ÐÐºÜ¶àÖÖµÄ¶þ½øÎ»µµ,
ÏàÈÝ(Ö´ÐÐ³É¹¦) µÄ³Ì¶È¸÷ÓÐ²»Í¬: Linux/x86, Linux/Alpha, Linux/Sparc, Linux/foo,
iBCS, Win16/Win32s (ÀûÓÃ dosemu, »òÐí½«À´ÓÃ Wine), Mac/68k (ÓÃ Executor),
ºÍ Java. ÎÒ½«Ö»ÌÖÂÛÔ­ÉúµÄ(native) Linux ºÍ³£¼ûµÄ Unix ÈíÌå.

¾Í Linux ×ÔÉí¶øÑÔ, Ñ¡Ôñ¼¸ºõ½öÏÞì¶ÄÇÐ© Unix Ò»°ãËùÄÜÈ¡µÃµÄ:




\subsection{±êÊ¾ÓïÑÔ(Markup languages)}

´ó²¿·ÝµÄ±êÊ¾ÓïÑÔ(markup languages) ±È½ÏÊÊºÏ´óÐÍµÄ»òÊÇÖØ¸²ÐÔµÄ¼Æ»­,
Äã¿ÉÒÔÓÃµçÄÔÀ´¿ØÖÆÎÄ×ÖµÄ°æÃæÉè¼ÆÒÔÈ¡µÃÒ»ÖÂÐÔ.

\begin{description}
\item[{\ttfamily nroff}] \mbox{}

ÕâÊÇ Unix ×îÔçµÄ±êÊ¾ÓïÑÔÖ®Ò». ×î³£¼ûµÄ¡õÀý - ÏßÉÏÊÖ²á(man
pages) - ±ãÊÇÓÃ *roff ¾Þ¼¯±àÅÅ¶ø³ÉµÄ; Ðí¶àÈËÐÅÀµ nroff,
µ«ÊÇËüµÄÓï·¨±ÈËùÐèÒªÓÃµ½µÄ¸ü¼èÉ¬ÄÑ¶®(ÖÁÉÙ¶ÔÎÒ¶øÑÔ), ¶ÔÐÂµÄ¹¤×÷¶øÑÔ,
Ëü¿ÉÄÜ²¢²»ÊÇ¸öºÃÑ¡Ôñ. »°ËäÈç´Ë, ÖªµÀÄã¿ÉÒÔÓÃ groff ½«ÏßÉÏÊÖ²áÖ±½ÓÅÅ°æ³É
PostScript »¹ÊÇÖµµÃµÄ. ÓÃ {\ttfamily man -t foo $|$ lpr}, ´ó²¿·ÝµÄ man
Ö¸Áî»áÌæÄã×öÕâ¼þÊÂ.



\item[TeX] \mbox{}

TeX, ºÍ¾Þ¼¯Ì×¼þ LaTeX, ÊÇ Unix ÉÏ×î±»¹ã·ºÊ¹ÓÃµÄ±êÊ¾ÓïÑÔÖ®Ò».
¼¼ÊõÐÔµÄ¹¤×÷Í¨³£ÓÃ LaTeX À´×«Ð´ÒòÎªËüÄÜ´ó·ùµØ¼ò»¯¸ñÊ½±àÅÅµÄÎÊÌâ,
¶øÇÒÈÔÈ»ÊÇÉÙÊýÄÜÍêÕû²¢Á¼ºÃµØÖ§Ô®ÊýÑ§·ûºÅµÄÎÄ×Ö´¦ÀíÆ÷Ö®Ò». TeX µÄÊä³ö¸ñÊ½Îª
{\ttfamily dvi}, ¿ÉÒÔÓÃ {\ttfamily dvips} »ò {\ttfamily dvilj} ½«Æä×ª»»Îª PostScript »òÊÇ
Hewlett Packard µÄ PCL. Èç¹ûÄãÒª°²×° TeX »ò LaTeX, °²×°Õû×é teTeX Ì×¼þ;
Ëü°üº¬ÁËËùÐèµÄÒ»ÇÐ.



\item[SGML] \mbox{}

Unix ºÍ Linux ÖÁÉÙÓÐÒ»¸öÃâ·ÑµÄ sgml Óï·¨½âÎö³ÌÊ½(parser) ¿ÉÓÃ;
ËüÊÇ Linuxdoc-SGML ²úÉúµÄÎÄ¼þÏµÍ³µÄ»ù´¡. ËüÒ²¿ÉÒÔÖ§Ô®ÆäËüµÄ DTD(ÎÄ¼þÐÍÌ¬¶¨Òå).



\item[HTML] \mbox{}

ÓÐÈË½¨ÒéËµ¶Ôì¶±È½Ï¼òµ¥µÄ¼Æ»­, ÓÃ HTML ×«Ð´, È»ááÓÃ Netscape
ÁÐÓ¡¿ÉÄÜ¾Í×ã¹»ÁË. ÎÒ²¢²»ÔÞ³É, µ«ÊÇÄã¿ÉÄÜÓÐ²»Í¬µÄÆÀ¼Û.

\end{description}





\subsection{Ëù¼û¼´ËùµÃ(WYSIWYG) µÄÎÄÊé´¦ÀíÆ÷}

Ëù¼û¼´ËùµÃµÄÎÄÊé´¦ÀíÆ÷ÔÙÒ²²»ÅÂÃ»ÓÐÁË. ÓÐºÃ¼¸Ì×°ì¹«ÊÒÌ××°ÈíÌå(office suite),
ÆäÖÐ»¹ÓÐÒ»Ì× (StarOffice) ¿ÉÒÔÈÃ¸öÈËÃâ·ÑÊ¹ÓÃ.
\begin{description}
\item[StarOffice] \mbox{}

Ò»¼ÒµÂ¹ú¹«Ë¾ÔÚÍøÂ·ÉÏÃâ·ÑÉ¢²¼ Linux °æ±¾µÄ StarOffice.
Õâ¸öÈ«¹¦ÄÜµÄ°ì¹«ÊÒÌ××°ÈíÌåÓÐÖøËùÓÐÄãÏëÒªµÄ¹¦ÄÜ, ¶øÇÒÄãÎÞ·¨¿¹¾ÜËüµÄ¼Û¸ñ.
ÓÐÒ»·Ý mini-HOWTO ËµÃ÷ÈçºÎÈ¡µÃ²¢°²×°Ëü. Ëü²úÉú PostScript ºÍ PCL,
ËùÒÔÓ¦¸Ã¿ÉÒÔºÍ´ó²¿·ÝÄÜÔÚ Linux ÉÏÊ¹ÓÃµÄÓ¡±í»úÒ»ÆðÊ¹ÓÃ.
ºÜÃ÷ÏÔµÄ, ËüÊÇÒ»Ì× Office µÄ·ÂÖÆÆ·, ¶øÇÒÏàµ±µÄÅÓ´óÓ·Ö×.



\item[WordPerfect] \mbox{}

Corel Ãâ·Ñ·¢ÐÐÁËÒ»Ì× Linux °æ±¾ÉÏµÄ Word Perfect 8 ¼òÒ×°æ,
¶øÇÒ¼º¾­°µÊ¾Ò»µ©ÒÆÖ²µÄ¹¤×÷Íê³É, ËûÃÇÒ²»á·¢ÐÐ Corel Draw ºÍ Quattro Pro.
Èç¹ûÄãÓÐÒ»²¿Ê¹ÓÃ ARM ´¦ÀíÆ÷µÄ»úÆ÷, Õâ¿ÉÄÜÊÇÄã×îºÃµÄÑ¡Ôñ; Corel 
¿ª·¢³ö¼¸¿îÊ¹ÓÃ ARM ´¦ÀíÆ÷µÄ Netwinder Linux Ö÷»ú, ¶øÇÒ¿ÉÒÔËµÊÇÒ»¶¨»áÌá¹©
ARM Linux °æ±¾µÄËùÓÐ¶«¶«. ÄãÒ²¿ÉÒÔÑ¡Ôñ¹ºÂòÈ«¹¦ÄÜµÄ°æ±¾¼°Ö§Ô®·þÎñ,
Á½ÕßÒ»Æð»òÊÇ·Ö±ð¹ºÂò. \nameurl{http://www.channel1.com/users/rodsmith/wpfonts.html}{Linux    WordPerfect ×ÖÐÍÓëÓ¡±í»ú}Ê×Ò³ÓÐ¹Øì¶Éè¶¨ WordPerfect Ê¹ÓÃ Ghostscript
»òÊÇÄÚ½¨µÄÓ¡±í»úÇý¶¯³ÌÊ½µÄ×ÊÁÏ.
(ÄÚ½¨µÄÓ¡±í»úÇý¶¯³ÌÊ½ºÜÃ÷ÏÔµØºÍ DOS °æ WordPerfect µÄÇý¶¯³ÌÊ½Ò»Ä£Ò»Ñù,
ÍòÒ»ÄãµÄÓ¡±í»úµÄÇý¶¯³ÌÊ½²»ÔÚ WP8 µÄ·¢ÐÐÌ×¼þÖÐµÄ»°, ¿ÉÒÔÊÔÊÔ.)



\item[Applix] \mbox{}

Applix ÊÇÓÉ Applix ¹«Ë¾ÏúÊÛµÄÒ»¸ö¿çÆ½Ì¨(Èç¸÷ÖÖ²»Í¬°æ±¾µÄ Unices, Windows
ºÍÆäËü)µÄ°ì¹«ÊÒÌ××°ÈíÌå. Red Hat ºÍ SuSE ÔÚËüÊÇÎ¨Ò»Ñ¡ÔñµÄÊ±ºòÔø¾­ÏúÊÛ¹ý;
ÏÖÔÚÔò½«ÏúÊÛÈ¨½»»¹¸ø Applix.



\item[LyX] \mbox{}

LyX ÊÇ¸öÖµµÃÆÚ´ýµÄ LaTeX Ç°¶Ë. Çë¿´ \nameurl{http://www.lyx.org/}{LyX Ê×Ò³}
ÒÔÈ¡µÃ¸ü½øÒ»²½µÄÑ¶Ï¢. ÓÐÒ»¸ö´îÅä KDE µÄ LyX °æ±¾, ½Ð×ö Klyx; LyX µÄ×÷ÕßºÍÕûºÏ
KDE µÄÈËÊÇÍ¬Ò»¸ö.



\item[Maxwell] \mbox{}

Maxwell ÊÇ¸ö¼òµ¥µÄÊ¹ÓÃ MS RTF ¸ñÊ½µÄÎÄÊé´¦ÀíÆ÷,
Ò»¿ªÊ¼ÊÇ¸öÉÌÒµ²úÆ·, µ«ÏÖÔÚÔòÊÇ²ÉÓÃ GPL °æÈ¨·¢ÐÐ.



\item[The Andrew User Interface System] \mbox{}

AUIS °üÀ¨ÁË {\ttfamily ez}, Ò»¸öËù¼û¼´ËùµÃ·ç¸ñµÄ±à¼­Æ÷,
ËüÓÐÖø´ó²¿·Ý»ù±¾µÄÎÄÊé´¦Àí¹¦ÄÜ, HTML µÄÄÜÁ¦, ÒÔ¼°ÍêÈ«µØÖ§Ô® MIME
¸ñÊ½µÄµç×ÓÓÊ¼þºÍÐÂÎÅÈº×é. ²»ÐÒµÄÊÇ, Ã»ÈËÔÙ¼ÌÐøÎ¬»¤ AUIS.



\item[Koffice] \mbox{}

KDE ¼Æ»­ÕýÔÚ³¯ÏòÈ«Ì×µÄ°ì¹«ÊÒÌ××°ÈíÌåÅ¬Á¦. ÎÒ²»ÈÏÎªËüÒÑ¾­×¼±¸ºÃÈÃ´óÖÚÀ´Ê¹ÓÃ.
ËüµÄÎÄÊé´¦ÀíÆ÷ºÜÃ÷ÏÔµÄÊÇ LyX µÄáá´ú.



\item[GNOME] \mbox{}

GNOME ¼Æ»­Ò²ÕýÔÚÅ¬Á¦¿ª·¢Ðí¶à²»Í¬µÄ GNU ÊÚÈ¨µÄ°ì¹«ÊÒ¹¤¾ß. µ«ÊÇ»¹Ã»Ò»¸ö¿ÉÓÃ.





Jeff Phillips {\ttfamily $<$jeff@I\_RATUS.org{$>$}} Ê¹ÓÃ Caldera µÄ Linux °æ±¾µÄ
WordPerfect 7(ÔÚ Slackware ÉÏ, ÔÚËùÓÐµÄÑ¡ÔñÖ®ÖÐ), ËµÒ»ÇÐÔË×÷Õý³£.
ËüËÆºõ°üº¬ÁËÄÚ½¨µÄÓ¡±í»úÖ§Ô®, ÈçÍ¬Ò»¸öÈËËù»áÏëÒªµÄ. Caldera Ó¦¸Ã»áÔÚ \nameurl{http://www.caldera.com/}{} ÉÏÌá¹©Ò»Ð©×ÊÑ¶. ÄãÒ²¿ÉÒÔÖ±½ÓÏò Corel ËùÑ¡ÔñµÄ
Unix ÒÆÖ²¹«Ë¾¹ºÂò½ÏÐÂ°æµÄ WordPerfect.



ÆäËüµÄ³§ÉÌÇë±ð¿ÍÆøµØ¸æËßÎÒÄãËùÌá¹©µÄ²úÆ·.



\end{description}





\section{ÔÚÓ©Ä»ÉÏÔ¤ÀÀ¿ÉÁÐÓ¡µÄ¶«Î÷}

¼¸ºõÈÎºÎÄãÄÜÁÐÓ¡µÄ¶«Î÷¾Í¿ÉÒÔÔÚÓ©Ä»ÉÏ¹Û¿´.


\subsection{PostScript}

Ghosrscript ÓÐÒ»¸ö X11 µÄÇý¶¯³ÌÊ½×îºÃÔÚ PostScript µÄÔ¤ÀÀ³ÌÊ½ \onlynameurl{gv}
µÄ¹ÜÀíÏÂÊ¹ÓÃ. ÕâÐ©³ÌÊ½µÄ×îÐÂ°æÓ¦¸ÃÒ²¿ÉÒÔ¿´ PDF µµ°¸. Òª×¢Òâ gv
ÒÑ¾­È¡´úÁË½Ï¾ÉµÄÔ¤ÀÀ³ÌÊ½ "Ghostview"; ÐÂµÄÊ¹ÓÃÕß½éÃæÒª±È ghostview Æ½ÃæÀÏ¾ÉµÄ
Athena Í¼ÐÎÊ¹ÓÃÕß½éÃæÆ¯ÁÁµÄ¶à, ¹¦ÄÜÒ²±È½Ï¶à.




\subsection{TeX dvi}

TeX DeVice Independant µµ°¸¿ÉÒÔÔÚ X11 ÏÂÓÃ \onlynameurl{xdvi} À´Ô¤ÀÀ.
ÏÖ´ú°æµÄ xdvi »áºô½Ð ghostscript À´Ãè»æ PostScript µÄ²¿·Ý.

Ò²ÓÐÒ»¸ö VT100 µÄÇý¶¯³ÌÊ½, ½Ð×ö {\ttfamily dgvt}. ¼ÙÈçÄãÖ»ÄÜ×öµ½ÕâÑùµÄ»°, {\ttfamily Tmview}
¿ÉÒÔ´îÅä Linux ºÍ svgalib Ò»ÆðÓÃ.




\subsection{Adobe PDF}

Adobe µÄ Acrobat Reader ÓÐÌá¹© Linux °æ; Ö»Òª´ÓËûÃÇµÄÍøÕ¾ \nameurl{http://www.adobe.com/}{} ÏÂÔØ¾Í¿ÉÒÔÁË.

ÄãÒ²¿ÉÒÔÓÃ xpdf, ËüÊÇ¸öÃâ·ÑÈíÌå(freeware) ¶øÇÒ¸½Ô­Ê¼Âë, Í¬Ê±ÎÒÏë Ghostview
ÏÖÔÚÓ¦¸ÃÒÑ¾­Ö§Ô®ÔÚ X11 ÏÂÓÃ gs ¿´ PDF µµ°¸.




\section{ÔÚ lpd ÏÂÊ¹ÓÃÐòÁÐÊ½Ó¡±í»ú}


\subsection{Éè¶¨ printcap}

Lpd ÔÚ {\itshape /etc/printcap\/} ÖÐÌá¹©ÁËÎå¸ö¿ÉÒÔÉè¶¨µÄÊôÐÔ,
ÈÃÄãÓÃÀ´¿ØÖÆÓ¡±í»úËùÁ¬½ÓµÄÐòÁÐ²ºµÄÉè¶¨. ÔÄ¶Á {\itshape \onlynameurl{printcap}\/}
µÄÏßÉÏÊÖ¡õ(man page), ²¢Çë×¢Òâ {\itshape br\#\/}, {\itshape fc\#\/}, {\itshape xc\#\/},
{\itshape fs\#\/} ºÍ {\itshape xs\#\/} µÄÒâÒå. ÆäÖÐ×îááµÄËÄ¸öÊôÐÔÊÇÎ»Ôª×éÁÐ(bitmap),
ÓÃÀ´´ú±í¸ÃÐòÁÐ²ºµÄÊ¹ÓÃÉè¶¨. ¶ø {\itshape br\#\/} ÊôÐÔÖ»ÊÇµ¥´¿µÄ±«ÂÊ(baud rate),
ÀýÈç `{\ttfamily br\#9600}'.



Òª½« \onlynameurl{stty} µÄÉè¶¨×ª»»Îª
printcap µÄÆì±êÉè¶¨(flag settings) ·Ç³£¼òµ¥. ¼ÙÊ¹ÄãÐèÒª, ÇëÏÖÔÚ¾Í¿´¿´ stty
µÄÏßÉÏÊÖ¡õ.



Äã¿ÉÒÔÓÃ stty À´Éè¶¨Ó¡±í»ú²º, ÒÔ±ãÈÃÄã¿ÉÒÔ½«Ò»¸öµµ°¸ cat µ½¸Ã²º,
²¢ÇÒÊ¹ËüÕýÈ·µØÁÐÓ¡³öÀ´. Õâ¶ùÊÇÎÒµÄÓ¡±í²º `{\itshape stty -a\/}' µÄ½á¹û:
\begin{tscreen}
\begin{verbatim}
dina:/usr/users/andy/work/lpd/lpd# stty -a < /dev/ttyS2
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W;
lnext = ^V; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr 
-igncr -icrnl ixon -ixoff -iuclc -ixany -imaxbel
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 
bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase
-tostop -echoprt -echoctl -echoke
\end{verbatim}
\end{tscreen}

Õâ¡õºÍ¿ª»úÊ±ÐòÁÐ²º³õÊ¼»¯µÄÉè¶¨·½Ê½Î¨Ò»µÄ²»Í¬ÔÚì¶ {\ttfamily -clocal}, {\ttfamily -crtscts},
ºÍ {\ttfamily ixon}. ¸ù¾ÝÄãµÄÓ¡±í»úµÄÁ÷Á¿¿ØÖÆ(flow control) ·½Ê½, ÄãµÄÉè¶¨¿ÉÄÜ»á²»Í¬.



Êµ¼ÊÉÏ, ÄãÊÇÒÔÌØÊâµÄ·½Ê½Ê¹ÓÃ stty. ÒòÎª stty µÄ¶ÔÏóÊÇÁ¬½ÓÔÚ±ê×¼ÊäÈë(standard
input) ÉÏµÄÖÕ¶Ë»ú×°ÖÃ, ÄãÊÇÓÃÈçÉÏËùÊ¾µÄ `{\ttfamily $<$}' ×ÖÔª, À´Ê¹µÃ stty
´¦ÀíËùÖ¸¶¨µÄÐòÁÐ²º.



Ö»ÒªÄãµÄ stty Éè¶¨ÕýÈ·, `{\itshape cat file {$>$} /dev/ttyS2\/}' (ÔÚÎÒµÄÀý×ÓÖÐ)
¾Í¿ÉÒÔ½«µµ°¸ËÍµ½Ó¡±í»úÁË, Çë¿´Ò»ÏÂÕâ¸öµµ°¸
/usr/src/linux/include/asm-i386/termbits.h, Ëü°üº¬ÁËºÜ¶àµÄ
\#define ºÍÒ»Ð© struct (Äã¿ÉÄÜÏë°ÑËü cat µ½Ó¡±í»ú (ÒÑ¾­¿ÉÒÔÓÃÁË°É, ¶Ô²»¶Ô?),
È»áá°ÑËüµ±×ö±ãÌõÖ½). ÕÒµ½ÏÂÃæÕâÒ»ÐÐ:

\begin{tscreen}
\begin{verbatim}
/* c_cflag bit meaning */
#define CBAUD   0000017
\end{verbatim}
\end{tscreen}

ÕâÒ»¶ÎÁÐ³öÁË {\itshape fc\#\/} ºÍ {\itshape fs\#\/} Î»ÔªµÄÒâÒå. Äã»á·¢ÏÖµ½ÄÇ¶ùµÄÃû³Æ
(ÔÚ±«ÂÊÖ®áá) ºÍ stty Êä³öµÄ½á¹ûÆäÖÐÒ»ÐÐÏà·ûºÏ, ÎÒ²»ÊÇËµÕâ»áºÜÈÝÒ×Âð?



ÕÒµ½ÄÇÐ©ÔÚÄãµÄ stty ½á¹ûÖÐÇ°ÃæÓÐ¼õºÅ(-) µÄÉè¶¨, °ÑÄÇÐ©Êý×Ö(ÊÇ°Ë½øÎ»µÄ) ¼ÓÆðÀ´.
Õâ´ú±íÁËÄãÒªÇå³ýµÄÎ»Ôª, ½á¹û¾ÍÊÇÄãµÄ {\itshape fc\#\/} ÄÜÁ¦. µ±È»ÄãÒ²¿ÉÒÔÖ±½ÓÓÃ
`{\ttfamily fc\#0177777}' (ÎÒ¾ÍÊÇ), ÒòÎªÄã½«»áÔÚÇå³ýÖ®ááÁ¢¿ÌÉè¶¨ÕâÐ©Î»Ôª.



ÏÖÔÚ¶ÔÄÇÐ©ÔÚ stty µÄ½á¹ûÖÐÃ»ÓÐ¼õºÅÔÚÇ°ÃæµÄÉè¶¨ (ÔÚÕâÒ»¶ÎÖÐËùÁÐ³öµÄ) ×öÍ¬ÑùµÄÊÂ.
ÔÚÎÒµÄÀý×ÓÖÐ, ÖØÒªµÄÉè¶¨ÓÐ  CS8 (0000060), HUPCL (0002000), ºÍ CREAD
(0000200). Í¬Ê±Ò²ÕÒµ½´ú±íÄãµÄ±«ÂÊµÄÆì±ê (ÎÒµÄÊÇ 0000015), °ÑËüÃÇÍ³Í³¼ÓÆðÀ´,
ÔÚÎÒµÄÀý×ÓÖÐ»áµÃµ½ 0002275. Õâ¾ÍÊÇÄãµÄ {\itshape fs\#\/} ÄÜÁ¦ (`{\ttfamily fs\#02275}'
ÔÚÎÒµÄÀý×ÓÖÐÔË×÷µÄºÜºÃ).



ÓÃÍ¬ÑùµÄ·½Ê½Õë¶ÔÕâ¸ö±êÌâµµ(include file) ÖÐµÄÏÂÒ»¶Î, "c\_lflag bits",
×öÉè¶¨ºÍÇå³ýµÄ¶¯×÷. ÔÚÎÒµÄÀý×ÓÖÐÎÒ²»ÐèÒªÉè¶¨ÈÎºÎ¶«Î÷, ËùÒÔÖ»ÒªÓÃ
`{\ttfamily xc\#0157777}' ºÍ `{\ttfamily xs\#0}' ¾Í¿ÉÒÔÁË.




\subsection{»áµô×ÖµÄ¾ÉÐÍÐòÁÐÊ½Ó¡±í»ú}

Jon Luckey Ö¸³öÓÐÐ©¾ßÓÐ ten-cent
ÐòÁÐ½éÃæºÍÐ¡»º³åÇøµÄ¾ÉÐÍµÄÐòÁÐÊ½Ó¡±í»ú, µ±Ê¹ÓÃÁ÷Á¿¿ØÖÆÊ±,
ËµÍ£Ö¹¾ÍÊÇ{\itshape ÕæµÄ\/}±íÊ¾Í£Ö¹. Ëû·¢ÏÖÓÃ {\ttfamily \onlynameurl{setserial}}
Í£ÓÃËûµÄ Linux »úÆ÷µÄ 16550 ÐòÁÐ²ºµÄ FIFO ¹¦ÄÜáá, µô×ÖµÄÎÊÌâ¾Í½â¾öÁË
(Èç¹ûÄãÒªÕâÑù×ö, ËÆºõÖ»Òª½« uart µÄÖÖÀàÖ¸¶¨Îª 8250 ¾Í¿ÉÒÔÁË).




\section{¸ÐÐ»}

{\ttfamily smbprint} µÄ×ÊÑ¶ÊÇ´Ó Marcel Roelofs {\ttfamily $<$marcel@paragon.nl{$>$}}
µÄÒ»ÆªÎÄÕÂÀ´µÄ.



ÓÐ¹ØÊ¹ÓÃ Netware Ó¡±í»úµÄ {\ttfamily nprint} µÄ×ÊÑ¶ÊÇÓÉ Michael Smith
{\ttfamily $<$mikes@bioch.ox.ac.uk{$>$}} ËùÌá¹©µÄ.



ÔÚ lpd ÏÂÊ¹ÓÃÐòÁÐÊ½Ó¡±í»úÒ»½ÚÊÇÓÉ Andrew Tefft
{\ttfamily $<$teffta@engr.dnet.ge.com{$>$}} ËùÌá¹©.



ÓÐ¹Ø gs ºÍ gamma µÄ½éÉÜÊÇ Andreas {\ttfamily $<$quasi@hub-fue.franken.de{$>$}}
ËÍÀ´µÄ.



ÓÐ¹ØÐòÁÐ²ºµÄ 30 Ãë closing\_waiting µÄÄÇÁ½¶ÎÊÇÓÉ Chris Johnson
{\ttfamily $<$cdj@netcom.com{$>$}} Ëù¹±Ï×µÄ.



Robert Hart ËÍÀ´Ò»Ð©¼«¼ÑµÄÆ¬¶Î, ÊÇ¹Øì¶Éè¶¨Ò»²¿Ê¹ÓÃ HP
ÍøÂ·Ó¡±í»úµÄÁÐÓ¡ËÅ·þÆ÷, ÎÒÖð×ÖÕÕÓÃ.



»¹ÒªÌØ±ðÐ»Ð»ÄãÃÇÖ®ÖÐµÄºÜ¶àÈË, ÄÇÐ©ÀúÄêÀ´Ôø¾­Ö¸³öÎÄÕÂÖÐ´ò×Ö, url,
ÒÔ¼°ÖÖÖÖ´íÎóµÄÈË, Ð»Ð».



\end{document}
