A Bit of Slack Never Hurt Anyone

Guide to printing in Slackware Linux

Written by mRgOBLIN 2002-03-13


Slackware Linux (Currently version 8.0) uses BSD Style printing. BSD Printing uses LPD (Line Printer Daemon) Most Unix style software outputs in PostScript format and unless you happen to have a PostScript capable printer you will need some kind of filter to translate this PostScript Output into a language/format that your printer can understand. Slackware uses APSFilter (Slackware-8.0 comes with apsfilter-6.1.1 and Ghostscript version 5.50)

How Do I make it work?

Before we start you should check the Database at http://www.linuxprinting.org/database.html and get as much info as you can regarding your printer and write it down (we are assuming you cannot print yet :) In fact it is advisable to look in this database before you go out and spend good money on a printer. It's no fun buying some fancy looking printer only to end up with an expensive paper dispenser.

Once you have this info you are ready to start.

First thing to do is to get your printer connected and make sure you have kernel support for the port that it is connected to. By default Slackware sets up your Parallel port for you and you should find your parallel printer on /dev/lp0

You may also have a USB printer, For info on getting USB up and running take a look at the Linux USB Website (see the resources section below)

  • LPD also supports Serial and Network Printers.

Use: cat /proc/devices to list the currently loaded devices and you should see "lp" in there.

Next step is the Software. You will need to have installed the following packages to get your printer working correctly

  • lpr.tgz
  • ghostscr.tgz
  • gsfonts.tgz
  • a2ps.tgz
  • apsfilt.tgz
  • gs_x11.tgz (Optional)

and of course any other drivers or software mentioned in the printer database (see link above).

Special Notice for Slackware-8.0 Users

Normally now you would go right to the APSFilter setup but if you are running Slackware-8.0 there are a couple of things to do first... Many people have run into trouble printing with Slackware-8.0 and this seems to me to be caused by APSFilter not overwriting the default lp entry that is in the /etc/printcap file supplied with Slackware.

To rememdy this I suggest you remove the /etc/printcap file before going any further... use:

mv /etc/printcap /etc/my_orig.printcap

or if you are sure you don't want a backup use:

rm /etc/printcap

If you have tried setting up APSFilter many times already it would probably be a good idea to clean the /etc/apsfilter directory out as well use:

rm -r /etc/apsfilter/*

Now we can carry on as usual


As root change into the /usr/lib/apsfilter directory. Use:

cd /usr/lib/apsfilter

Now run the setup program like this Use:

./SETUP (yes the dot and the slash and all UPPERCASE)

this will run you through the apsfilter setup.. unless you have updated Ghostscript you will likely get a warning that you should update to a newer version... Unless you found info to the contrary just continue here and run through the rest of the setup. My advice is to accept the defaults for the apsfilter file locations. you will finally get to a main menu... go through these items one by one Select an interface, driver, paper-size and resolution for your printer. You are given the option to print a test page and once you are happy with your settings... most importantly don't forget the

(I) ==> Install printer with values shown above - repeat this step for installing multiple printers

This writes your new configs to disk. You will need to restart lpd to effect the changes. Use:

lpc restart all lpc status

man lpc for more usage.

With luck you should be happily printing away. sending a printjob to lpr should go to your default printer (lp).
if you have more than one printer entry you can specify a different one with the -P option

e.g to use a printer auto1 I would use:

lpr -Pauto1 somefile.file

Next step is to read the Printing-Usage-HOWTO (See resources below)

Some commands


man <commandname> for options
  • lpr -- your main printing tool
  • lpq -- checks for spooled print jobs
  • lprm -- removes spooled print jobs
  • lpc -- line printer control program

Local Resources

  • /usr/doc/apsfilter-6.1.1/
  • /usr/doc/a2ps-4.13b/
  • /usr/doc/Linux-HOWTOs/Printing-HOWTO
  • /usr/doc/Linux-HOWTOs/Printing-Usage-HOWTO

Remote Resources