more lpd problems * sigh *

more lpd problems * sigh *

Post by Mike Desjardin » Sat, 08 Jun 1996 04:00:00



all right, i'm not a COMPLETE newbie to Linux... but this is going to
sound pretty lame.  I've been trying for MONTHS to get my Linux box to
print (postcript or text) with no success.  I hope someone out there can
help.

I've got the Slackware 2.3 distribution, 1.2.x kernel.

BTW... I HAVE read the HOWTO... the owner/group permissions are correct.  
(I've tried using both group daemon and lp)

ok. here's the scenario.  I've got an HP540c.  I CAN get this to work
ls > /dev/lp1
staircase effect and all.  so the device should be lp1.

here's my printcap;
-----------------------------------------------------
myprinter|deskjet:\
:lp=/dev/lp1:\
:sd=/usr/spool/lpd/myprinter:\
:lf=/usr/spool/lpd/myprinter/errs:\
:if=/usr/spool/lpd/myprinter/input_filter:\
:mx#0:\
:sh:
-----------------------------------------------------

i've also tried changing the 'if' to 'of', /dev/lp2, and a third printer
name PostScript (don't ask why).  Here's
/usr/spool/lpd/myprinter/input_filer:

-----------------------------------------------------
#!/bin/sh

DEVICE=deskjet
RESOLUTION=300x300
PAPERSIZE=letter
SENDEOF=

nenscript -TUS -ZB -p- |
if [ "$DEVICE" = "PostScript" ]; then
        cat -
else
        gs -q -sDEVICE=$DEVICE \
                -r$RESOLUTION \
                -sPAPERSIZE=$PAPERSIZE \
                -dNOPAUSE \
                -dSAFER \
                -sOutputFile=-
fi

if [ "$SENDEOF" != "" ]; then
        printf "\004"
fi

exit 0
------------------------------------------------
(Borrowed the above from a friend w/ a working deskjet)

NOW, (after all that... sorry!)  when I try to print a postscript file, I
get one page which is almost totally blank (except for a few alphabetic
characters) and then the printer starts printing out the reams of
postscript language.  Thinking that the blank page was causing the file
to be interpreted as ascii text by nenscript (the print job didn't start
w/ a %), I removed the second if statement and tried printing a postcript
file DIRECTLY through gs, but the same thing happened.  (I also tried
removing the first if statement, and replacing the command line
parameters on the gs line from variables to set values)

when I do ps ax, I can see that /etc/lpd is running.

one peculiarity, I've actually got two copies of lpd on my system.  One
in /usr/sbin, and one in /etc.  I've tried various schemes with both and
got pretty much the same results.

The postscript file itself seems ok, I can see it in Ghostview (but
obviously can't print it, as it uses lpr to print!)

ANY SUGGESTIONS AT ALL?  I'm getting really sick of this... I heard
somewhere that the older Slackware distributions have hosed copies of
lpd... should I get a newer one?  Where's the best place to get it
(sunsite?)

Thanks for just READING this long thing... extra thanks if you can help.  
USENET is the only tech support I've got... :)

Mike D

 
 
 

more lpd problems * sigh *

Post by David K. Seyst » Mon, 10 Jun 1996 04:00:00



>all right, i'm not a COMPLETE newbie to Linux... but this is going to
>sound pretty lame.  I've been trying for MONTHS to get my Linux box to
>print (postcript or text) with no success.  I hope someone out there can
>help.

I don't know if this will help but you might want to try installing
either Magicfilter or Apsfilter. Either of these programs simplify
printer setup greatly. I really don't know anything about your
printer but sometimes dip switch settings make a difference too, esp-
ecially those that are used to control LF, CR LF and number of lines
per page. If none of this applies to your situation place it in the
round file and forget I wrote it.

--
David K. Seyster
Slackware (2.3) and others

 
 
 

more lpd problems * sigh *

Post by Tom Ols » Thu, 13 Jun 1996 04:00:00



>all right, i'm not a COMPLETE newbie to Linux... but this is going to
>sound pretty lame.  I've been trying for MONTHS to get my Linux box to
>print (postcript or text) with no success.  I hope someone out there can
>help.
>I've got the Slackware 2.3 distribution, 1.2.x kernel.
>BTW... I HAVE read the HOWTO... the owner/group permissions are correct.  
>(I've tried using both group daemon and lp)
>ok. here's the scenario.  I've got an HP540c.  I CAN get this to work
>ls > /dev/lp1
>staircase effect and all.  so the device should be lp1.
>here's my printcap;
>-----------------------------------------------------
>myprinter|deskjet:\
>:lp=/dev/lp1:\
>:sd=/usr/spool/lpd/myprinter:\
>:lf=/usr/spool/lpd/myprinter/errs:\
>:if=/usr/spool/lpd/myprinter/input_filter:\
>:mx#0:\
>:sh:
>-----------------------------------------------------
>i've also tried changing the 'if' to 'of', /dev/lp2, and a third printer
>name PostScript (don't ask why).  Here's
>/usr/spool/lpd/myprinter/input_filer:
>-----------------------------------------------------
>#!/bin/sh
>DEVICE=deskjet
>RESOLUTION=300x300
>PAPERSIZE=letter
>SENDEOF=
>nenscript -TUS -ZB -p- |
>if [ "$DEVICE" = "PostScript" ]; then
>        cat -
>else
>        gs -q -sDEVICE=$DEVICE \
>                -r$RESOLUTION \
>                -sPAPERSIZE=$PAPERSIZE \
>                -dNOPAUSE \
>                -dSAFER \
>                -sOutputFile=-
>fi
>if [ "$SENDEOF" != "" ]; then
>        printf "\004"
>fi
>exit 0
>------------------------------------------------
>(Borrowed the above from a friend w/ a working deskjet)
>NOW, (after all that... sorry!)  when I try to print a postscript file, I
>get one page which is almost totally blank (except for a few alphabetic
>characters) and then the printer starts printing out the reams of
>postscript language.  Thinking that the blank page was causing the file
>to be interpreted as ascii text by nenscript (the print job didn't start
>w/ a %), I removed the second if statement and tried printing a postcript
>file DIRECTLY through gs, but the same thing happened.  (I also tried
>removing the first if statement, and replacing the command line
>parameters on the gs line from variables to set values)
>when I do ps ax, I can see that /etc/lpd is running.
>one peculiarity, I've actually got two copies of lpd on my system.  One
>in /usr/sbin, and one in /etc.  I've tried various schemes with both and
>got pretty much the same results.
>The postscript file itself seems ok, I can see it in Ghostview (but
>obviously can't print it, as it uses lpr to print!)
>ANY SUGGESTIONS AT ALL?  I'm getting really sick of this... I heard
>somewhere that the older Slackware distributions have hosed copies of
>lpd... should I get a newer one?  Where's the best place to get it
>(sunsite?)
>Thanks for just READING this long thing... extra thanks if you can help.  
>USENET is the only tech support I've got... :)
>Mike D

Mike,

 I've been attacking this same problem for about a month and I get
about the same results as you. Gee, It  would be nice to print via
lpr. I keep banging away at it, maybe I'll figure it out, or get
lucky.


 
 
 

more lpd problems * sigh *

Post by Stephen P. Moln » Fri, 14 Jun 1996 04:00:00


Try Apsfilter



>>all right, i'm not a COMPLETE newbie to Linux... but this is going to
>>sound pretty lame.  I've been trying for MONTHS to get my Linux box to
>>print (postcript or text) with no success.  I hope someone out there can
>>help.

>>I've got the Slackware 2.3 distribution, 1.2.x kernel.

>>BTW... I HAVE read the HOWTO... the owner/group permissions are correct.  
>>(I've tried using both group daemon and lp)

>>ok. here's the scenario.  I've got an HP540c.  I CAN get this to work
>>ls > /dev/lp1
>>staircase effect and all.  so the device should be lp1.

>>here's my printcap;
>>-----------------------------------------------------
>>myprinter|deskjet:\
>>:lp=/dev/lp1:\
>>:sd=/usr/spool/lpd/myprinter:\
>>:lf=/usr/spool/lpd/myprinter/errs:\
>>:if=/usr/spool/lpd/myprinter/input_filter:\
>>:mx#0:\
>>:sh:
>>-----------------------------------------------------

>>i've also tried changing the 'if' to 'of', /dev/lp2, and a third printer
>>name PostScript (don't ask why).  Here's
>>/usr/spool/lpd/myprinter/input_filer:

>>-----------------------------------------------------
>>#!/bin/sh

>>DEVICE=deskjet
>>RESOLUTION=300x300
>>PAPERSIZE=letter
>>SENDEOF=

>>nenscript -TUS -ZB -p- |
>>if [ "$DEVICE" = "PostScript" ]; then
>>        cat -
>>else
>>        gs -q -sDEVICE=$DEVICE \
>>                -r$RESOLUTION \
>>                -sPAPERSIZE=$PAPERSIZE \
>>                -dNOPAUSE \
>>                -dSAFER \
>>                -sOutputFile=-
>>fi

>>if [ "$SENDEOF" != "" ]; then
>>        printf "\004"
>>fi

>>exit 0
>>------------------------------------------------
>>(Borrowed the above from a friend w/ a working deskjet)

>>NOW, (after all that... sorry!)  when I try to print a postscript file, I
>>get one page which is almost totally blank (except for a few alphabetic
>>characters) and then the printer starts printing out the reams of
>>postscript language.  Thinking that the blank page was causing the file
>>to be interpreted as ascii text by nenscript (the print job didn't start
>>w/ a %), I removed the second if statement and tried printing a postcript
>>file DIRECTLY through gs, but the same thing happened.  (I also tried
>>removing the first if statement, and replacing the command line
>>parameters on the gs line from variables to set values)

>>when I do ps ax, I can see that /etc/lpd is running.

>>one peculiarity, I've actually got two copies of lpd on my system.  One
>>in /usr/sbin, and one in /etc.  I've tried various schemes with both and
>>got pretty much the same results.

>>The postscript file itself seems ok, I can see it in Ghostview (but
>>obviously can't print it, as it uses lpr to print!)

>>ANY SUGGESTIONS AT ALL?  I'm getting really sick of this... I heard
>>somewhere that the older Slackware distributions have hosed copies of
>>lpd... should I get a newer one?  Where's the best place to get it
>>(sunsite?)

>>Thanks for just READING this long thing... extra thanks if you can help.  
>>USENET is the only tech support I've got... :)

>>Mike D

>Mike,

> I've been attacking this same problem for about a month and I get
>about the same results as you. Gee, It  would be nice to print via
>lpr. I keep banging away at it, maybe I'll figure it out, or get
>lucky.



---------------------------------------------------------------------
Stephen P. Molnar, Ph.D.                Life is a fuzzy set
Foundation for Chemistry                Multivariant and stochastic
 
 
 

more lpd problems * sigh *

Post by Alan Jum » Fri, 14 Jun 1996 04:00:00



>  I've been attacking this same problem for about a month and I get
> about the same results as you. Gee, It  would be nice to print via
> lpr. I keep banging away at it, maybe I'll figure it out, or get
> lucky.



printer.

If anyone finds out how to set the print filter up correctly, _please_
let us poor souls know...!
....We all speak well of a Bridge that carries us over...
73 de N5ILN

 
 
 

more lpd problems * sigh *

Post by Robert Schouwenbu » Fri, 14 Jun 1996 04:00:00



:
: >ANY SUGGESTIONS AT ALL?  I'm getting really sick of this... I heard
: >somewhere that the older Slackware distributions have hosed copies of
: >lpd... should I get a newer one?  Where's the best place to get it
: >(sunsite?)
:
: >Thanks for just READING this long thing... extra thanks if you can help.  
: >USENET is the only tech support I've got... :)
:
: >Mike D
:
: Mike,
:
:  I've been attacking this same problem for about a month and I get
: about the same results as you. Gee, It  would be nice to print via
: lpr. I keep banging away at it, maybe I'll figure it out, or get
: lucky.

I had the same problem with printing my faxes. What I did was first let gs
process the postscript files to raw print files and then pipe them to lpr.
Like this:

cat *.ps | gs -q -dNOPAUSE -sDEVICE=epson -r72 -sOutputFile=- - | lpr -l

*) The -l option tells lpr & lpd to send control chars directly to the printer.

Hope this solves your problems.

Robert

--
       ___                              
      `|__)_  _| _ / `\    /'_  _ |  _|  ::  Robert Schouwenburg

      -----------------------------------------------------------------

 
 
 

more lpd problems * sigh *

Post by Steve Groshon » Fri, 14 Jun 1996 04:00:00


I had a similar problem with my HP 855, everytime I went to print I
got a page of random characters and then the text.  I decided to
dump nenscript altogether and installed the aps-filter instead
(available on sunsite under system/Printing/).  I also had to setuid
on ghostscript (chmod +s /usr/bin/ghostscript).  Now printing works
fine, beware though that by setuid on ghostscript you may open a
potential security hole.

Hope this helps,
Steve.

 
 
 

more lpd problems * sigh *

Post by Lyndon Hi » Sat, 15 Jun 1996 04:00:00


So I understand you're trying to set up your deskjet printer to print
Postscript ?

You do know that you have to use a postscript interpreter to do that ?
Ghostscript is essential in that case.
gs is quite difficult to get into. I had to spend a long time to
get it to print postscript on my HP500.

I seem to remember having to use the 2nd staircase script from the
HOWTO to get it to work properly.

Anyhow, I got a postscript printer so I don't recall how to use
gs anymore.

Hope that was some help,


--
._______________________________________________________________________.

 
 
 

more lpd problems * sigh *

Post by Francisco Jose Toledano Alcal » Mon, 24 Jun 1996 04:00:00


Try to reconfigure your spool directory to /var/spool/lpd/...

In Printing-HOWTO.gz say that the spool directory must be in /usr/spool/lpd/... but
the system look at in /var/spool/lpd/....

 
 
 

more lpd problems * sigh *

Post by John Huttl » Wed, 26 Jun 1996 04:00:00




:>
:>Try to reconfigure your spool directory to /var/spool/lpd/...
:>
:>In Printing-HOWTO.gz say that the spool directory must be in /usr/spool/lpd/... but
:>the system look at in /var/spool/lpd/....

The /usr/spool is usually a symlink to /var/spool


Mail with subject   SEND PGP   for pgp key