Printer Autodetection

Johannes Meixner jsmeix at suse.de
Mon Nov 14 03:27:19 PST 2005


Hello,

brendan powers <brendan0powers <at> gmail.com> writes:
> I wrote some some software a little while ago that used hal to find
> printers, and then determined their drivers from the foomatic driver
> database.

1.
For most printers there is not just one driver.
Therefore the assumption that there is a boolean decission
"the driver or no driver at all" is wrong.
You would have to deal with multiple drivers for one printer.

2.
Modern drivers like Gimp-Print or HPIJS can produce data for
many different printer models. Therefore it is is not sufficient
to know only the driver name. There must be several driver options
set correctly to let such a driver produce the right printer-specific
data.

3.
When the printing system is CUPS then you would not deal with
"drivers" but with printer description files (PPD files).
Such a PPD file contains the manufacturer and model name and the
driver and the correct driver options for the particular model.
To set up the driver in CUPS you specify only a PPD file.
How should the mapping "driver" -> "PPD file" be done?

4.
How can you make sure that the "driver" is acually available
on a particular system?
In contrast there should be no PPD file installed on a system
for which the matching driver is not installed because
either there are appropriate RPM dependencies or the PPDs are
in the same package where the driver is (such a package can
be a RPM from the Linux distributor or any other software
package - e.g. a proprietary driver from the manufacturer).

5.
For many PostScript printers there is no entry in the Foomatic
database but there is a free PPD file available from the printer
manufacturer. PostScript printers do not need any driver.
For a PostScript printer only a PPD file is needed.

6.
To get an idea about the amount of data:
For example in Suse Linux 10.0 we have more than 3000 PPD files
for about 2000 printers.


I suggest to ignore "driver" and focus only on "PPD files".

What a HAL addon could do is to inspect all actually installed
PPD files under /usr/share/cups/model/ and search if there are
PPDs where the manufacturer and model entries match to the
detected printer.




More information about the hal mailing list