INSTALLING MAGICFILTER ---------------------- * Run "configure.sh". If you want to put the files in any other directory tree than /usr/local (i.e. /usr/local/bin, /usr/local/man) then call it with the option --prefix=, for example: ./configure.sh --prefix=/usr Configure.sh works something like Autoconf's configure scripts, and has the following options: --src=DIR where the source lives (.) --prefix=DIR where to install the final product (/usr/local) --execdir=DIR where to put executables (prefix/bin) --mandir=DIR where to put manpages (prefix/man) --confdir=DIR where to put configuration information (/etc) If magicfilter uses a private magic file, it will be placed here, and if you hand-make your own magic.m4 file, magicfilter will look for it here as well. --filterdir=DIR where to put printer filters ($prefix/sbin/printers) --with-path=PATH look for conversion programs in PATH ($PATH) If configure can't find a conversion program, it will build magicfilter without support for that particular conversion. Normally, magicfilter uses your $PATH to (hopefully) get all the normal places for filters, but you may need to customize it if you're on a system that places filters in odd locations. NOTE: This used to be --path in previous versions of Magicfilter. --use-local-magic install a private magic file Normally, magicfilter will attempt to use /etc/magic (or whereever the magic for file(1) lives), but if that magic file does not appear to be modern enough (experimentally determined by seeing if it recognises a H-P pjl file), configure.sh will configure magicfilter to use a local magic file. But there are cases where file(1) has been modified so that it doesn't just use /etc/magic, but instead has its magic files scattered randomly around, and thus configure.sh will report that /etc/magic works when it doesn't. If you use --use-local-magic, magicfilter won't even bother to try and use the system /etc/magic. --with-papersize=size Magicfilter writes US Letter size pages by default, but you can set the default to something else with this option. --traditional The normal magicfilter printer definition files are m4 scripts that are merged with a standard ruleset. If is is not how you want magicfilter to work, --traditional builds printer definition files that are already processed and installs a version of magicfilter that understands this format. This is here for people who prefer to hack their printer definitions; if you don't, installing the normal magicfilter makes all of your printers consistant. --with-lprng Magicfilter usually allows you to specify a bunch of options on the command line. Unfortunately, LPRng emits many many different options that seem to vary from release to release of the package; configure.sh attempts to detect LPRng and generate a magicfilter that doesn't take options, but if that autodetection fails then you can manually give this option. Do this if you're running LPRng and magicfilter fails on you. --use-fifo=YES Pass the output from ghostscript to a fifo, instead of simply piping it to the output device. --with-pcl Look for either the hp2pdm or lj2ps programs to print pcl on printers that don't support it. This is not done by default because both of these programs only support pcl4 and people expecting pcl5 to work may be unpleasantly surprised. * Run "make". * Run "make install". ----------------------------------------------------------------------------- The following instructions apply only to systems using the BSD printing system. Linux and BSD-derived OSes all use the BSD printing system, some System V-based systems such as IRIX do as an option whereas others, such as Solaris, do not. If in doubt, check for the existence of the file /etc/printcap. ----------------------------------------------------------------------------- * Edit your /etc/printcap file to contain a call to the appropriate printer filter in the "if" entry of each local printer. This will typically look something like this: pencil|lp|PostScript|ljet4|HP LaserJet 4:\ :lp=/dev/lp1:sd=/var/spool/lpd/pencil:sh:mx#0:\ :if=/usr/sbin/printers/ljet4: crayon|dj550c|color|HP DeskJet 550C:\ :lp=/dev/lp2:sd=/var/spool/lpd/crayon:sh:mx#0:\ :if=/usr/sbin/printers/dj550c: Note the alias "lp" for the default (text) printer, and "PostScript" for the preferred PostScript printer. IMPORTANT: If you're on a really old version of UNIX which doesn't support the so-called "#!-hack" for selecting an interpreter for your filters, this form of installation does not work. Instead, you need to make your /etc/printcap file look something like this: pencil|lp|PostScript|ljet4|HP LaserJet 4:\ :lp=/dev/lp1:sd=/var/spool/lpd/pencil:sh:mx#0:\ :if=/usr/local/bin/magicfilter:\ :af=/usr/sbin/printers/ljet4: To test if your OS supports the #!-hack, type at the command line: /usr/local/bin/XXXX < /dev/null ... where XXXX-filter is any installed magic filter. If you get an error message, your OS does *not* support the #!-hack. Linux, all BSD-derived OSes and System V R3 and later all support the #!-hack. * Kill and restart lpd. Your printer filter should now be working.