Duplex Printing on the Solaris 10 OSGarrett D'Amore, November 2005 IntroductionI recently upgraded my system to the Solaris 10 OS and was faced with trying to get my printer configured so that I could print two-sided output to it. The printer I'm using is a Brother HL-5170DN, and it works great with the Solaris OS, as it supports PostScript emulation natively, is networked, and even has support for two-sided output. All these features are provided at a price point that makes the device competitive with other personal laser printers. The Solaris 10 OS has nice support for setting this up, but it is, unfortunately, not documented anywhere that I could find. (Fortunately for me, the filters involved were all in readable shell script form, so I could figure this out and pass it on to you.) Initial Setup
First, you have to configure the print queue to use a PostScript Printer Description (PPD), by means of the Solaris OS If the printer does not support PostScript, it will probably not have a PPD from the manufacturer. Then the problem becomes a bit harder, particularly if a PPD for the printer, or a model very close to your printer, is not available. For the moment I'll assume that you have a PPD that works with your printer, either from the Solaris OS installation or from the printer manufacturer.
You will use the # lpadmin -p myprinter \ -v /dev/null -m netstandard_foomatic -o protocol=bsd,dest=laser \ -T PS -I postscript \ -n /usr/local/ppds/br_5170_2.ppd
In the above,
The
The
# lpadmin -p myprinter \
-T PS -I postcript \
-v /dev/ecpp0 -m standard_foomatic \
-n /usr/local/ppds/br_5170_2.ppd
You also need to configure # accept myprinter # enable myprinter TestingHaving done this, you have a printer that is using the PPD, and you can now print duplex pages using the following command syntax: % lp -d myprinter -o sides=two-sided-long-edge somefile.ps You can use short-edge binding as well: % lp -d myprinter -o sides=two-sided-short-edge somefile.ps Finally, you can force single-sided printing: % lp -d myprinter -o sides=one-sided somefile.ps Setting Default Queue Options
OK, all that is nice, but having to specify those options is pretty
annoying if you do this very often. A much simpler solution is to set
the default for this queue, using the % lp -p myprinter -o sides=two-sided-long-edge
Voila! Now you can print just using normal If your printer is networked, you can use this technique to set up different queues with different default options, which I find quite useful: # lpadmin -p laser \ -v /dev/null -m netstandard_foomatic -o protocol=bsd,dest=laser \ -T PS -I postscript \ -n /usr/local/ppds/br_5170_2.ppd # lpadmin -p lduplex \ -v /dev/null -m netstandard_foomatic -o protocol=bsd,dest=laser \ -T PS -I postscript \ -n /usr/local/ppds/br_5170_2.ppd \ -o sides=two-sided-long-edge # lpadmin -p sduplex \ -v /dev/null -m netstandard_foomatic -o protocol=bsd,dest=laser \ -T PS -I postscript \ -n /usr/local/ppds/br_5170_2.ppd \ -o sides=two-sided-short-edge All of the other ordinary printer administration commands work with these queues, too. For example, I have disabled banner pages with this command: # lpadmin -p myprinter -o banner=never Other Options
The foomatic filters also have support for other options, which I have
not fully explored yet. For example, this
-o media=x,y,z
This option can specify the paper size, tray, and type of paper.
-o media=Letter
-o media=Letter,MultiPurpose
-o media=Letter,Transparency
-o media=Letter,MultiPurpose,Transparency
Paper sizes can be one of the following:
Letter, Legal, A4, COM10, DL
Trays are defined by the PPD, but examples might be:
Upper, Lower, MultiPurpose, LargeCapacity
About the AuthorGarrett D'Amore works for Tadpole Computer where he writes device drivers for the Solaris OS and Sun Ray thin clients. He is also the author of a number of freely available software packages, which can be found on his web site: http://garrett.damore.org/.
The information and links on this page have been provided by a BigAdmin user. The submitter is solely responsible for such information and links. Sun is not responsible for the availability of external sites or resources, and does not endorse and is not responsible or liable for any content, advertising, products, or other materials on or available from such sites or resources. Sun will not be responsible or liable, directly or indirectly, for any actual or alleged damage or loss caused by or in connection with use of or reliance on the information posted here, or goods or services available on or through any external site or resource. Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
| |||