Damned! The wrong version!

Alex Kloss klossa at Stud-Mailer.Uni-Marburg.DE
Fri Oct 5 03:41:52 PDT 2001


Here's the actual version.

Alex
-------------- next part --------------
TITLE:		Printing on LFS using CUPS
LFS VERSION:	any
AUTHOR:		Alex Kloss <l.x. at gmx.de>

SYNOPSIS:
	Short Guide how to set up the necessary software to print using
	ghostscript, a2ps and CUPS, Samba  and Gimp-Print as an Option.

HINT:	
	This is a short Hint based on other printing hints, which did
	not work for me properly. Another reason for using CUPS instead
	of LPRng is the better KDE integration since 2.2. I don't claim
	to deliver a perfect hint, but with you help, we can get it
	there. Gimp Print is an useful addition if you're using Inkjet
	Color Printers, because you'll get better quality in some cases.

DOWNLOADS:
	Your favourite flavour of Ghostscript:
	look at http://www.cs.wisc.edu/~ghost/, check mirror sites.

	I prefer using AFPL Ghostscript 7.00, obtainable on
	ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/, but any other
	Version should do, too.

	You'll also need 
	zlib (http://www.gzip.org/zlib, check out for mirror sites),
	libjpeg (http://www.ijg.org, ftp://ftp.uu.net/graphics/jpeg),
	and libpng (http://libpng.sourceforge.net, 
	ftp://swrinde.nde.swri.edu/pub/png)

	a2ps:
	http://www.inf.enst.fr/~demaille/a2ps/
	ftp://ftp.enst.fr/pub/unix/a2ps/

	cups:
	www.cups.org
	look on this page for your nearest mirror.

	samba:
	http://www.samba.org
	look on this page for your nearest mirror.

	and, if you want it

	gimp-print:
	http://gimp-print.sourceforge.net

INSTALL:
	Ghostscript:
	
	I prefer the "symbolic link" method. If you like to extract the
	sources of libjpeg and zlib only into the ghostscript dir, try
	the other printing hint and come back when you've managed to
	build ghostscript.

	ln -s ../jpeg-6b jpeg
	ln -s ../zlib-1.1.3 zlib
	cp ./src/unix-gcc.mak Makefile
	
	You can edit the Makefile for different installation dirs.

	If you encounter problems about HAVE_SYS_TIME_H to be
	redefined, add to all files shown on this script

	for file in src/*.c
        do
	  timeinc=`cat $file | grep time_.h`
	  if [ -n "$timeinc" ]
	  then
	    mv $file $file.old
	    cat $file.old | \
	    sed $'/#include "time_.h"/a \\\n#include "time.h"' \
	    > $file
	  fi
	done

	Now type "make" and "make install" and if something goes wrong,
	find me on #lfs @ irc.linuxfromscratch.org and shout at me. No.
	Don't do that. Ask someone there for help.


	a2ps:
	./configure --prefix=/usr && 
	make && 
	make install

	did the job for me.


	cups:
	./configure && 
	make && 
	make install

	should be enough. You can add options like --with-openssl if
	you want (then you need to read the openssh hint before).

	I dislike the start/stop script cups comes with. So I remade it
	and composed a new one loosely after it, but w/o unnecessary
	stuff. It looks like that:

#!/bin/sh
#
# "$Id: cups.sh.in,v 1.12 2001/05/21 21:32:50 mike Exp $"
#
#   Startup/shutdown script for the Common UNIX Printing System (CUPS).
#
#   Copyright 1997-2001 by Easy Software Products, all rights reserved.
#
#   Slightly changed by Alex Kloss to fit into the LFS bootup
#
#
# Start or stop the CUPS server based upon the first argument to the script.
#

source /etc/init.d/functions

case $1 in
	start)
		echo -n "Starting CUPS Printserver..."
		loadproc /usr/sbin/cupsd
		;;
 	stop)
                echo -n "Stopping CUPS Printserver..."
                killproc cupsd
                ;;

        reload)
                echo -n "Reloading CUPS Printserver..."
                reloadproc /usr/sbin/cupsd
                ;;

        restart)
                $0 stop
                /usr/bin/sleep 1
                $0 start
                ;;

        status)
                statusproc cupsd
                ;;

        *)
                echo "Usage: $0 {start|stop|reload|restart|status}"
                exit 1
		;;
esac

# end of cups startup script.

	You don't need to replace the script, but I like it better like
	this. So I added it to the hint.


	samba:
	You can install samba yourself. Look at "./configure --help",
	there are some nice options, you possibly want to select. To
	use CUPS for printing on a samba printer you need to

	ln -s `whereis smbspool` /usr/lib/cups/backend/smb

	Next, you can install samba printers.

	If you need help on CUPS, try http://localhost:631


	gimp-print:

	Remember you only need that if you want the advanced drivers
	(especially a quality improvement for inkjet printers).

	./configure --prefix=/usr --with-cups --with-ghost &&
	make &&
	make install

	/etc/init.d/cups restart

Hope this was helpful.
Thanks to the help of the #lfs channel.
Alex Kloss (LX on #lfs on irc.linuxfromscratch.org)


More information about the hints mailing list