[opensuse] Managing PPD options via lpadmin
Hello, I am trying to create a printer and set its options in one go. The man page for lpadmin states that you can set PPD options like this: # lpadmin -p OfficeJet8600 -v socket://printhost.do.main -m hp-ojp8600p.ppd -o DefaultPageSize=A4 Unfortunately, this don't work for me: # grep DefaultPageSize /usr/share/cups/model/hp-ojp8600p.ppd /etc/cups/ppd/OfficeJet8600.ppd /usr/share/cups/model/hp-ojp8600p.ppd:*DefaultPageSize: A4 /etc/cups/ppd/OfficeJet8600.ppd:*DefaultPageSize: Letter As we can see, the "-o DefaultPageSize=A4" ist not only ignored. The correct value that is stored in the model source file will be overwtitten by the wrong value "Letter" Why that? Any ideas? This is Opensuse Leap. -- Josef Wolf jw@raven.inka.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 01/11/2017 03:40 PM, Josef Wolf wrote:
Unfortunately, this don't work for me:
# grep DefaultPageSize /usr/share/cups/model/hp-ojp8600p.ppd /etc/cups/ppd/OfficeJet8600.ppd /usr/share/cups/model/hp-ojp8600p.ppd:*DefaultPageSize: A4 /etc/cups/ppd/OfficeJet8600.ppd:*DefaultPageSize: Letter
As we can see, the "-o DefaultPageSize=A4" ist not only ignored. The correct value that is stored in the model source file will be overwtitten by the wrong value "Letter"
Why that? Any ideas?
This is Opensuse Leap.
Josef, I ran into a similar problem with leap 42.2 configuring my printers. I generally do all configuration from the command line as you attempted (with lpinfo, lpadmin, lpoptions, etc). There seemed to be a problem providing the ppd file using the syntax returned by 'lpinfo -m' and the format wanted by 'lpadmin ... -m ppd file'. I didn't look into it further, I just tried yast, and made the same selections in yast I did from the cli, but it worked following yast. There is some issue somewhere in the process on leap. I did the exacts same thing (same printer, etc..) in arch with lpadmin and had no problems. So have you given yast a try yet for the printer config? If I get time I'll look into this further. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Thanks for the answer, David! On Do, Jan 12, 2017 at 01:17:58 -0600, David C. Rankin wrote:
On 01/11/2017 03:40 PM, Josef Wolf wrote:
As we can see, the "-o DefaultPageSize=A4" ist not only ignored. The correct value that is stored in the model source file will be overwtitten by the wrong value "Letter"
I ran into a similar problem with leap 42.2 configuring my printers. I generally do all configuration from the command line as you attempted (with lpinfo, lpadmin, lpoptions, etc). There seemed to be a problem providing the ppd file using the syntax returned by 'lpinfo -m' and the format wanted by 'lpadmin ... -m ppd file'.
I tried to omit the -m option (and -v also). I also tried the -P option. Then I tried to add/remove the -E option. But all that did not help. Same result.
So have you given yast a try yet for the printer config? If I get time I'll look into this further.
I have not tried yast, but the web-browser-based "printer configuration tool" that can be started from the KDE menu works just fine. But this is no option for me. I generally configure all aspects of all of my computers with an automated system (similar to cfengine). Thus, I need a way to do it without any interactive adjustments. -- Josef Wolf jw@raven.inka.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-01-12 08:52, Josef Wolf wrote:
But this is no option for me. I generally configure all aspects of all of my computers with an automated system (similar to cfengine). Thus, I need a way to do it without any interactive adjustments.
Would simply copy the ppd file work? -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Yes, that would work as a workaround. But I hesitate to bypass the official mechanisms. On Thu, Jan 12, 2017 at 01:00:56PM +0100, Carlos E. R. wrote:
On 2017-01-12 08:52, Josef Wolf wrote:
But this is no option for me. I generally configure all aspects of all of my computers with an automated system (similar to cfengine). Thus, I need a way to do it without any interactive adjustments.
Would simply copy the ppd file work?
-- Cheers / Saludos,
Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
-- Josef Wolf jw@raven.inka.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-01-12 13:22, Josef Wolf wrote:
Would simply copy the ppd file work?
Yes, that would work as a workaround. But I hesitate to bypass the official mechanisms.
Well, try to create the proper config file "officially", then apply your own file. Best of both worlds :-) Meanwhile, report in Bugzilla what is going on. Maybe there is a bug or solution somewhere. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
Am Mittwoch, 11. Januar 2017, 22:40:24 CET schrieb Josef Wolf:
[...] I am trying to create a printer and set its options in one go. The man page for lpadmin states that you can set PPD options like this:
# lpadmin -p OfficeJet8600 -v socket://printhost.do.main -m hp-ojp8600p.ppd -o DefaultPageSize=A4
Does "-o PageSize=A4" work?
[...] Why that? Any ideas?
| There is no such thing as "THE" default paper size. | [...] | Furthermore the cupsd (which actually writes the config files when a print queue is set up) | sets the "DefaultPageSize" value in /etc/cups/ppd/<queue_name>.ppd according to cupsd's | "locale" setting. [...] https://en.opensuse.org/SDB:Print_Settings_with_CUPS#Different_default_paper... The whole wiki article is worth reading. Gruß Jan -- A wish is a desire without an attempt. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Carlos E. R.
-
David C. Rankin
-
Jan Ritzerfeld
-
Josef Wolf