Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation Upgd Kernel About Linux Networking Printing MOL UAE

AmigaOne - Linux - Printing

Printing from Linux is as easy as pie. Just plug your postscript printer into the parallel port, go to any program, load the file you want to print, select 'Print' and your output should miraculously appear on your printer.

But if don't have a postscript printer, don't worry - it will still print just as easily, but you will also get all the postscripts commands printed for free, and somewhere in there amongst them will be your output. Some programs give you the option to print using other than postscript, but what you actually get is a hexadecimal dump, that goes on for page after page after page, and killing the printer doesn't help. When you turn it on again, it wants to carry on where it left off, even after a re-boot. There's got to be a better way, and there is. It comes in the shape of 'CUPS'.

CUPS provides a portable printing layer for UNIX®-based operating systems. It has been developed by Easy Software Products to promote a standard printing solution for all UNIX vendors and users. CUPS provides the System V and Berkeley command-line interfaces. At first glance it appears to be a bulky and complicated as warship going into battle, but while it appears to have everything you will ever need, it is not really as bad as it first appears.

CUPS uses the Internet Printing Protocol ("IPP") as the basis for managing print jobs and queues. The Line Printer Daemon ("LPD") Server Message Block ("SMB"), and AppSocket (a.k.a. JetDirect) protocols are also supported with reduced functionality. CUPS adds network printer browsing and PostScript Printer Description ("PPD") based printing options to support real-world printing under UNIX.

CUPS includes an image file RIP that supports printing of image files to non-PostScript printers. A customized version of GNU Ghostscript 7.05 for CUPS called ESP Ghostscript is available separately to support printing of PostScript files within the CUPS driver framework. Sample drivers for Dymo, EPSON, HP, and OKIDATA printers are included that use these filters, and hundreds of others are downloadable from the Internet.

1. The first step towards using CUPS is to install it on your system. For this we are assuming that you either have the CDs catalogued on your computer or you are using the Internet and the appropriate path has been catalogued. From a root Shell, run:

apt-get install cupsys
apt-get install cupsys-client
apt-get install gs-esp
2. The next step is to check that you have a suitable driver installed, and if not install one.
  • First examine your printer's page in the database to determine if you have a PostScript printer or will be using a driver. If your printer needs a driver, check that the driver for your printer is installed. There are several styles of driver; to see if yours is installed try:

    CUPS Raster
    CUPS has a native driver style called "cups-raster". These are executable programs, installed into CUPS' filter directory, which CUPS drives using a set of filters and Ghostscript. Such drivers are relatively easy to get going with CUPS, so are usually the best choice for CUPS users.

    The gimp-print driver is probably the best known third party CUPS driver. Several printer vendors also provide CUPS drivers, typically as part of an installer utility. A few such drivers are included with CUPS.

    You can see which cups-raster drivers are installed by examining the filters in '/usr/lib/cups/filter'; usually cups-raster drivers have names beginning with "rasterto". Each cups-raster driver program will also have one or more PPD files in '/usr/share/cups/model', each containing a reference to the proper cups-raster program.

    Ghostscript
    You can see the available Ghostscript drivers on your system by running 'gs -h'. If the driver you need is not listed, you need to obtain a new Ghostscript package which includes this driver, or compile Ghostscript yourself. ESP GhostScript includes the largest set of drivers, so is probably the best choice. For some third-party drivers, the driver authors distribute special Ghostscript packages including the needed driver; give that a shot first.
    Filter
    Some drivers are separate programs which run together with Ghostscript. You will need to obtain and install the separate program, as well as Ghostscript. (Some filters are in fact "plugins" using the "IJS" mechanism. Be sure that "ijs" is listed in the devices shown in the command "gs -h".)
    Uniprint
    A few drivers are Uniprint drivers. These consist simply of a upp file containing various parameters; most are included with Ghostscript. Others you will need to obtain and place in your ghostscript library directory (one of the directories listed under "Search path:" at the end of the 'gs -h' output).

  • If your driver is not installed, install it. Unfortunately, the actual procedure varies by driver and distribution. Look first for a PPC prepackaged binary kit of any sort; failing that look for generic installation instructions provided from the driver website.

  • CUPS requires a PPD file to define how it will use the printer and driver (if any). PPD files are parameter files so are not processor dependent being suitable for Intel or PPC, and come from several sources; be sure you get yours from the right place:

    If you have a PostScript printer
    Obtain the PPD file from your printer's vendor. Typically it will be carefully hidden somewhere in your vendor's "driver" for Windows, and some PPD files can be downloaded from LinuxPrinting.org or they will be downloadable from the database. You do not need a driver, just the PPD file.

    If you do not have a PostScript printer
    There are two sources for non-PostScript printer PPDs under CUPS:
    • If your printer uses a CUPS Raster driver (Gimp-Print for CUPS, samsung's lpp kit, etc), use the PPD file that came with the driver. Gimp-print, for example, will generate and install a set of PPD files at compile time.
    • If you have any other style of driver, obtain a PPD file from this website for the driver you want to use. Look for "download PPD" links near the driver names on your printer's page. If a driver has no "download PPD" link, there is insufficient data to generate a PPD for the entry; in that case, see the text of the driver entry.
    Save the PPD file in the directory '/usr/share/cups/model/'. The PPD file does not need to be executable, but it should be world-readable and should have the file name extension ".ppd".
3. Once you have got your drivers and ppd files sorted out, you are ready to configure CUPS for printing, but you will need to restart CUPS to pick up the new drivers etc first. This can be done by typing "/etc/init.d/cupsys restart", but this doesn't always achieve the desired result, so it may be necessary to reboot instead.

4. There are several ways of configuring CUPS, but the simplest is to use any web browser and enter a URL of 'http://localhost:631/admin'. You will then be asked for a username and password as shown below:

Enter a user name ('root' is probably a good choice) and password and click on OK, and this should open the CUPS Admin screen as shown below:

Click on the 'Add Printer' button and this should open the Add New Printer screen as shown below:

Enter the printer name which must begin with alphabetic and contain no blanks or hyphens (-), followed by a location for the printer and a description, as shown above. When you click on continue a Security Warning message may appear:

This is simply a warning from Mozilla that may appear whenever data is being input. If already turned off it will not appear. If it does, simply click on 'Continue' and the next screen will appear as shown below:

Here you must select the device that the printer is connected to. If you have simply connected your printer to the parallel port, then you should select the 'Parallel Port #1' as shown above. If your printer is connected differently, then its up to you to figure what value to select. When you click on 'Continue' you may see the Security Warning again or go straight to the Model/Driver screen as shown below:

The values shown above are the defaults, but if you have added your own driver(s), they should appear here as well. Select the driver that matches your printer and click on 'Continue', which will take you to the second Model/Driver screen:

The values shown above are the defaults, but if you have added your own driver(s), they should appear here as well. Select the model that matches your printer and click on 'Continue', which will hopefully add the printer and display a confirmation message to that effect. Click on the printer name to display the details for the printer. Clicking on the 'Print Test Page' button will prove whether your setup has been successful. If an error occurs, you can use the 'Modify Printer' button to revise the setup details entered above.

When you need to print, the programs should automatically display the CUPS printers in the print requester. If it doesn't, you may find that typing the printer name into the requester has the desired affect, but this may not always be successful.

To find out more about CUPS and how to use it effectively, use any web browser and enter a URL of 'http://localhost:631/documentation.html', otherwise you may need to check CUPS Help for assistance.

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.


Copyright © 2005 Amiga Auckland Inc. All rights reserved.
Revised: September 26, 2005.