Re: Setting up a postscript printer
David Wright wrote:
>Quoting Oliver Elphick (olly@lfix.co.uk):
>> >What's the difference b/w "lpr foo.txt" and "lpr -P lp foo.txt" ?
>> >
>> There is no difference, so long as lp is the first printer defined in
>> /etc/printcap. -P is needed to address any printer apart from the default
>.
>
>And what happens if lp is not the first, or is not defined at all
>in /etc/printcap ?
>
>(I ask because the behaviour of lpr (package as well as command)
>is not like that. You need lp to be defined with either style of
>command. Otherwise, lpr: lp: unknown printer)
I was not aware of that. Which spool package is this? (lpr, lprng?)
The man page for lpr (from lprng) says:
-P printer
By default, the destination printer is taken from the
command line dest value, then the environment vari
ables PRINTER, LPDEST, NPRINTER, NGPRINTER, then
first entry in the printcap information, and and
finally the default_printer entry from the configura
tion file, and then the compile time default.
If none of those variables is defined and you have a /etc/printcap, the
behaviour you are seeing would be a bug in lprng.
--
Oliver Elphick Oliver.Elphick@lfix.co.uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47 6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Be of good courage, and he shall strengthen your
heart, all ye that hope in the LORD."
Psalms 31:24
Reply to: