Typo
[linux_from_scratch_hints.git] / OLD / print.txt
blob07c14beefbc15cc8d7b32a4093138e7bb042ffe4
1 TITLE:          Print_hint
2 LFS VERSION:    3.0-pre4
3 AUTHOR:         ktb <x.y.f@home.com>
5 SYNOPSIS:
6         This hint covers setting up basic printing.  I'm assuming local 
7         networking is enabled, sections 9.1 through 9.6 of the book.
9 HINT:
10         ver 0.8
13 Contents
14 =========
16         * Support
17             * Hardware
18             * Kernel
19         * Software
20             * lprng
21             * ghostscript
22             * a2ps
23             * apsfilter
24         * Post installation
25         * Sources and disclaimer
29 Support
30 ========
32 Hardware
33 --------
35 First check if your printer is supported -
37 http://www.linuxprinting.org/printer_list.cgi
39 Make sure there is communication with the printer.  
40 For a local printer on the first parallel port try -
42         # cat test_file > /dev/lp0
44 The printer should respond.
46 For a networked printer try pinging the IP number of the printer.  
48 If one of those worked you are ready to install the software.
50 If the printer didn't respond make sure it is connected to the computer 
51 correctly i.e., check cables, make sure the network is working
52 correctly and that there is kernel support for the printer.
56 Kernel
57 ------
59 If you are installing a local printer it isn't going to work if you don't have 
60 printer and parallel port support in the kernel.  For the latter see the 
61 "Parallel port support" section of the kernel .config file -
63         $ cat /usr/src/linux/.config | grep CONFIG_PARPORT 
65 and the former -
67         $ cat /usr/src/linux/.config | grep CONFIG_PRINTER
71 Software
72 ========
74 lprng is the software that manages the print queue.
75 -----
77 http://www.astart.com/lprng/LPRng.html
78   LPRng-3.7.4.tgz
80         ./configure --prefix=/usr --sysconfdir=/etc \ 
81                 --disable-setuid --disable-gdbm &&
82         make &&
83         make install
85 Notes: lprng won't compile unless you have "gdbm" installed or 
86 "--disable-gdbm" as a ./configure option.  The gdbm database library
87 helps speed up large print jobs.  For more information see -
89 http://www.astart.com/lprng/LPRng-HOWTO.html
90 http://www.gnu.org/software/gdbm/gdbm.html
91 ftp://ftp.gnu.org/gnu/gdbm/
96 Ghostscript adds postscript support to non-postscript printers.
97 -----------
99 http://www.cs.wisc.edu/~ghost/
100 http://www.cs.wisc.edu/~ghost/doc/AFPL/get700.htm
101   ghostscript-7.00.tar.gz
102   ghostscript-7.00libpng.tar.gz
103   ghostscript-7.00jpeg.tar.gz
104   ghostscript-7.00zlib.tar.gz
105   ghostscript-fonts-std-6.0.tar.gz
108 Unpack ghostscript-7.00.tar.gz.
110         # cd gs7.00/
111         # ln -s ./src/unix-gcc.mak makefile
113 Even if you have jpeg installed
114 unpack ghostscript-7.00jpeg.tar.gz within gs7.00/ and -
116         # mv jpeg-6b jpeg
118 If you don't have zlib and libpng installed
119 unpack ghostscript-7.00libpng.tar.gz and ghostscript-7.00zlib.tar.gz
120 within gs7.00/ and -
122         # mv libpng-1.0.10 libpng
123         # mv zlib-1.1.3 zlib
125 If you have zlib and libpng installed edit the makefile -
127 change
128 SHARE_LIBPNG=0
130 SHARE_LIBPNG=1
132 change
133 SHARE_ZLIB=0
135 SHARE_ZLIB=1
137 Also edit the makefile if you want to change the prefix to /usr -
139 prefix = /usr/local
141 prefix = /usr
143 Make sure you have the paths to your X libs and X*.h files accessible to
144 the build process.  With a default X install they should be in
145 /usr/X11R6/lib and /usr/X11R6/include/X11.
147 Add the following two lines to /etc/ld.so.conf -
149 /usr/X11R6/lib
150 /usr/X11R6/include/X11
152 To make these directories immediately accessible, run -
154         # ldconfig
156 If you don't have X then comment out all the lines in the makefile
157 dealing with X.
159 Then build and install with -
161         make &&
162         make install
164 Install fonts in the ghostscript directory -
166         # cd /usr/share/ghostscript
167         # tar xvfz path_to_/ghostscript-fonts-std-6.0.tar.gz
169 Notes: There are several flavors of Ghostscript see -
170 http://www.linuxprinting.org/howto/ghostscript.html
174 a2ps is a text/any to Postscript filter.
175 ----
177 http://www.inf.enst.fr/~demaille/a2ps/
178 ftp://ftp.enst.fr/pub/unix/a2ps/
179   a2ps-4.13b.tar.gz
181         ./configure --prefix=/usr --sysconfdir=/etc/a2ps \ 
182                 --disable-nls --enable-shared &&
183         make &&
184         make install
186 Notes: During the make process you will be notified that a2ps works better 
187 with "psutils."  It's your choice.  For more information on that see -
189 http://www.dcs.ed.ac.uk/home/ajcd/psutils/
193 Apsfilter a filter that runs ghostscript and creates /etc/printcap.
194 ---------
196 http://www.apsfilter.org/
197 http://www.apsfilter.org/download.html
198   apsfilter-6.1.1.tar.bz2
200 To install run -
202         ./SETUP
204 You will be asked a series of questions.  Some of the information SETUP
205 will be looking for: printer type, which driver you want to use, paper size, 
206 network or local printer, etc. 
208 Note the driver name as you will be copying the driver to a different directory
209 later.  Don't worry if you try "Test" during apsfilter setup and it
210 doesn't work.  Make sure the values you have entered are correct and 
211 install the configuration.
215 Post installation
216 =================
218 The driver should be in /usr/src/apsfilter/uniprint/
219 copy it to /usr/share/ghostscript/6.50/lib/
220 The driver should be picked up by apsfilter on that path but if it
221 becomes an issue, the path to the driver can be set in
222 /etc/apsfilter/lp/apsfilterrc.
224 Next test and fix permissions with the new setup by running -
226         # checkpc -f
228 We are almost ready to test our new configuration.  If the line printer
229 daemon (lpd) is running issue -
230         
231         # lpc reread
233 If lpd isn't running start it with -
235         # lpd
237 Test by sending a print job with lpr  -
239         # lpr file_to_print
243 Sources and disclaimer
244 ======================
246 I certainly don't consider myself an expert at print installations:)  It
247 should give you a good start though.  This hint could use some cleaning
248 up, hence ver 0.8.  I welcome any comments.
249   
250 The sources I followed for my initial print install -
252 http://hints.linuxfromscratch.org/hints/printing.txt
253 http://www.linuxprinting.org/howto/
254 http://www.linuxprinting.org/