baslinux AT lists.ibiblio.org
Subject: Baslinux mailing list
List archive
- From: "Peter Expolio" <info.wetware AT lycos.com>
- To: baslinux AT lists.ibiblio.org
- Subject: Re: [BL] printing with lpr
- Date: Wed, 24 Dec 2003 11:31:43 -0500
Hmm, once you've got your translations over and done with, and have more time
to play around with lpr:
One thing worth knowing is that lpd always reads the latest printcap on
bootup. So, if you modify printcap, you need to kill and restart the daemon
in order for the modifications to be interpreted:
ps | grep lpd
kill [pid]
lpd (or /usr/bin/lpd)
I have a similar problem I've been messing around with my HP DJ570c. I can
print from Dos no problem, and I can cat anything to the printer in BL. If
you look into the supplied wp script, this is exactly what it does, cat-ing a
textfile to /dev/lp0 (this is where my physical printer is, to find out
whether to use lp0 or lp1 or lp?, try lsmod, that'll give you a list of the
loaded modules and what they're using). So wp works great if all I need is to
simply dump stuff to the printer, but, unfortunately, I'm also a translator,
and I need to print in ISO Latin1 at least. Wp won't do that for me, so I
started messing around with lpr, printcap, gs, etc.
Now, for a number of reasons, lpr won't work on my system. Maybe it's because
I start the daemon before loading the modules (lpd is in one of my rc.d
files, I insmod lp, parport, parport_pc manually afterwards). Another
possible problem could be the file permissions. Aside from the filter scripts
which need to be chowned and chmoded to be made executable, all files in the
lpr package (lpc, lpq, lpd, lpr, etc.) need to have the appropriate
permissions, and the different hints and HOWTOs I've been looking in all give
me slightly different variations on the standard chmod 775 setup. So, I guess
I'll have to fiddle with that at some stage.
But, to the point, I'm being very calm because my printing problems were
solved almost mysteriously. Since cat worked, I knew the problem was
somewhere between the printcap listing, lpr, and the filters. Now, after
having installed gs and its fonts, and while preparing a postscript filter, I
decided to try it out _separately_ from lpr, just to see if the problem was
there. You can do this with:
filter < filename.ps > /dev/lp0
and it printed seamlessly. Note that this was a Postscript filter, and the
file had to be a ps file. Depending on the filter, you would use a different
file format. Also, your printer might be at a different lp?.
So, now I edit text files with vim, I convert them to ps with enscript,
preview them with gv if I feel I need to, and print them out with the
postscript filter bash script. I open .doc files with AbiWord, or sometimes
simply antiword them (yes, it works fantastically), work on the pure text
output, then export to .doc with Abiword or to .rtf with Ted (although
Abiword does that quite well, too).
Now, from what you - Keesan - mention, on your setup even the cat command
won't bump to the printer, which sounds worrying. It could be because the
printer would not accept raw input. If you use lpr, try lpq, or lpc status to
see if the job actually gets queued. And, in any case, try this filter trick,
it might just work.
Btw, the Printing- and Printing-Usage-HOWTOS (http://www.tldp.org) are fairly
useful. Whatever anyone does, have a good read through them first. Or later.
Dunno. I like reading Linux docs, they're fun. Especially if you haven't got
any serious problem or you don't need to hand in something like, within three
or four hours...
Best
Kamen
____________________________________________________________
Get advanced SPAM filtering on Webmail or POP Mail ... Get Lycos Mail!
http://login.mail.lycos.com/r/referral?aid=27005
-
Re: [BL] printing with lpr,
Peter Expolio, 12/24/2003
-
Re: [BL] printing with lpr,
3aoo-cvfd, 12/24/2003
- Re: [BL] printing with lpr, Sindi Keesan, 12/24/2003
- <Possible follow-up(s)>
- Re: [BL] printing with lpr, Peter Expolio, 12/24/2003
-
Re: [BL] printing with lpr,
3aoo-cvfd, 12/24/2003
Archive powered by MHonArc 2.6.24.