[cups] New printer difficulties

Johannes Meixner jsmeix at suse.de
Fri Apr 15 07:05:29 PDT 2016


Hello,

On Apr 14 16:45 Alan McConnell wrote (excerpt):
> Canon imageCLASS MF4770n
> attached to my computer by a USB cable
...
> using Debian wheezy
...
> Canon_MF4700_Series.ppd
...
> to add my printer, using http://localhost:631/admin.
> But I am given no way of telling the system that
> this is a _local_ printer, attached by a USB cable.

I assume under http://localhost:631/admin after
clicking on something like "Add printer" and after
having successfully logged in there (usually as root)
your printer device is not shown there listed as
one of the autodetected printers.

It is the so called CUPS backends that send the final
printer specific data to the printer device and those 
backends also implement printer device autodetection,
cf. "The Backends" at
https://en.opensuse.org/SDB:CUPS_in_a_Nutshell

The available backends and autodetected printer devices
are displayed by the "lpinfo -v" command (as root).

Every backend can also be run directly (as root).
In this case the backend autodetects printer devices
that match the backend and outputs the resuts.

For example the backend to send the final printer
specific data to USB printers is usually
/usr/lib/cups/backend/usb

For example when I run that as root on my
openSUSE Leap 42.1 system with CUPS 2.1.3 I get:
----------------------------------------------------------
# /usr/lib/cups/backend/usb

DEBUG: Loading USB quirks from "/usr/share/cups/usb".
DEBUG: Loaded 129 quirks.
DEBUG: list_devices
DEBUG: libusb_get_device_list=9
DEBUG2: Printer found with device ID: 
MFG:Brother;CMD:PJL,PCL,PCLXL,POSTSCRIPT;
MDL:HL-5150D series;CLS:PRINTER; Device URI:
usb://Brother/HL-5150D%20series?serial=F5J889574

direct usb://Brother/HL-5150D%20series?serial=F5J889574
"Brother HL-5150D series" "Brother HL-5150D series"
"MFG:Brother;CMD:PJL,PCL,PCLXL,POSTSCRIPT;
MDL:HL-5150D series;CLS:PRINTER;" ""
----------------------------------------------------------

In particular note the Device URI therein:
usb://Brother/HL-5150D%20series?serial=F5J889574

Accordingly for me under http://localhost:631/admin after
clicking on "Add printer" and after having successfully
logged in (as root) my USB printer device is listed there
as one of the autodetected "Local Printers:"

   Brother HL-5150D series (Brother HL-5150D series)

When in your case no backend autodetects your USB printer,
you should check whether or not your low-level USB stuff
works, e.g. see "USB printers" at
https://en.opensuse.org/SDB:Installing_a_Printer

The details about USB stuff change from time to time
so that regarding low-level USB issues you should ask
directly at your particular Linux distributor.

When in your case a backend autodetects your USB printer
note the exact Device URI in your particular case.

A PPD file and a Device URI is all you need to set up
a print queue in CUPS with the "lpadmin" command, cf.
"How to set up a print queue in full compliance with CUPS"
in the "Command-line Tools" section in
https://en.opensuse.org/SDB:CUPS_in_a_Nutshell

Note that for non-PostScript printers a PPD file alone is
not sufficient to make a print queue actually print on a
particular printer device because non-PostScript printers
need additionally printer driver software installed where
the PPD file must exactly match the driver software, cf
"Printer drivers: Make the printer print" in
https://en.opensuse.org/Concepts_printing


Kind Regards
Johannes Meixner
-- 
SUSE LINUX GmbH - GF: Felix Imendoerffer, Jane Smithard,
Graham Norton - HRB 21284 (AG Nuernberg)




More information about the cups mailing list