[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

/etc/printcap set up

I recently bought an HP Laser Jet 6L and I'm happy to say that it works
beautifully with linux. After a little work I hacked together a perl
script which will print ascii just fine and ghostscript allows me to do
postscript and latex so I'm happy with that.

The problem is I can't get lpr to recognize the filters I want to use. I
know that lpr searches the /etc/printcap file to see how each printer is
setup. Having read the Printing-HOWTO I was under the impression that I
could add the filters I wanted in that file. Currently my /etc/printcap
looks like this

lp|Laser Jet:\

Now the Printing-HOWTO said to add a text filter for just plain lpr'ing,
that is, a simple command with no options, like

	lpr myfile.txt

I should add the line


to /etc/printcap and things would work out right. Well I wrote the
filter.txt and tried it (as root) with

	# cat myfile.txt | /etc/filter.txt > /dev/lp0

and things worked out fine. I also tried it with this (as an ordinary

	$ cat myfile.txt | /etc/filter.txt | lpr

and once again things worked out fine (the job was spooled to the printer
and printed out correctly) so I don't think it's a problem with my file
permissions or my script. So when I add the line


to /etc/printcap, all I get is one blank page printed out. So I know the
next question, where did I add the line, well /etc/printcap looks like

lp|Laser Jet:\

So what I'm I doing wrong? I've read both the Printing-HOWTO and the
Printing-Usage-HOWTO and they tell me this should work, but it doesn't.

I would also like to print tex files from lpr by using

	$ lpr -d myfile.dvi

which means I should add



I would also like a script to handle postscript. Currently to print
postscript I have to type

	cat myfile.ps | gs -sDEVICE=ljet4 -sOutputFile=- -dNOPAUSE - | lpr

which works but I'd rather have a script for it that lpr will call with
some command line argument (-p ?) I don't know which one to use.

So I could write a bunch of bash aliases to handle all this, but I'd
rather have lpr do it for me because I thought that was what /etc/printcap
was all about.

Any help would be greatly appreciated.

	- John Kloss

TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .

Reply to: