Closed GreatBahram closed 5 years ago
There are more problems:
It cannot set the name properly, although so far that I check the code for newprinter.py
everything seems OK but in reality it does not work:
It's quite interesting it download the ppd file from the server and save it in resp
variable but it has not been used anywhere.
https://github.com/zdohnal/system-config-printer/blob/83856b9f4f37fe0df0ec23ced15b6f62109f64e2/newprinter.py#L1444-L1461
As you see it added the printer with default name ('printer'):
import cups
conn = cups.Connect()
conn.getPrinters()
{'printer': {'printer-is-shared': False, # name should be 'HP-P2055'
'printer-state': 3,
'printer-state-message': '',
'printer-state-reasons': ['none'],
'printer-type': 2228230,
'printer-uri-supported': 'ipp://localhost/printers/HP-P2055',
'printer-location': '',
'printer-info': 'HP LaserJet P2055',
'device-uri': 'ipp://192.168.16.206:631/printers/HP-LaserJet-P2055',
'printer-make-and-model': 'Remote Printer'}
And as a consequence I cannot get the ppd
:
>> conn.getServerPPD('printer')
IPPError Traceback (most recent call last)
IPPError: (1030, 'Unable to open "/usr/share/cups/model/printer - No such file or directory')
In #137, I changed the code to use ppd file that already had been download.
I've tested that it seems it works for my problem, now, system-config-printer
uses appropriate drivers (the one that has been downloaded from the server). And Name suggestion has been fixed as well.
@zdohnal
Hi,
There are circumstances that someone shares a printer via cups sharing system.
system-config-printer
is able to detect the printer properly; however, it seems it cannot detect printer make and model correctly. In result, client operating system does not have any idea about printer driver. Firstly, I thought this section was to blame: https://github.com/zdohnal/system-config-printer/blob/83856b9f4f37fe0df0ec23ced15b6f62109f64e2/probe_printer.py#L490-L494