here is another hint for you

ktb x.y.f at
Mon Aug 27 19:50:11 PDT 2001

-------------- next part --------------
TITLE:		Print_hint
LFS VERSION:	3.0-pre4
AUTHOR:		ktb <x.y.f at>

	This hint covers setting up basic printing.  I'm assuming local 
	networking is enabled, sections 9.1 through 9.6 of the book.

	ver 0.8


	* Support
	    * Hardware
 	    * Kernel
	* Software
	    * lprng
	    * ghostscript
	    * a2ps
	    * apsfilter
	* Post installation
	* Sources and disclaimer



First check if your printer is supported -

Make sure there is communication with the printer.  
For a local printer on the first parallel port try -

	# cat test_file > /dev/lp0

The printer should respond.

For a networked printer try pinging the IP number of the printer.  

If one of those worked you are ready to install the software.

If the printer didn't respond make sure it is connected to the computer 
correctly i.e., check cables, make sure the network is working
correctly and that there is kernel support for the printer.


If you are installing a local printer it isn't going to work if you don't have 
printer and parallel port support in the kernel.  For the latter see the 
"Parallel port support" section of the kernel .config file -

	$ cat /usr/src/linux/.config | grep CONFIG_PARPORT 

and the former -

	$ cat /usr/src/linux/.config | grep CONFIG_PRINTER


lprng is the software that manages the print queue.

	./configure --prefix=/usr --sysconfdir=/etc \ 
  		--disable-setuid --disable-gdbm &&
	make &&
	make install

Notes: lprng won't compile unless you have "gdbm" installed or 
"--disable-gdbm" as a ./configure option.  The gdbm database library
helps speed up large print jobs.  For more information see -

Ghostscript adds postscript support to non-postscript printers.

Unpack ghostscript-7.00.tar.gz.

	# cd gs7.00/
	# ln -s ./src/unix-gcc.mak makefile

Even if you have jpeg installed
unpack ghostscript-7.00jpeg.tar.gz within gs7.00/ and -

	# mv jpeg-6b jpeg

If you don't have zlib and libpng installed
unpack ghostscript-7.00libpng.tar.gz and ghostscript-7.00zlib.tar.gz
within gs7.00/ and -
	# mv libpng-1.0.10 libpng
	# mv zlib-1.1.3 zlib

If you have zlib and libpng installed edit the makefile -



Also edit the makefile if you want to change the prefix to /usr -

prefix = /usr/local
prefix = /usr

Make sure you have the paths to your X libs and X*.h files accessible to
the build process.  With a default X install they should be in
/usr/X11R6/lib and /usr/X11R6/include/X11.

Add the following two lines to /etc/ -


To make these directories immediately accessible, run -

	# ldconfig

If you don't have X then comment out all the lines in the makefile
dealing with X.

Then build and install with -

	make &&
	make install

Install fonts in the ghostscript directory -
	# cd /usr/share/ghostscript
	# tar xvfz path_to_/ghostscript-fonts-std-6.0.tar.gz

Notes: There are several flavors of Ghostscript see -

a2ps is a text/any to Postscript filter.

	./configure --prefix=/usr --sysconfdir=/etc/a2ps \ 
  		--disable-nls --enable-shared &&
	make &&
	make install

Notes: During the make process you will be notified that a2ps works better 
with "psutils."  It's your choice.  For more information on that see -

Apsfilter a filter that runs ghostscript and creates /etc/printcap.

To install run -


You will be asked a series of questions.  Some of the information SETUP
will be looking for: printer type, which driver you want to use, paper size, 
network or local printer, etc. 

Note the driver name as you will be copying the driver to a different directory
later.  Don't worry if you try "Test" during apsfilter setup and it
doesn't work.  Make sure the values you have entered are correct and 
install the configuration.

Post installation

The driver should be in /usr/src/apsfilter/uniprint/
copy it to /usr/share/ghostscript/6.50/lib/
The driver should be picked up by apsfilter on that path but if it
becomes an issue, the path to the driver can be set in

Next test and fix permissions with the new setup by running -

	# checkpc -f

We are almost ready to test our new configuration.  If the line printer
daemon (lpd) is running issue -
	# lpc reread

If lpd isn't running start it with -

	# lpd

Test by sending a print job with lpr  -

	# lpr file_to_print

Sources and disclaimer

I certainly don't consider myself an expert at print installations:)  It
should give you a good start though.  This hint could use some cleaning
up, hence ver 0.8.  I welcome any comments.
The sources I followed for my initial print install -

More information about the hints mailing list