Printer Autodetection
John (J5) Palmieri
johnp at redhat.com
Mon Nov 14 06:34:28 PST 2005
On Mon, 2005-11-14 at 11:27 +0000, Johannes Meixner wrote:
> 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.
Pick one. Really users don't care as long as it prints and foomatics
has an idea of default drivers. If it sucks then fix it. Options are
not a way to fix things.
> 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).
This is a distribution issue.
> 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.
One of the issues I want to address is letting the user install a
manufacturer provided PPD though this is not an issue for HAL.
> 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".
I think this is what we were talking about. The words "driver" and "PPD
files" are sort of a side implementation issue and this is more of a
higher level discussion on what information HAL should export. But you
are right, it should be the PPD and not the driver.
> 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.
We use foomatics for this and then generate the PPD (foomatics has
enough info to do this). I talked to Jody Goldberg about how you guys
do it about a year and a half ago but in the end it is about the same
result. Really at that point it becomes a distribution issue and we
just need to decide what HAL should export and common interfaces such as
HAL addons and callouts. The implementation doesn't have to be the same
on the backend. If Model and Manufacture is good enough for HAL we
already have most of this though there are some cleanups that could be
done.
--
John (J5) Palmieri <johnp at redhat.com>
More information about the hal
mailing list