[cups.development] setup printer from console
Johannes Meixner
jsmeix at suse.de
Wed Jan 12 01:19:31 PST 2011
Hello,
On Jan 11 19:46 bui wrote (shortened):
> I want to setup a USB HP Laserjet 1015. The ppd file is
> /usr/share/ppd/HP/hp-laserjet_1015_hpijs.ppd.gz.
> What is the command to add that printer?
FYI
(from http://en.opensuse.org/SDB:CUPS_in_a_Nutshell):
---------------------------------------------------------------
How to set up a print queue in full compliance with CUPS:
1. Retrieve autodetected printers and their correct
matching DeviceURIs from the cupsd:
Run (as root) "lpinfo -l -v"
2. Retrieve available printer driver descriptions
from the cupsd: Run (as root) "lpinfo -l -m"
3. Select a printer/DeviceURI from the first list
and a printer driver from the second list
and devise an appropriate queue name.
4. Set up the queue: Run (as root)
"lpadmin -p queue_name -v DeviceURI -m printer_driver -E"
or "lpadmin -p queue_name -v DeviceURI \
-P /usr/share/cups/model/printer_driver -E"
---------------------------------------------------------------
The CUPS model directory on openSUSE is /usr/share/cups/model/
but your CUPS model directory could be different.
Via the '-P' switch you can specify any path to a PPD file.
In your particular case the command to add your printer is
lpadmin -p queue_name -v DeviceURI \
-P /usr/share/ppd/HP/hp-laserjet_1015_hpijs.ppd.gz -E
where queue_name is something you like e.g. "lj1015"
and DeviceURI must be replaced by something appropriate
from your "lpinfo -l -v" output, e.g. something like
usb://HP/LaserJet%201015
or
hp:/usb/HP_LaserJet_1015?serial=a1b2c3
depending on which CUPS backend you use, see "The Backends"
at http://en.opensuse.org/SDB:CUPS_in_a_Nutshell
I assume with your "HPLIP 3.10.9 (hpijs only build)"
there is no "hp" backend (this would come from HPLIP)
so that you probably use the generic CUPS backend "usb".
By the way:
According to HPLIP's models.dat file entries:
----------------------------------------------------------
[hp_laserjet_1015]
....
fw-download=False
....
plugin=0
....
tech-class=LJMono
----------------------------------------------------------
the HP LaserJet 1015 should be a normal PCL5e printer
This means that you could use a generic PCL5e driver
so that you may not need the HPIJS driver in HPLIP.
You may as well use CUPS' generic PCL 4/5 driver
via CUPS' "laserjet.ppd" file provided your cross compiled
CUPS also has the matching "rastertohp" filter installed.
If you like to use the Ghostscript PCL5e driver "ljet4"
(provided your Ghostscript has it compiled in, check
your Ghostscript's "gs -h" output - Ghostscript calls
drivers "devices"), you would additionally need a
Foomatic PPD file for the Ghostscript driver "ljet4"
and the Foomatic filter "foomtic-rip", see OpenPrinting.org at
http://www.linuxfoundation.org/collaborate/workgroups/openprinting
Kind Regards
Johannes Meixner
--
SUSE LINUX Products GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
AG Nuernberg, HRB 16746, GF: Markus Rex
More information about the cups-devel
mailing list