foomatic-db-engine-4.0.11/0000755000175100017510000000000012312603452013716 5ustar tilltillfoomatic-db-engine-4.0.11/gsPrint0000644000175100017510000000011312312603446015265 0ustar tilltill%! /Courier findfont 200 scalefont setfont 72 300 moveto (1) show showpage foomatic-db-engine-4.0.11/foomatic-getpjloptions.in0000644000175100017510000000410112312603446020745 0ustar tilltill#!@SH@ # # Polls PJL options from local or network printers # # # Till Kamppeter (till.kamppeter@gmail.com) # # Copyright 2001 Till Kamppeter # # This software may be freely redistributed under the terms of the GNU # General Public License (http://www.gnu.org/). # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # # Modifed by Patrick Powell # - error messages, fixed problem with netcat # - increased timeout, added a job end to sequence # as this was needed by a couple of printers NC=@NC@ CAT=@CAT@ PRINTF=@PRINTF@ PERL=@PERL@ usage(){ cat < foomatic-getpjloptions : Device where a local printer is connected to examples: /dev/lp0, /dev/usb/lp0 Have your parallel port in EPP/bi-directional mode (see your BIOS settings). : Host name or IP of a network printer (HP JetDirect, Socket, ...) : Port of your network printer. echo Uni-directional protocols as remote LPD are not supported. The option list is sent to standard output. EOF exit 1; } case "$1" in -* ) usage;; "" ) usage;; esac # We have at least one argument, so do the work ( # PJL commands to request the printer information $PRINTF "\033%%-12345X" $PRINTF "@PJL\r\n" $PRINTF "@PJL INFO VARIABLES\r\n" $PRINTF "@PJL INFO ID\r\n" $PRINTF "@PJL INFO CONFIG\r\n" $PRINTF "\033%%-12345X" ) | if [ ${2:-X} != X ]; then # We have two arguments, do ethernet printer request # Poll the printer's answer and filter out the newpage characters ${NC} -w 3 ${1} ${2} 2>/dev/null | ${PERL} -p -e "s/\014//" else # We have one argument, do local printer request # Send commands to printer port ${CAT} > ${1} # Wait ten seconds for the printer to process the request sleep 10 # Poll the printer's answer and filter out the newpage and CR characters ${CAT} < ${1} | ${PERL} -p -e "s/[\015\014]//" fi foomatic-db-engine-4.0.11/Makefile.in0000644000175100017510000002336412312603446015776 0ustar tilltill # Makefile to install foomatic-db-engine # $Revision$ # PREFIX defaults to /usr/local for manually installed progs, so that they # are not messed up on a system upgrade. # # `architecture independent', static data files i.e. perl libs go into # $(PREFIX)/share/foomatic # (user) executables into $(PREFIX)/bin/ # system binaries go into $(PREFIX)/sbin # configuration files into /etc/foomatic/*. # # The PERLPREFIX allows a seperate prefix for the Perl libraries. Use this # when Perl libraries in /usr/local are not found. # Variables DEBUG= prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ bindir=@bindir@ sbindir=@sbindir@ mandir=@mandir@ datarootdir=@datarootdir@ datadir=@datadir@ sysconfdir=@sysconfdir@ SRC=@srcdir@ INSTALL=@INSTALL@ PREFIX=$(prefix) PERLPREFIX=@PERLPREFIX@ # Foomatic database location for a regular installation LIBDIR=@LIBDIR@ # Foomatic database location for a "make inplace" installation LOCAL_LIBDIR=@LOCAL_LIBDIR@ # foomatic-rip path for a regular installation FOOMATIC_RIP=@FOOMATIC_RIP@ # foomatic-rip path for a "make inplace" installation LOCAL_FOOMATIC_RIP=@LOCAL_FOOMATIC_RIP@ # Locations for installing the components of this package BINDIR=$(bindir) SBINDIR=$(sbindir) MANDIR=$(mandir) ETCDIR=$(sysconfdir)/foomatic ## C settings CC=@CC@ CFLAGS=@CFLAGS@ XML_CFLAGS=@XML_CFLAGS@ XML_LIBS=@XML_LIBS@ ## Settings for Perl # Where to find the perl binary PERL=@PERL@ # How to install the perl libs, may be either "site" or "perl" # details in the ExtUtils::MakeMaker manpage PERL_INSTALLDIRS=@PERL_INSTALLDIRS@ # Genereal paths for all filter scripts EXEC_PATH=/usr/local/bin:/usr/bin:/bin LOG_PATH=/tmp # Paths for LPD and LPRng LPD_SPOOL=@LPD_SPOOL@ LPD_LOG=@LPD_LOG@ LPD_BIN=@LPD_BIN@ PRINTCAP=@PRINTCAP@ LPRNG_CONF=@LPRNG_CONF@ LPD_LPR=@LPD_LPR@ LPD_LPQ=@LPD_LPQ@ LPD_LPRM=@LPD_LPRM@ LPD_LPC=@LPD_LPC@ LPRNG_CHECKPC=@LPRNG_CHECKPC@ # Paths and other settings for CUPS CUPS_ETC=@CUPS_ETC@ CUPS_ADMIN=@CUPS_ADMIN@ CUPS_LPSTAT=@CUPS_LPSTAT@ CUPS_PPDS=@CUPS_PPDS@ CUPS_FILTERS=@CUPS_FILTERS@ CUPS_BACKENDS=@CUPS_BACKENDS@ LIB_CUPS=@LIB_CUPS@ CUPS_DRIVER=@LIB_CUPS@/driver CUPS_PCONF=@CUPS_PCONF@ CUPS_LPR=@CUPS_LPR@ CUPS_LPQ=@CUPS_LPQ@ CUPS_LPRM=@CUPS_LPRM@ CUPS_LPC=@CUPS_LPC@ CUPS_LP=@CUPS_LP@ CUPS_CANCEL=@CUPS_CANCEL@ CUPS_ENABLE=@CUPS_ENABLE@ CUPS_DISABLE=@CUPS_DISABLE@ CUPS_ACCEPT=@CUPS_ACCEPT@ CUPS_REJECT=@CUPS_REJECT@ CUPS_LPMOVE=@CUPS_LPMOVE@ CUPS_LPOPTIONS=@CUPS_LPOPTIONS@ CUPS_LPINFO=@CUPS_LPINFO@ # Paths for PDQ PDQ_CONF=@PDQ_CONF@ PDQ_PRINTRC=@PDQ_PRINTRC@ PDQ_FOOMATIC=$(PDQ_CONF)/drivers/foomatic PDQ_PRINT=@PDQ_PRINT@ PDQ_JOBDIR=~/.printjobs # Paths for PPR PPR_PPRD=@PPR_PPRD@ PPR_INTERFACES=@PPR_INTERFACES@ PPR_PPDFILES=@PPR_PPDFILES@ PPR_ETC=@PPR_ETC@ PPR_PPR=@PPR_PPR@ PPR_PPAD=@PPR_PPAD@ PPR_PPOP=@PPR_PPOP@ # Paths for direct, spoolerless printing DIRECT_ETC=$(ETCDIR)/direct DIRECT_CONFIG=$(DIRECT_ETC)/.config # Other paths NC=@NC@ RLPR=@RLPR@ SMBCLIENT=@SMBCLIENT@ NPRINT=@NPRINT@ PTAL_CONNECT=@PTAL_CONNECT@ PTAL_PIPES=@PTAL_PIPES@ MTINK_PIPES=@MTINK_PIPES@ CAT=@CAT@ GZIP=@GZIP@ WGET=@WGET@ CURL=@CURL@ # This is mainly useful for building a binary foomatic package DESTDIR=/ ### Probably nothing to fiddle past here # Files generated by the AC_OUTPUT call of "./configure" AC_OUTPUT_FILES:=Makefile makeDefaults makeMan \ foomatic-configure foomatic-printjob \ foomatic-kitload foomatic-ppdfile foomatic-preferred-driver \ foomatic-cleanupdrivers foomatic-getpjloptions \ foomatic-addpjloptions foomatic-compiledb foomatic-fix-xml \ foomatic-nonumericalids foomatic-replaceoldprinterids \ foomatic-ppd-options foomatic-printermap-to-gutenprint-xml \ foomatic-extract-text foomatic-searchprinter foomatic-ppd-to-xml # User programs and helper programs BINFILES:=foomatic-printjob foomatic-configure \ foomatic-combo-xml foomatic-perl-data \ foomatic-ppdfile foomatic-compiledb \ foomatic-ppd-options foomatic-searchprinter foomatic-ppd-to-xml # Administrative commands, only useful for admins SBINFILES:=foomatic-kitload \ foomatic-getpjloptions foomatic-addpjloptions \ foomatic-preferred-driver foomatic-fix-xml \ foomatic-nonumericalids foomatic-replaceoldprinterids \ foomatic-printermap-to-gutenprint-xml \ foomatic-cleanupdrivers foomatic-extract-text # Foomatic XML templates TEMPLATES:=pjl_enum_choice.xml pjl_enum_option.xml pjl_num_option.xml # Masks for trash files which have to be removed before packaging Foomatic TRASHFILES:="*~" "*\#*" ".??*" "*.rej" all: build # The install rule should check for kitloads and avoid stomping. It doesn't install: install-bin install-man check-config: @if [ -f .testing-stamp ] ; then \ echo 'Cowardly refusing to install testing Defaults.pm.' ;\ echo 'Use "make testing-clean; make defaults" to get a proper one.' ;\ exit 1 ;\ fi install-bin: check-config lib/Makefile # This is the only way to get the Perl-generated Makefile using # $(DESTDIR) properly ( cd lib && \ $(MAKE) PREFIX=$(PERLPREFIX) && \ $(MAKE) PREFIX=$(PERLPREFIX) DESTDIR=$(DESTDIR) pure_install \ ) ${SRC}/mkinstalldirs $(DESTDIR)$(BINDIR) ${SRC}/mkinstalldirs $(DESTDIR)$(SBINDIR) ${SRC}/mkinstalldirs $(DESTDIR)$(ETCDIR) ${SRC}/mkinstalldirs $(DESTDIR)$(LIBDIR)/templates ${INSTALL} -m 755 $(BINFILES) $(DESTDIR)$(BINDIR) ${INSTALL} -m 755 $(SBINFILES) $(DESTDIR)$(SBINDIR) ( cd foomatic-templates && \ ${INSTALL} -m 644 $(TEMPLATES) $(DESTDIR)$(LIBDIR)/templates \ ) $(PERL) -p -i -e "s:foomatic-templates:$(LIBDIR)/templates:g" $(DESTDIR)$(SBINDIR)/foomatic-addpjloptions # Link to allow foomatic-ppdfile be called under the old name # foomatic-datafile ln -sf foomatic-ppdfile $(DESTDIR)$(BINDIR)/foomatic-datafile # Link foomatic-ppdfile to the CUPS 1.2 PPD generator directory, # so that the cups-driverd automatically generates Foomatic PPDs # on demand (/usr/lib/cups/driver). if [ -d $(LIB_CUPS) ]; then \ ${SRC}/mkinstalldirs $(DESTDIR)$(CUPS_DRIVER); \ ln -sf $(BINDIR)/foomatic-ppdfile $(DESTDIR)$(CUPS_DRIVER)/foomatic; \ fi install-man: check-config ${SRC}/mkinstalldirs $(DESTDIR)$(MANDIR) ${SRC}/mkinstalldirs $(DESTDIR)$(MANDIR)/man1 ${SRC}/mkinstalldirs $(DESTDIR)$(MANDIR)/man8 ${INSTALL} -m 644 *.1 $(DESTDIR)$(MANDIR)/man1 ${INSTALL} -m 644 *.8 $(DESTDIR)$(MANDIR)/man8 # If the Perl scripts have "use lib 'lib/';" lines from a former # "make testing", we remove them. build: defaults lib/Makefile foomatic-combo-xml foomatic-perl-data man for m in $(BINFILES) $(SBINFILES); do \ $(PERL) -p -i -e "s=use lib '.*lib/';\n==s" $$m; \ done chmod a+rx $(AC_OUTPUT_FILES) mkinstalldirs lib/Makefile: lib/Makefile.PL ( cd lib && $(PERL) Makefile.PL verbose INSTALLDIRS=$(PERL_INSTALLDIRS) ) foomatic-combo-xml: foomatic-combo-xml.c $(CC) $(CFLAGS) -o foomatic-combo-xml foomatic-combo-xml.c foomatic-perl-data: foomatic-perl-data.c $(CC) $(CFLAGS) $(XML_CFLAGS) -o foomatic-perl-data foomatic-perl-data.c $(XML_LIBS) man: lib/Foomatic/Defaults.pm chmod a+rx ./makeMan ./makeMan clean: lib/Makefile remove-trash $(MAKE) -C lib clean rm -f lib/Makefile.old rm -f lib/Foomatic/Defaults.pm rm -f *~ .testing-stamp rm -f *.o gs_out rm -f foomatic-combo-xml rm -f foomatic-perl-data rm -f Foomatic rm -rf foomatic-db rm -f $(BINFILES:=.1) $(SBINFILES:=.8) # Remove links from inplace installation rm -f foomatic-rip foomatic-datafile man # Remove foomatic-ppds-.tar.gz package rm -rf foomatic-ppds foomatic-ppds-[0-9]* rm -rf foomatic-ppds*.tar.gz distclean: clean rm -f $(AC_OUTPUT_FILES) config.log config.status config.cache rm -rf autom*.cache confdefs.h ppd foomatic-db db maintainer-clean: distclean rm -f configure aclocal.m4 # Uninstall an installed Foomatic uninstall: uninstall-bin uninstall-man uninstall-bin: check-config lib/Makefile # This is the only way to get the Perl-generated Makefile using # $(DESTDIR) properly ( cd lib && \ $(MAKE) PREFIX=$(DESTDIR)$(PERLPREFIX) uninstall \ ) ( cd $(DESTDIR)$(BINDIR) && \ rm -f $(BINFILES) \ ) rm -f $(DESTDIR)$(BINDIR)/foomatic-datafile ( cd $(DESTDIR)$(SBINDIR) && \ rm -f $(SBINFILES) \ ) ( cd $(DESTDIR)$(LIBDIR)/templates && \ rm -f $(TEMPLATES) \ ) rmdir $(DESTDIR)$(LIBDIR)/templates || : rmdir $(DESTDIR)$(ETCDIR) || : uninstall-man: check-config for m in $(BINFILES); do \ rm -f $(DESTDIR)$(MANDIR)/man1/$$m.*; \ done for m in $(SBINFILES); do \ rm -f $(DESTDIR)$(MANDIR)/man8/$$m.*; \ done # Various testing/debugging/etc targets # We insert a "use lib 'lib/';" line into the perl scripts, so that # they use the local database and libraries, so they also work correctly on # systems with installed Foomatic. inplace: testing testing: INPLACE = --inplace testing: defaults foomatic-combo-xml foomatic-perl-data man ln -sf lib/Foomatic .; \ for m in $(BINFILES) $(SBINFILES); do \ $(PERL) -p -i -e "s=^\#\x21$(PERL)(.*)\n=\#\x21$(PERL)\$$1\nuse lib '`pwd`/lib/';\n=s" $$m; \ done chmod a+rx $(AC_OUTPUT_FILES) # Links for more convenient usage of the "inplace" installation ln -sf $(LOCAL_FOOMATIC_RIP) foomatic-rip ln -sf `pwd`/foomatic-ppdfile foomatic-datafile # Script for the man pages echo -en '#!/bin/sh\nman ./\044\061.[1-9n] 2>/dev/null || man \044\061\n' > man || : chmod a+rx man || : inplace-clean: testing-clean testing-clean: clean # Remove editor backup and temporary files remove-trash: for m in $(TRASHFILES); do \ find . -name "$$m" -exec rm "{}" \; ; \ done # We need to export all Variables for makeDefaults and the target to # work. .EXPORT_ALL_VARIABLES: # Use INPLACE=--inplace to get the special run-in-place Defaults. defaults: lib/Foomatic/Defaults.pm lib/Foomatic/Defaults.pm: Makefile makeDefaults chmod a+rx ./makeDefaults ./makeDefaults $(INPLACE) if [ x$(INPLACE) = x--inplace ] ; then touch .testing-stamp ; fi .PHONY: all defaults check-config build install install-bin \ man inplace testing clean inplace-clean testing-clean distclean \ maintainer-clean foomatic-db-engine-4.0.11/mkinstalldirs0000755000175100017510000000123712312603446016532 0ustar tilltill#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain # $Id$ errstatus=0 for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case "$pathcomp" in -* ) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr fi fi pathcomp="$pathcomp/" done done exit $errstatus # mkinstalldirs ends here foomatic-db-engine-4.0.11/foomatic-ppd-options.1.in0000644000175100017510000000304212312603446020462 0ustar tilltill.\" This -*- nroff -*- source file is part of foomatic. .\" .TH FOOMATIC-PPD-OPTIONS 1 "2003-09-16" "Foomatic Project" .SH NAME foomatic-ppd-options \- show the PPD options .SH SYNOPSIS .B foomatic-ppd-options [-d=debuglevel] [ ppdfiles ] .SH DESCRIPTION The .B foomatic-ppd-options program reads the specified PPD files or stdin and decodes the PPD file to produce a list of options. This is really just a text based version of other print configuration tools. .PP The output format consists of a set of lines, each starting with a keyword, followed by a set of options and the default value. For example: .RS .nf makemodel = Tektronix Phaser 350 Foomatic/Postscript (recommended) name=PageSize; default=Letter; options=Letter (US Letter), \e A4 (A4), 11x17 (11x17), A3 (A3), A5 (A5), B5 (B5 \e(JIS\e)),... name=PageRegion; default=Letter; options=Letter (US Letter), A4 (A4), ... .fi .RE .PP Each option starts with the .B name tag, followed by a default value (if any), followed by the set of options and a comment describing them. Punctuation in the comment is escaped. .SS Options .TP 5 .BI \-d debuglevel Set the debug level. 0 disables debug messages. .TP 5 .BI [\ files\ ] The list of PPD files to read for options. A '-' causes STDIN to be read. .\".SH SEE ALSO .\".IR foomatic-XXX (1), .SH EXIT STATUS .B foomatic-ppd-options exits with a 0 status if successful, and nonzero if an error. An error message is also printed on standard error (STDERR). .SH AUTHOR Patrick Powell .SH BUGS Probably. But it has been tested. foomatic-db-engine-4.0.11/USAGE0000644000175100017510000011113212312603446014507 0ustar tilltill Foomatic 4.0.11 =============== foomatic-db-engine ------------------ Foomatic's database engine generates PPD files from the data in Foomatic's XML database. It also contains scripts to directly generate print queues and handle jobs. Till Kamppeter Lars Uebernickel http://www.openprinting.org/ This usage documentation file is written by Till Kamppeter Intro ----- Foomatic is a database providing information about the usage of printers with Unix-like operating systems (Linux, Solaris, ...). The applications of these operating systems send PostScript or PDF to the printer queues. Therefore one usually hands over the PostScript directly to a PostScript printer (sometimes with some inserted PostScript commands for options) or uses Ghostscript for generating the data format the printer needs from PostScript or PDF input. This is done by the printer spooler which also stores the data in a spool directory when the printer is still occupied by another job, transmits the data to a print server in the network, and so on. The printer drivers for non-PostScript printers are either compiled into Ghostscript, a plug-in for Ghostscript (e. g. IJS drivers), or they are an extra filter which converts a generic bitmap generated by Ghostscript into the printer's data format. For this the spooler has to call complicated command lines of Ghostscript and the extra filter (if needed). The user of a Unix-like operating system normally does not see these command lines because an installation program takes appropriate filter scripts and/or description files from a database and assigns them to the printer queue. Widely used databases were the RHS-Printfilters and the APS filters. Their disadvantages were that they only supported one spooler (LPD/LPRng) and only a small part of the driver's options (mostly page size and resolution). Foomatic supports all options of the drivers and all known spoolers (LPD, LPRng, GNUlpr, CUPS, Solaris LP, PPR, PDQ, CPS, direct spooler-less printing). In addition, all known free software printer drivers are supported. Foomatic also supports printing of various non-PostScript/PDF file types for spoolers which do not support these by themselves (LPD, LPRng, GNUlpr, spooler-less printing). To enable this feature you need to have "a2ps", "enscript", or "mpage" installed. Another problem is that the way how to install queues, to print files, and to handle jobs is very different with different spoolers. LPD for example requires editing of configuration files for adding a queue, whereas CUPS and PPR have specialized command line utilities. Foomatic puts a layer between the applications and the spoolers so that one has a common, spooler-independent command line interface for all spoolers, so that switching of spoolers or administration of a network with different spoolers gets much easier, because for the same operations there are the same commands, independent of the spooler. This command line interface can also be used as a base for spooler-independent graphical frontends. Installation ------------ Foomatic runs on all systems where one can run the Perl interpreter and Ghostscript. Besides Perl and a C compiler with its standard libraries you will need the libxml C library for XML handling and one of the tools "wget" or "curl". In addition, you need the Foomatic database ("foomatic-db") and the Foomatic filters ("foomatic-filters"). It is recommended to install these packages before you install this package. Then the paths to its components get auto-detected during the build of this package. "wget" is really a standard tool which nearly every distribution includes. If yours does not include it, you find "wget" on http://www.gnu.org/software/wget/wget.html and "curl" is located on http://curl.haxx.se/ Because libxml is also used by GNOME, it is probably also part of every distribution of GNU/Linux or *BSD and one can also easily build it on any Unix-like operating system. If you distribution does not provide libxml you can get libxml from http://www.xmlsoft.org/ If your distribution contains libxml, note that besides the "libxml" or "libxml2" package you must install also a package with a name "libxml-devel" or "libxml2-devel" to be able to compile programs which use libxml. This additional package contains the needed header files and "xml(2)-config", which tells the C compiler where it finds the header files. If "xml(2)-config" or some header files in the packages of your distribution are missing, compile libxml from source. We have tested with the versions 1.8.17 and 2.4.19 of libxml, both work, but 1.8.17 requires that the XML files do not have leading blank lines. Use foomatic-fix-xml if you have such XML files (old or third-party files). libxml 1.8.9 and earlier do not work. Using libxml 2.x or newer is highly recommended. For Foomatic making sense one also needs Ghostscript (5.50 or newer, GPL Ghostscript 8.64 or newer highly recommended) if one has a non-PostScript printer. In addition, the appropriate driver for a non-PostScript printer must be installed. After installing the libxml package, Foomatic can be installed using the commands (if you have downloaded this package from the BZR repository, run "./make_configure" at first, for that you will also need libxml 2.x, the "autoconf" and "aclocal" utilities, "aclocal" is in the "automake" package in some distributions): ./configure make make install "make install" must be run as "root", the other commands can be run as a normal user. The "configure" script will auto-detect where the libxml is installed and which version and also where relevant programs, files, and directories of your printer spooler are located. In addition, it is made sure that Perl will find the Perl libraries of Foomatic. If "configure" fails because of something not being installed, do rm -rf config.cache autom*.cache before you run "configure" again (after installing the missing parts). By default, Foomatic is installed into subdirectories of /usr/local (e. g. /usr/local/bin/foomatic-configure), to get it into subdirectories of /usr (/usr/bin/foomatic-configure), enter: ./configure --prefix=/usr make make install There are other things which can be adjusted by options on the "configure" command line, enter "./configure --help" for more info. You can also modify variables in the beginning of the "Makefile" after running "configure", but note that every run of "configure" re-creates the "Makefile". If "configure" did not auto-detect where you have placed the database (or if you intend to install the database afterwards), do export LIBDIR=/path/to/the/database ./configure make make install You have specified the path correctly, when /path/to/the/database/db/source/driver/ljet4.xml exists. You can also run Foomatic out of its source directory (for example when you want to try it out, or when you don't have root access). Therefore enter (can be done as a normal user): ./configure make inplace and enter the commands with "./" in the beginning (e. g. "./foomatic-ppdfile ..."). This also works on a machine where a system-wide Foomatic is already installed. This way you can develop XML files for the database and test them in your local database without messing up the system-wide one. To have the local database you need to put the "foomatic-db" tarball into the main directory of this package or into the directory where you have also put this package for unpacking. Simply unpack the database package. You do not need to build or install it. You can use Foomatic databases from wherever you want, edit the "$libdir" line in lib/Foomatic/Defaults.pm to point to the desired database. To use the system-wide one, let the line look like: ... # Library directory; typically /usr/share/foomatic or somesuch. $libdir = '/usr/share/foomatic'; ... In addition, you should install a utility to make PostScript out of non-PostScript files, so that you can print those non-PostScript files and also a list of available options using the "docs" option. The supported utilities are "a2ps", "enscript", and "mpage". Recommended is "a2ps" because it detects many file types (text, PDF, most image formats) and together with ImageMagick (for images) and GNU Ghostscript 6.51 or newer (for PDF) it converts them to PostScript. The other tools convert only text files. The tool you have installed is auto-detected by the filter script for your spooler and used automatically if necessary. CUPS and PPR need this tool only for printing the option list, they use internal filters for printing non-PostScript files. The PDQ configuration files only supports "mpage", with LPD, GNUlpr, LPRng, or direct, spooler-less printing you can use all tools. A default spooler can be set by putting its name into an /etc/foomatic/defaultspooler file or into ~/.defaultspooler If you have a printer or multi-function device from HP, install HPLIP from http://hplipopensource.com/ before starting to set up printer queues with Foomatic. This gives you the possibility to access all extra functions of your HP device, independent whether it is connected via parallel port, USB, or ethernet. This gives you, depending on the device, functionality, as ink/toner level check, nozzle check and cleaning, color adjustment, head alignement, scanning, memory card access, and even sending faxes. Printing through the MTink daemon from the MTink package (http://xwtools.automatix.de/) is also supported. When CUPS is the spooler the special "mtink" backend (included in the MTink package) will be used. Using the MTink daemon it is possible to check the ink levels while printing. The MTink daemon supports only Epson inkjets from the Epson Stylus Color 740 on to the current models. Easy printer setup with CUPS 1.2 or newer ----------------------------------------- If you have CUPS 1.2 or newer, you do not need the command line to set up printers with Foomatic. Simply fire up the web interface entering http://localhost:631/ and click the "Administration" tab. Then click the "Add this printer" at the entry of an auto-detected printer (parallel, USB, ethernet) or click "Add printer" at the top. Follow the instructions on the following pages. If the printers of the Foomatic database do not appear, check whether the link to foomatic-ppdfile is in /usr/lib/cups/driver: lrwxrwxrwx 1 root root 25 Apr 19 18:13 foomatic -> /usr/bin/foomatic-ppdfile If not, create it manually. If you want the web interface only list entries for the recommended driver for each printer, create a file /etc/cups/foomatic.conf containing the line OnlyRecommended Yes Note: CUPS paths may be different on your system. Adding a queue -------------- To add a printer queue you use the queue administration tool foomatic-configure. You call it this way: foomatic-configure [-q] [-f] [-w] [-s ] -n -c [-p -d ] [ --ppd ] [-o