Printer setup tools: Automatically choose the correct backend
Hi,
currently, it is no problem any more to determine which model a connected printer is and to find the correct PPD/driver for it. The bigger problem is to use the correct backend automatically if the driver comes with its own backend. Examples for such drivers are Gutenprint and HPLIP. The "canon" and "epson" backends for Gutenprint are usually not used and this does not restrict anything on normal printing. They only allow printer maintenance "through the print queue" by sending special commands. But for HPLIP the "hp" and "hpfax" backends are very important. The first allows printing with bi-directional functionality (HPLIP needs this also for border-less printing) and the second allows faxing on HP's multi-function devices.
The list of auto-detected printers in a printer setup tool is the equivalent of the output of "lpinfo -v":
------------------------------------------------------------------------
till@till-laptop:~/printing/foomatic/foomatic-db-hpijs$ lpinfo -v network socket network beh direct hal:///org/freedesktop/Hal/devices/usb_device_3f0_3517_00CNMJP81545_if0_printer_noserial network socket://192.168.2.34 network ipp://fe80::21d:60ff:fe48:c2d7:631/printers/SanFranciscoFax network socket://192.168.2.29 direct hpfax:/usb/HP_LaserJet_3390?serial=00CNMJP81545 direct usb://HP/LaserJet%203390 direct hp:/usb/HP_LaserJet_3390?serial=00CNMJP81545 direct hal:///org/freedesktop/Hal/devices/usb_device_3f0_2812_CN7BU18154_if0_printer_CN7BU18154 direct usb://HP/Officejet%20H470?serial=CN7BU18154 direct hp:/usb/Officejet_H470?serial=CN7BU18154 network socket://192.168.2.35 direct hal:///org/freedesktop/Hal/devices/usb_device_3f0_bd02_MY7143104604C1_if0_printer_MY7143104604C1 network socket://192.168.2.30 direct usb://HP/Photosmart%20Pro%20B9100%20series?serial=MY7143104604C1 direct hp:/usb/Photosmart_Pro_B9100_series?serial=MY7143104604C1 network http network ipp network lpd network bluetooth://001A0E1769AA file cups-pdf:/ direct scsi network smb till@till-laptop:~/printing/foomatic/foomatic-db-hpijs$ ------------------------------------------------------------------------
You see already that several printers get detected three times, first by the "hal" backend, second by "usb" and third by "hp". Users of a GUI- or web-based printer setup tool will see the model name of their printer three times and are completely confused what they should choose. So only a few will choose the "hp" backend and so will be able to print borderless or use the hp-toolbox.
A method which I have applied twice (printerdrake and system-config-printer) is to add explicit support for backends supplied with the driver. Therefore at least these two backends select the "hp" backend automatically (and even suppress the superfluous entries in the list of detected printers). This works fine at least for drivers which are common enough and existed before the release of the printer setup tool in use. Some authors also give no special support for third-party software in general.
So one needs a method to auto-select the best backend for a printer. As all information about each supported printer model is supplied to CUPS by a PPD file for the printer, the most obvious place for information about the preferred backend is the PPD file.
Therefore I suggest the following PPD extensions:
*cupsPreferBackend: "hp"
This entry simply recommends a backend. In this case a printer setup tool should look for full URIs of this backend in the output of "lpinfo -l -v" and compares make-and-model and device ID entries with the ones of the URI which the user has chosen. If both the user-chosen URI qnd the URI found as replacement have the printer's serial number or IP, they must match. URIs with serial number or IP should never be replaced by URIs with another serial number or IP.
*cupsPreferBackend usb,parallel,hal: "hp"
This is a modifier for all keywords listed here. It estricts the application of the backend selection rule to the case when the URI selected by the user uses one of the listed backends, in this example the printer setup tool should only try to use the "hp" backend if the user has selected an URI for the "usb", "parallel", or "hal" backend.
*cupsReplaceURI: "usb://HP/LaserJet(_|%20)42\d\d hp:/usb/HP_LaserJet_42\d\d"
Here we do not use model info from the "lpinfo -l -v" output. The printer setup tool should match the first regexp against the user-chosen URI and the search the "lpinfo -v" output for an URI matching the second regexp. In this case the user-chosen URI gets relaced. Serial numbers and IPs have to get checked here, too, as with the *cupsPreferBackend keyword.
*cupsMakeURI: "hp-makeuri -c @IP@"
*cupsMakeURI: "hp-makeuri -c @USB_BUS@:@USB_DEV@"
*cupsMakeURI: "hp-makeuri -c @PARDEV@"
*cupsMakeURI: "foojet-geturi @USBDEV@"
*cupsMakeURI: "foojet-geturi @URI@"
Some drivers have their own tools to determine the correct URIs for their printers. With these lines a printer setup tool should execute the shown commands, substituting the parameters (@...@) at first. There can be more than one line, and they should be tried from the top to the bottom, until one line produces a valid URI. So if a parameter cannot be substituted because it does not exist, as for example the IP for an USB printer, or if a command gives an error, the next line gets tried. If all lines fail the printer setup tool creates the queue, but it uses the URI chosen by the user.
@URI@ is here the URI chosen by the user, @PARDEV@ is the device file for the parallel port, like /dev/lp0, @USBDEV@ is the USB device like /dev/usb/lp0, ...
In general there should be more than one of all the above keywords allowed and substitutions be attempted using each line, from the top to the bottom, until the first line appears which generates a valid replacement URI.
*cupsMakeExtraURI lsb/usr/hpijs/HP/HP-Fax-hplip.ppd: "hp-makeuri -f @IP@"
This keyword is for multi-function devices. It calls a tool to find out URIs for additional queues, like for example a fax queue. A printer setup tool is supposed to finish the setup of the current print queue and then to create a queue for the URI found here. The CUPS URI for the PPD file for that extra queue is given before the colon.
There can be more than one of these lines. In this case for each succeeding line (except duplicate URIs) one extra queue has to be created.
*cupsExtraURI lsb/usr/hpijs/HP/HP-Fax-hplip.ppd: "s!^hp:!hpfax:!"
On the resulting URI for this print queue (after substitution applying the previous keywords) the given regexp substitution is applied. If the substitution succeeds, the printer setup tool is supposed to create an additional queue with the given PPD file.
What do you think about this PPD extension? This should finally allow to set up printers completely automatically and non-interactively. This should allow Plug'n'Print in all cases and also with multi-function devices.
Till
Mike Sweet does not like this idea. He wrote on the cups.development newsgroup:
---------------------------------------------------------------------------
I think it would lead to an unending stream of compatibility and other problems.
There is no reason for having multiple backends that do the same thing. HP's backend is unnecessary once we use libusb instead of the Linux USB printer character device, and that is going to happen in CUPS 1.4 (and if I understood correctly is already used by several Linux distros). For network printer, HP should be using the socket backend. The canon and epson backends have been removed from Gutenprint. There should be no "hal" backend, either.
In short, once you get rid of the extra unnecessary backends, there is no problem selecting the "right" backend for a PPD. Futhermore, a fundamental design goal of CUPS is that a given CUPS driver MUST work with ANY backend. Drivers that do not work with all backends are by definition broken.
---------------------------------------------------------------------------
Here I would like to hear especially the opinion of the printer manufacturers. Are custom backends really needed? Or would it be possible to make all drivers work with the backends which come with CUPS?
Till
Quoted 88 lines · Till Kamppeter
Hi,
currently, it is no problem any more to determine which model a connected printer is and to find the correct PPD/driver for it. The bigger problem is to use the correct backend automatically if the driver comes with its own backend. Examples for such drivers are Gutenprint and HPLIP. The "canon" and "epson" backends for Gutenprint are usually not used and this does not restrict anything on normal printing. They only allow printer maintenance "through the print queue" by sending special commands. But for HPLIP the "hp" and "hpfax" backends are very important. The first allows printing with bi-directional functionality (HPLIP needs this also for border-less printing) and the second allows faxing on HP's multi-function devices.
The list of auto-detected printers in a printer setup tool is the equivalent of the output of "lpinfo -v":
------------------------------------------------------------------------
till@till-laptop:~/printing/foomatic/foomatic-db-hpijs$ lpinfo -v network socket network beh direct hal:///org/freedesktop/Hal/devices/usb_device_3f0_3517_00CNMJP81545_if0_printer_noserialnetwork socket://192.168.2.34
network ipp://fe80::21d:60ff:fe48:c2d7:631/printers/SanFranciscoFax
network socket://192.168.2.29
direct hpfax:/usb/HP_LaserJet_3390?serial=00CNMJP81545
direct usb://HP/LaserJet%203390
direct hp:/usb/HP_LaserJet_3390?serial=00CNMJP81545
direct hal:///org/freedesktop/Hal/devices/usb_device_3f0_2812_CN7BU18154_if0_printer_CN7BU18154direct usb://HP/Officejet%20H470?serial=CN7BU18154
direct hp:/usb/Officejet_H470?serial=CN7BU18154
network socket://192.168.2.35
direct hal:///org/freedesktop/Hal/devices/usb_device_3f0_bd02_MY7143104604C1_if0_printer_MY7143104604C1network socket://192.168.2.30
direct usb://HP/Photosmart%20Pro%20B9100%20series?serial=MY7143104604C1 direct hp:/usb/Photosmart_Pro_B9100_series?serial=MY7143104604C1 network http
network ipp
network lpd
network bluetooth://001A0E1769AA
file cups-pdf:/
direct scsi
network smb till@till-laptop:~/printing/foomatic/foomatic-db-hpijs$
------------------------------------------------------------------------You see already that several printers get detected three times, first by the "hal" backend, second by "usb" and third by "hp". Users of a GUI- or web-based printer setup tool will see the model name of their printer three times and are completely confused what they should choose. So only a few will choose the "hp" backend and so will be able to print borderless or use the hp-toolbox.
A method which I have applied twice (printerdrake and system-config-printer) is to add explicit support for backends supplied with the driver. Therefore at least these two backends select the "hp" backend automatically (and even suppress the superfluous entries in the list of detected printers). This works fine at least for drivers which are common enough and existed before the release of the printer setup tool in use. Some authors also give no special support for third-party software in general.
So one needs a method to auto-select the best backend for a printer. As all information about each supported printer model is supplied to CUPS by a PPD file for the printer, the most obvious place for information about the preferred backend is the PPD file.
Therefore I suggest the following PPD extensions:
*cupsPreferBackend: "hp"
This entry simply recommends a backend. In this case a printer setup tool should look for full URIs of this backend in the output of "lpinfo
-l -v" and compares make-and-model and device ID entries with the ones
of the URI which the user has chosen. If both the user-chosen URI qnd the URI found as replacement have the printer's serial number or IP, they must match. URIs with serial number or IP should never be replaced by URIs with another serial number or IP.*cupsPreferBackend usb,parallel,hal: "hp"
This is a modifier for all keywords listed here. It estricts the application of the backend selection rule to the case when the URI selected by the user uses one of the listed backends, in this example the printer setup tool should only try to use the "hp" backend if the user has selected an URI for the "usb", "parallel", or "hal" backend.
*cupsReplaceURI: "usb://HP/LaserJet(_|%20)42\d\d hp:/usb/HP_LaserJet_42\d\d"
Here we do not use model info from the "lpinfo -l -v" output. The printer setup tool should match the first regexp against the user-chosen URI and the search the "lpinfo -v" output for an URI matching the second regexp. In this case the user-chosen URI gets relaced. Serial numbers and IPs have to get checked here, too, as with the *cupsPreferBackend keyword.
*cupsMakeURI: "hp-makeuri -c @IP@"
*cupsMakeURI: "hp-makeuri -c @USB_BUS@:@USB_DEV@"
*cupsMakeURI: "hp-makeuri -c @PARDEV@"*cupsMakeURI: "foojet-geturi @USBDEV@"
*cupsMakeURI: "foojet-geturi @URI@"Some drivers have their own tools to determine the correct URIs for their printers. With these lines a printer setup tool should execute the shown commands, substituting the parameters (@...@) at first. There can be more than one line, and they should be tried from the top to the bottom, until one line produces a valid URI. So if a parameter cannot be substituted because it does not exist, as for example the IP for an USB printer, or if a command gives an error, the next line gets tried. If all lines fail the printer setup tool creates the queue, but it uses the URI chosen by the user.
@URI@ is here the URI chosen by the user, @PARDEV@ is the device file
for the parallel port, like/dev/lp0, @USBDEV@ is the USB device like/dev/usb/lp0, ...In general there should be more than one of all the above keywords allowed and substitutions be attempted using each line, from the top to the bottom, until the first line appears which generates a valid replacement URI.
*cupsMakeExtraURI lsb/usr/hpijs/HP/HP-Fax-hplip.ppd: "hp-makeuri -f @IP@"
This keyword is for multi-function devices. It calls a tool to find out URIs for additional queues, like for example a fax queue. A printer setup tool is supposed to finish the setup of the current print queue and then to create a queue for the URI found here. The CUPS URI for the PPD file for that extra queue is given before the colon.
There can be more than one of these lines. In this case for each succeeding line (except duplicate URIs) one extra queue has to be created.
*cupsExtraURI lsb/usr/hpijs/HP/HP-Fax-hplip.ppd: "s!^hp:!hpfax:!"
On the resulting URI for this print queue (after substitution applying the previous keywords) the given regexp substitution is applied. If the substitution succeeds, the printer setup tool is supposed to create an additional queue with the given PPD file.
What do you think about this PPD extension? This should finally allow to set up printers completely automatically and non-interactively. This should allow Plug'n'Print in all cases and also with multi-function devices.
Till
A message that is not in the archive (sent off-list or not yet received): 4665C7B0F1146045A32E6AA72D0D62D741A40F26@G3W0634.americas.hpqcorp.net
Quoted 4 lines · David
Hi,
I agree there are too many backends for the same printer. In our case I would like to see only one backend selection for HP printers.
It would be great to have only one backend per connection type, but it seems that printers have a lot of functionality which use manufacturer-specific low-level protocols and for that the manufacturers want to create their own backends. Manufacturers also work around hardware/firmware bugs by the software, which could also lead to a new backend.
Quoted 1 line
I would consider using the Mike's "usb" backend if it meets our needs. We need a backend that provides printing and status over various types of IO (ie: raw, 1284.4 and MLC). The IO can be very manufacturer and product specific and I don't see how the current "usb" backend can provide this functionality.
Here I can imagine that Mike Sweet has no problems to provide raw and 1284.4 access with his backend, but AFAIK MLC is HP-specific and as far as I know Mike, he would not implement that.
For me this situation would mean that we need backend hinting in the PPDs.
Quoted 5 lines
I have looked at cups-1.4svn-r7679-source.tar.gz and I don't see the libusb support in the "usb" backend am I missing something?
Even if we cannot use Mike's "usb" backend I would greatly appreciate the libusb support. Right now
hal_lpadminis a pain because it does not understand backends that do not use usblp.
This is not hal_lpadmin (I am one of the upstream developers), it is HAL itself. HAL gives printer add and remove signals depending on signals from the usblp kernel module, it will not recognize printers at all if one would move the module away. HAL needs a printer recognition which works without the usblp module.
Quoted 2 lines
In FC9
hal_lpadmincan turn a print queue off when usblp is removed because it assumes the printer is off line. The user has to manually restart the queue in order to print.
As a workaround I have excluded HP printers from being disabled by hal_lpadmin when they are turned off.
Till
A message that is not in the archive (sent off-list or not yet received): 200806231052.m5NAqQp7031706@dsl092-065-009.bos1.dsl.speakeasy.net
Quoted 6 lines · Robert Krawitz
This problem's not restricted to HP printers -- I have the same problem with Epson printers. If I turn the printer off, the queue gets disabled, and then I have to manually re-enable the queue when I turn the printer back on. This is with OpenSUSE 10.3.
The queues are supposed to get turned back on when reconnecting the printer.
Till
Quoted 9 lines · Till Kamppeter
Quoted 6 lines · Robert Krawitz
This problem's not restricted to HP printers -- I have the same problem with Epson printers. If I turn the printer off, the queue gets disabled, and then I have to manually re-enable the queue when I turn the printer back on. This is with OpenSUSE 10.3.
The queues are supposed to get turned back on when reconnecting the printer.
I know that we got a bugzilla on this topic for 10.3.
But I'm sorry, I don't know, if it has been dealt. I'm not the author nor the responsible manager here.
But you can get the information, if you search at our bugzilla for this entry:
https://bugzilla.novell.com
I can tell you, that we released a bugfix for "cups-autoconf" in the past for 10.3. - Maybe you just want to update your system?
Regards,
Klaus.
Signature · 4 lines
Klaus Singvogel - Maxfeldstr. 5 - 90409 Nuernberg - Germany Phone: +49-911-74053-0 GnuPG-Key-ID: 1024R/5068792D 1994-06-27 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 200806231111.m5NBB7eO031799@dsl092-065-009.bos1.dsl.speakeasy.net
Does SUSE really use the hal-cups-utils? They require system-config-printer and AFAIK this is not available on SUSE.
Till
Quoted 38 lines · Robert Krawitz
From: Tim Waugh <[email protected]>
Date: Mon, 23 Jun 2008 12:02:53 +0100Quoted 4 lines · Robert Krawitz
This problem's not restricted to HP printers -- I have the same problem with Epson printers. If I turn the printer off, the queue gets disabled, and then I have to manually re-enable the queue when I turn the printer back on. This is with OpenSUSE 10.3.
Which version of hal-cups-utils?
This is all I can find. It may have been an unwarranted guess on my part that hal is responsible for this, but the effect is still there.
[1(rlk)|{!55}<dsl092-065-009>/home/rlk/sandbox/print-5.1/src/testpattern]
$ rpm -qa |grep cups libgnomecups-lang-0.2.3-53.1 cups-devel-1.2.12-22.15 gnome-cups-manager-0.32cvs20060120-169.2 libgnomecups-devel-0.2.3-53.1 cups-client-1.2.12-22.15 gnome-cups-manager-devel-0.32cvs20060120-169.2 cups-libs-1.2.12-22.15 cupsddk-1.2.0-27 cups-autoconfig-0.1.0-27.2 rpmkey-apcupsd-0.1-2 cups-backends-1.0-126 libgnomecups-0.2.3-53.1 cups-drivers-1.2.12-28 cups-1.2.12-22.15 [1(rlk)|{!56}<dsl092-065-009>/home/rlk/sandbox/print-5.1/src/testpattern] $ rpm -qa |grep hal hal-palm-0.12.2-64.20 phalanx-22-583 hal-0.5.9_git20070831-13.2 hal-devel-0.5.9_git20070831-13.2 hal-resmgr-0.1_SVNr141-29
Hello,
SUSE is using "cups-autoconfig" for automatic configuration of printers when a plug-in event in hal occurs. It's not "hal-cups-utils", it's a new tool, which got developed in-house.
I didn't get the full thread on this mailing-list, so I don't know, if already answered. So I hope nobody minds if I repeat the same answer.
Regards,
Klaus.
Quoted 49 lines · Till Kamppeter
Does SUSE really use the hal-cups-utils? They require system-config-printer and AFAIK this is not available on SUSE.
Till
Quoted 29 lines · Robert Krawitz
From: Tim Waugh <[email protected]>
Date: Mon, 23 Jun 2008 12:02:53 +0100Quoted 4 lines · Robert Krawitz
This problem's not restricted to HP printers -- I have the same problem with Epson printers. If I turn the printer off, the queue gets disabled, and then I have to manually re-enable the queue when I turn the printer back on. This is with OpenSUSE 10.3.
Which version of hal-cups-utils?
This is all I can find. It may have been an unwarranted guess on my part that hal is responsible for this, but the effect is still there.
[1(rlk)|{!55}<dsl092-065-009>/home/rlk/sandbox/print-5.1/src/testpattern]
$ rpm -qa |grep cups libgnomecups-lang-0.2.3-53.1 cups-devel-1.2.12-22.15 gnome-cups-manager-0.32cvs20060120-169.2 libgnomecups-devel-0.2.3-53.1 cups-client-1.2.12-22.15 gnome-cups-manager-devel-0.32cvs20060120-169.2 cups-libs-1.2.12-22.15 cupsddk-1.2.0-27 cups-autoconfig-0.1.0-27.2 rpmkey-apcupsd-0.1-2 cups-backends-1.0-126 libgnomecups-0.2.3-53.1 cups-drivers-1.2.12-28Quoted 9 lines
cups-1.2.12-22.15 [1(rlk)|{!56}<dsl092-065-009>/home/rlk/sandbox/print-5.1/src/testpattern] $ rpm -qa |grep hal hal-palm-0.12.2-64.20 phalanx-22-583 hal-0.5.9_git20070831-13.2 hal-devel-0.5.9_git20070831-13.2 hal-resmgr-0.1_SVNr141-29_______________________________________________
Printing-architecture mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/printing-architecture
Signature · 4 lines
Klaus Singvogel - Maxfeldstr. 5 - 90409 Nuernberg - Germany Phone: +49-911-74053-0 GnuPG-Key-ID: 1024R/5068792D 1994-06-27 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
A message that is not in the archive (sent off-list or not yet received): 200806211529.m5LFTs8h007154@dsl092-065-009.bos1.dsl.speakeasy.net
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 10 lines · David Rosky
Why does HPLIP need to talk to the printer to do borderless printing? Is it to verify the paper size that's actually in the printer? If so, you could either trust the paper size the user specifies.
Some drivers don't want to allow borderless printing if a certain *type* of paper isn't loaded (e.g., photo paper). Perhaps HPLIP is checking that. Personally, however, I'd be in favor of trusting the user, as has generally been the gutenprint philosophy.
There are some printers which do borderless only for 5x7-inch-photos and smaller and some do no borderless at all, but all the rest of the communication protocol of these printers is the same as for the full-borderless models. For me it seems that the driver asks the printer which borderless type it is (and perhaps even also the loaded paper size) to not make the printer with a borderless job sent when the printer is not capable to print it borderless. Am I correct, Dave?
Till
A message that is not in the archive (sent off-list or not yet received): 200806231050.m5NAoRxO031694@dsl092-065-009.bos1.dsl.speakeasy.net
Quoted 4 lines · Robert Krawitz
That implies that the driver is trying to double check what the user specified -- the user already has to specify the paper size and media type. Things shouldn't fail if the driver's not able to verify this.
Dave, Shiyun, as you are using CUPS DDK now to generate PPDs, you should introduce option conflicts/UI constraints in the PPDs to avoid borderless printing on unsuitable paper sizes.
Till
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 8 lines · Michael R Sweet
Quoted 6 lines · David
...
I would consider using the Mike's "usb" backend if it meets our needs. We need a backend that provides printing and status over various types of IO (ie: raw, 1284.4 and MLC). The IO can be very manufacturer and product specific and I don't see how the current "usb" backend can provide this functionality.
Quoted 8 lines
Our current focus is on supporting libusb; if necessary, we can add a side-channel request to set the IO mode, but otherwise I suspect we can use the default mode supported by the device.
We already support a variety of side-channel data - 1284 device ID, centronics bits, bidirectional support, SNMP OIDs (for network printers), etc.
Will this really cover all manufacturer-specific access methods?
Quoted 8 lines
Quoted 2 lines
I have looked at cups-1.4svn-r7679-source.tar.gz and I don't see the libusb support in the "usb" backend am I missing something?
libusb support is part of STR #1575, which hasn't been merged to trunk yet:
http://www.cups.org/str.php?L1575
Will it be merged for CUPS 1.4?
Till
Till,
Till Kamppeter wrote:
[...]
Quoted 7 lines
*cupsReplaceURI: "usb://HP/LaserJet(_|%20)42\d\d hp:/usb/HP_LaserJet_42\d\d"
Here we do not use model info from the "lpinfo -l -v" output. The printer setup tool should match the first regexp against the user-chosen URI and the search the "lpinfo -v" output for an URI matching the second regexp.
This is not regex, it's perl extended regex you're using here. Maybe we run into trouble, if we extend CUPS tools by perl too.
We might want to use POSIX regex please, as defined in regex(7)?
I think, the rest of the discussion has to be answered by the author of "lpinfo" (= CUPS team). It's fine with me, if we extend CUPS in such a way.
Regards,
Klaus.
Signature · 4 lines
Klaus Singvogel - Maxfeldstr. 5 - 90409 Nuernberg - Germany Phone: +49-911-74053-0 GnuPG-Key-ID: 1024R/5068792D 1994-06-27 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)
Quoted 4 lines · Klaus Singvogel
Till,
Till Kamppeter wrote:
[...]
Quoted 9 lines
Quoted 3 lines
*cupsReplaceURI: "usb://HP/LaserJet(_|%20)42\d\d hp:/usb/HP_LaserJet_42\d\d"
Here we do not use model info from the "lpinfo -l -v" output. The printer setup tool should match the first regexp against the user-chosen URI and the search the "lpinfo -v" output for an URI matching the second regexp.
This is not regex, it's perl extended regex you're using here. Maybe we run into trouble, if we extend CUPS tools by perl too.
We might want to use POSIX regex please, as defined in regex(7)?
Sorry for giving a bad example. All this was only a suggestion and not a spec. But I hope it shows the idea.
Quoted 3 lines
I think, the rest of the discussion has to be answered by the author of "lpinfo" (= CUPS team). It's fine with me, if we extend CUPS in such a way.
They answered already in for them there should be only one backend per printer. They are working with HP now on making the "hp" backend unnecessary.
Till
Quoted 8 lines · Till Kamppeter
Quoted 3 lines · Klaus Singvogel
We might want to use POSIX regex please, as defined in regex(7)?
Sorry for giving a bad example. All this was only a suggestion and not a
spec. But I hope it shows the idea.
I see.
Till, thanks for clarification.
Regards,
Klaus.
Signature · 4 lines
Klaus Singvogel - Maxfeldstr. 5 - 90409 Nuernberg - Germany Phone: +49-911-74053-0 GnuPG-Key-ID: 1024R/5068792D 1994-06-27 SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg)