1 TITLE: Printing on LFS using CUPS
3 AUTHOR: Alex Kloss <l.x.@gmx.de>
6 Short Guide how to set up the necessary software to print using
7 ghostscript, psutils, a2ps, foomatic and CUPS, Samba and Gimp-
11 This is a short Hint based on other printing hints, which did
12 not work for me properly. Another reason for using CUPS instead
13 of LPRng is the better KDE integration since 2.2. I don't claim
14 to deliver a perfect hint, but with you help, we can get it
15 there. Gimp Print is an useful addition if you're using Inkjet
16 Color Printers, because you'll get better quality in some cases.
19 Your favourite flavour of Ghostscript:
20 look at http://www.cs.wisc.edu/~ghost/, check mirror sites.
22 I prefer using AFPL Ghostscript 8.00, obtainable on
23 ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/, but any other
24 Version should do, too. You should also obtain a package of the
25 necessary type1-fonts, e.g. GNU-ghostscript-fonts.
27 Since Version 1.1.15, CUPS no longer includes the PS RIP filter
28 called pstoraster. So you need some ghostscript version that
29 provides as cups raster driver. ATM, GNU ghostscript DOES NOT
30 HAVE such a backend. So you're better off with AFPL or EPS
34 libjpeg (http://www.ijg.org, ftp://ftp.uu.net/graphics/jpeg),
35 and libpng (http://libpng.sourceforge.net,
36 ftp://swrinde.nde.swri.edu/pub/png)
39 ftp.dcs.ed.ac.uk/pub/ajcd/
42 http://www.inf.enst.fr/~demaille/a2ps/
43 ftp://ftp.enst.fr/pub/unix/a2ps/
46 http://www.linuxprinting.org/download/foomatic/
49 http://ftp.gnome.org/pub/GNOME/sources/libxml2/2.4/
50 or search your local gnome mirror.
54 look on this page for your nearest mirror.
58 look on this page for your nearest mirror.
63 http://gimp-print.sourceforge.net
68 Actual Versions (AFPL 8.00, GNU 7.05, ESP 7.05.5) have a
69 ./configure script that enables Ghostscript to use the system
70 libraries, so you don't need their sources to be around on the
71 Ghostscript installation anymore. Just type:
73 ./configure --prefix=/usr &&
77 If you encounter problems about HAVE_SYS_TIME_H to be rede-
78 fined, run the following script. Never versions of Ghostscript
79 shouldn't show that behaviour anymore, but you never know:
83 timeinc=`cat $file | grep time_.h`
88 sed $'/#include "time_.h"/a \\\n#include "time.h"' \
93 and retry "make && make install". It should work now.
95 Afterwards, install the fonts into the right dir (if you've
96 chosen the prefix "/usr", it should be "/usr/share/ghostscript",
97 otherwise read the docs of your ghostscript release to find out
103 cp Makefile.unix Makefile
105 Edit the Makefile for preferred prefix, includedir and mandir.
110 if mkdir gives errors about being unable to create existent
111 directories, don't mind.
116 ./configure --prefix=/usr --enable-paths=yes &&
125 foomatic will require libxml2. Since this is bl**dy easy to
126 install, I won't lose a word on it, here.
128 ./configure --prefix=/usr &&
132 Look on http://www.linuxprinting.org for documentation about
142 should be enough. You can add options like --with-openssl if
143 you want (then you need to read the openssh hint before).
145 I dislike the start/stop script cups comes with. So I remade it
146 and composed a new one loosely after it, but w/o unnecessary
147 stuff. It looks like that:
151 # "$Id: cups-printing.txt,v 1.1 2003/09/13 16:18:12 tushar Exp $"
153 # Startup/shutdown script for the Common UNIX Printing System (CUPS).
155 # Copyright 1997-2001 by Easy Software Products, all rights reserved.
157 # Slightly changed by Alex Kloss to fit into the LFS bootup
160 # Start or stop the CUPS server based upon the first argument to the script.
163 source /etc/init.d/functions
167 echo -n "Starting CUPS Printserver..."
168 loadproc /usr/sbin/cupsd
171 echo -n "Stopping CUPS Printserver..."
176 echo -n "Reloading CUPS Printserver..."
177 reloadproc /usr/sbin/cupsd
191 echo "Usage: $0 {start|stop|reload|restart|status}"
196 # end of cups startup script.
198 You don't need to replace the script, but I like it better like
199 this. So I added it to the hint.
204 You can install samba yourself. Look at "./configure --help",
205 there are some nice options, you possibly want to select. To
206 use CUPS for printing on a samba printer you need to
208 ln -s `whereis smbspool` /usr/lib/cups/backend/smb
210 Next, you can install samba printers.
212 If you need help on CUPS, try http://localhost:631
217 Remember you only need that if you want the advanced drivers
218 (especially a quality improvement for inkjet printers).
220 ./configure --prefix=/usr --with-cups --with-ghost &&
224 /etc/init.d/cups restart
226 Hope this was helpful.
227 Thanks to the help of the #lfs channel.
228 Alex Kloss (LX on #lfs on irc.linuxfromscratch.org)