[opensuse-autoinstall] Printer config with autoyast
On all my OpenSuse 11.4 client installed with Autoyast I have some trouble with printers. Applications like evince or firefox cannot understand printers options. Ex: I'm unable to set two-sided printing from these applications, the two-sided menu is greyed, the paper format is not set to A4 but to letter.. etc. Printers are set with these lines in my autoyast file: <scripts> <post-scripts config:type="list"> <script> <debug config:type="boolean">true</debug> <filename>imprimantes</filename> <network_needed config:type="boolean">true</network_needed> <notification>Please wait while setting up printers ...</notification> <interpreter>shell</interpreter> <source><![CDATA[ #!/bin/sh service cups start service cups status lpadmin -p laser5M -m manufacturer-PPDs/hplip/hp-laserjet_4050_series-ps.ppd.gz -u allow:all -L "Salle A116" -v socket://batA1-most1.hmg.inpg.fr:9100 -E lpoptions -d laser5M -o PageSize=A4 -o HPOption_Duplexer=True -o InstalledMemory=36MB -o HPOption_Tray3=True -o HPOption_Disk=HardDisk -o Duplex=DuplexNoTumble -o HPOption_PaperPolicy=NearestSizeAdjust lpadmin -p color -m manufacturer-PPDs/hplip/hp-color_laserjet_cp2025n-ps.ppd.gz -u allow:all -L "Salle A106" -v socket://batA1-most-color.hmg.inpg.fr:9100 -E lpoptions -p color -o PageSize=A4 -o HPOption_Duplexer=True -o Duplex=DuplexNoTumble -o HPBookletPageSize=A4 -o HPManualDuplexSwitch=True ]]> </source> </script> </post-scripts> </scripts> Runing "lpoptions -p laser5M -l" on these Autoyast configured PC and mine installed from OpenSuse DVD do not show any difference, they all have PageSize/Page Size: Letter LetterSmall Executive Legal LegalSmall *A4 A4Small A5 B5 w612h935 ..... HPOption_Duplexer/Duplex Unit: *True False HPOption_PaperPolicy/Fit to Page: PromptUser *NearestSizeAdjust NearestSizeNoAdjust Duplex/2-Sided Printing: None *DuplexNoTumble DuplexTumble Any idea about this strange behavior with autoyast configured boxes ? Thanks Partrick -- =============================================================== | Equipe M.O.S.T. | http://most.hmg.inpg.fr | | Patrick BEGOU | ------------ | | LEGI | mailto:Patrick.Begou@hmg.inpg.fr | | BP 53 X | Tel 04 76 82 51 35 | | 38041 GRENOBLE CEDEX | Fax 04 76 82 52 71 | =============================================================== -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
On 08.02.2012 15:26, Patrick Begou wrote:
On all my OpenSuse 11.4 client installed with Autoyast I have some trouble with printers.
you don't see that with a manual installation? Maybe this helps: http://en.opensuse.org/SDB:Print_Settings_with_CUPS but I don't know. I have no clue about printers but I don't expect it to be an autoyast problem. -- ciao, Uwe Gansert SUSE LINUX Products GmbH, HRB 16746 (AG Nürnberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer Home: http://www.suse.de/~ug - Blog: http://suse.gansert.net listening to: "Remember" by mind.in.a.box -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Hello, On Feb 9 10:34 Uwe Gansert wrote:
On 08.02.2012 15:26, Patrick Begou wrote:
On all my OpenSuse 11.4 client installed with Autoyast I have some trouble with printers.
you don't see that with a manual installation? Maybe this helps: http://en.opensuse.org/SDB:Print_Settings_with_CUPS but I don't know. I have no clue about printers but I don't expect it to be an autoyast problem.
I like to provide some background information why I think it is not an issue in AutoYaST and probably also not an issue in CUPS but an issue in the particular applications. On 08.02.2012 15:26, Patrick Begou wrote:
Applications like evince or firefox cannot understand printers options. Ex: I'm unable to set two-sided printing from these applications, the two-sided menu is greyed, the paper format is not set to A4 but to letter.. etc. ... Runing "lpoptions -p laser5M -l" ... PageSize/Page Size: Letter ... *A4 A4Small HPOption_Duplexer/Duplex Unit: *True False ... Duplex/2-Sided Printing: None *DuplexNoTumble DuplexTumble
From what you wrote I assume it works with other applications. Does the printing menue work in other applications? In particular applications which do not use Gnome/Gtk printing. Perhaps only the Gnome/Gtk printing dialog has the issue? E.g. you may try the Adobe Reader (acroread).
In particular when printing with the defaults works from the commandline e.g. print the 2-pages yast2-printer testpage with $ lp -d laser5M /usr/share/YaST2/data/testprint.2pages.ps I assume the printout is on A4 paper in "DuplexNoTumble" mode. If this is true, the print-queues are set up correctly for CUPS and then the issue is "something inside" the applications, see http://en.opensuse.org/SDB:Print_Settings_with_CUPS ------------------------------------------------------------ There is no such thing as "THE" default settings for a print queue. ------------------------------------------------------------ Alternatively - only a guess - it might be related to https://bugzilla.novell.com/show_bug.cgi?id=732442 I.e. check if the printing output of evince and firefox is PostScript or PDF. To do this, disable printing for the print queue # cupsdisable laser5M and print from those applications. Then check the print spool data files /var/spool/cups/d<job-number>-<file-number> if it is PostScript or PDF. Afterwards you can re-enable printing for the print queue # cupsenable laser5M Kind Regards Johannes Meixner -- SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Thanks Johannes and Uwe for these very usefull informations. Indeed, the problem is not directly an autoyast problem, it is autoyast related as with autoyast I have to create printers from command line instead of yast GUI. The problem was that I haven't fully understood cups behavior. Applications like firefox, evince.... seam to rely on the /etc/cups/ppd/<queue-name>.ppd file for selecting printing options. The lpadmin command is used to set correct values for the queue and the result is stored in this file. I was using lpadmin to create the queue but I was also using lpoptions command to specify some behavior (paper size, duplex....). This last command modify /etc/cups/lpotions file where these informations are also stored but nor firefox nor evince seams to rely on this file. With autoyast the solution is to create printers and set options only with the lpadmin command. For a HP laserjet 4050, the printer is created with: ........... <scripts> <post-scripts config:type="list"> <script> <debug config:type="boolean">true</debug> <filename>imprimantes</filename> <network_needed config:type="boolean">true</network_needed> <interpreter>shell</interpreter> <source><![CDATA[ #!/bin/sh service cups start sleep 5 service cups status lpadmin -p laser5M -m manufacturer-PPDs/hplip/hp-laserjet_4050_series-ps.ppd.gz -u allow:all -L "Salle A116" -v socket://batA1-most1.hmg.inpg.fr:9100 -E lpadmin -p laser5M -o PageSize=A4 -o HPOption_Duplexer=True -o Duplex=DuplexNoTumble -o InstalledMemory=36MB -o HPOption_Tray3=True -o HPOption_Disk=HardDisk -o HPOption_PaperPolicy=NearestSizeAdjust -o HPBookletPageSize=A4 lpadmin -d laser5M ]]> </source> </script> </post-scripts> </scripts> ......... 1) starts cups if it is not running 2) lpadmin create the queue 3) lpadmin sets the options for this queue (duplex, A4, hard disk, memory....) 4) lpadmin sets this queue as default and lpoptions is not used at all. Thanks for your usefull advices. Patrick -- =============================================================== | Equipe M.O.S.T. | http://most.hmg.inpg.fr | | Patrick BEGOU | ------------ | | LEGI | mailto:Patrick.Begou@hmg.inpg.fr | | BP 53 X | Tel 04 76 82 51 35 | | 38041 GRENOBLE CEDEX | Fax 04 76 82 52 71 | =============================================================== -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Hello, On Feb 10 16:35 Patrick Begou wrote (excerpt):
Applications like firefox, evince.... seam to rely on the /etc/cups/ppd/<queue-name>.ppd file for selecting printing options. The lpadmin command is used to set correct values for the queue and the result is stored in this file. I was using lpadmin to create the queue but I was also using lpoptions command to specify some behavior (paper size, duplex....). This last command modify /etc/cups/lpotions file where these informations are also stored but nor firefox nor evince seams to rely on this file.
FYI, regarding other kind of unexpected behaviour when /etc/cups/lpoptions exists you may have a look at http://en.opensuse.org/SDB:Print_Settings_with_CUPS in particular: --------------------------------------------------------------------- Suggestion for Keeping an Overview Do not define general presettings separately on each machine. Set the default values in the PPD file: * If possible, do not use any /etc/cups/lpoptions files. * If possible, do not execute the command "lpoptions" as "root" on each machine. Instead, execute the command "lpadmin" on the CUPS server. --------------------------------------------------------------------- Kind Regards Johannes Meixner -- SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
participants (3)
-
Johannes Meixner
-
Patrick Begou
-
Uwe Gansert