cancel
Showing results for 
Search instead for 
Did you mean: 

Modify printcap settings

Jim_beam
Occasional Contributor

Modify printcap settings

How do i set that printing to this print queue specifically goes to tray2 in /etc/printcap?

abc12b :
:tc=.jetdirect_hp5si
:cm=HP LaserJet 8150DN
:lp=abc12%9100
5 REPLIES
Shibin_2
Honored Contributor

Re: Modify printcap settings

Is this HP-UX or Tru64 ?

You can choose the tray with lp command.

#lp -d -otrayX

where X is the tray number.
Regards
Shibin
Jim_beam
Occasional Contributor

Re: Modify printcap settings

The server is running LPRNG. I can run the below command and it works. How do i change it in /etc/printcap permanently to always print from tray2?


banner "test" | lpr -Pabc12b -Z intray2

Shibin_2
Honored Contributor

Re: Modify printcap settings

I don't know anything about lprng. But the below links may be helpful.

http://www.lprng.com/

http://www.lprng.com/PrintingCookbook/index.html
Regards
Shibin
Jim_beam
Occasional Contributor

Re: Modify printcap settings

Is the below setting in printcap corret and do i need to ifhp?
abc12b:
:tc=.jetdirect_hp5si
:cm=HP LaserJet 8150DN
:prefix_z=a4,inmiddle
:append_z=a4,inmiddle
:lp=abc12%9100
Matti_Kurkela
Honored Contributor

Re: Modify printcap settings

The prefix_z and append_z options specify options for the filter. So yes, you'll need ifhp (or perhaps your own custom filter) to actually make those options take effect: if no filter is used, those options will not do anything at all.

Normally you'll need only either prefix_z or append_z: you don't have to have both set to the same thing. The options listed in "prefix_z" are added _before_ the -z options user specified in the command line, if any. Respectively, "append_z" options are added _after_ the user-specified options. By choosing either "prefix_z" or "append_z", you can choose whether the specified options are overrideable by the user or not.

MK
MK