the black hole of lpr

the black hole of lpr

Post by Yoonsuck Ch » Tue, 03 Jun 1997 04:00:00



In RedHat's control-panel utility, you can clock on the printer icon
and generate entries for your printer. It updates the /etc/printcap and
creates appropriate filters if necessary.

Run

        control-panel

as root.

: i have recently installed linux (red hat) but have trouble printing.  
: i've used "running linux" as a guide but it doesn't quite work.  i am a
: novice and out of ideas.

: my /etc/printcap file includes if=/usr/sbin/myfilter  where myfilter is
: either
:     A) a link to the standard lpf filter
:     B) a link to  scriptfile  that executes the following:
:                  nenscript -p-

: In case A the following commands work as desired
:       lpr textfile.ps                               # where textfile.ps
: is, as suggested,
:                                                            in postscript
: format
:    
:       cat textfile | scriptfile | lpr   # where scriptfile is as described
: above
:                                                             and textfile
: is not in ps format
:    
: In case A the following command works as expected  but
: not as desired in that it stairsteps; i.e.  eol at end of line instead of
: eol and cr, which the printer needs

:       lpr textfile                          

: In case B ---  it seems to be a black hole ... nothing goes to the printer
: or
: anywhere else (i.e. not to the error file either).

: I can print, of  course, but would like to fix things so that
:    lpr textfile
: works. one final note, the ownership and permissions of scriptfile are the

: same as lpf.

: any advice?  thanks.  
--
Yoonsuck Choe

 
 
 

the black hole of lpr

Post by ZEDAPU » Wed, 04 Jun 1997 04:00:00


i have recently installed linux (red hat) but have trouble printing.  
i've used "running linux" as a guide but it doesn't quite work.  i am a
novice and out of ideas.

my /etc/printcap file includes if=/usr/sbin/myfilter  where myfilter is
either
    A) a link to the standard lpf filter
    B) a link to  scriptfile  that executes the following:
                 nenscript -p-

In case A the following commands work as desired
      lpr textfile.ps                               # where textfile.ps
is, as suggested,
                                                           in postscript
format

      cat textfile | scriptfile | lpr   # where scriptfile is as described
above
                                                            and textfile
is not in ps format

In case A the following command works as expected  but
not as desired in that it stairsteps; i.e.  eol at end of line instead of
eol and cr, which the printer needs

      lpr textfile                          

In case B ---  it seems to be a black hole ... nothing goes to the printer
or
anywhere else (i.e. not to the error file either).

I can print, of  course, but would like to fix things so that
   lpr textfile
works. one final note, the ownership and permissions of scriptfile are the

same as lpf.

any advice?  thanks.  

 
 
 

the black hole of lpr

Post by ZEDAPU » Wed, 04 Jun 1997 04:00:00


i have recently installed linux (red hat) but have trouble printing.  
i've used "running linux" as a guide but it doesn't quite work.  i am a
novice and out of ideas.

my /etc/printcap file includes if=/usr/sbin/myfilter  where myfilter is
either
    A) a link to the standard lpf filter
    B) a link to  scriptfile  that executes the following:
                 nenscript -p-

In case A the following commands work as desired
      lpr textfile.ps                               # where textfile.ps
is, as suggested,
                                                           in postscript
format

      cat textfile | scriptfile | lpr   # where scriptfile is as described
above
                                                            and textfile
is not in ps format

In case A the following command works as expected  but
not as desired in that it stairsteps; i.e.  eol at end of line instead of
eol and cr, which the printer needs

      lpr textfile                          

In case B ---  it seems to be a black hole ... nothing goes to the printer
or
anywhere else (i.e. not to the error file either).

I can print, of  course, but would like to fix things so that
   lpr textfile
works. one final note, the ownership and permissions of scriptfile are the

same as lpf.

any advice?  thanks.  

 
 
 

the black hole of lpr

Post by John W. Dougher » Fri, 06 Jun 1997 04:00:00



Quote:(ZEDAPUGH) writes:

...

>In case A the following command works as expected  but
>not as desired in that it stairsteps; i.e.  eol at end of line instead of
>eol and cr, which the printer needs

>      lpr textfile                          

..

Your filter needs to include a short shell script that will send an esc
commend to the printer telling it to include the carriage return with the line
feed. Since you don't say what kind of printer you are using we can't say what
the esc-command should be.

For my HPLJ 5MP I use a short script "hpfilter":

        #!/bin/sh
        echo -e -n "\033E\033&k2G'
        cat
        echo -e -n "\033"

I have it located it saved as "/usr/bin/hpfilter" and it has to be set as
executable for the group using the printer. I used "chmod 755
/usr/bin/hpfilter" but you may want to use a different setting. The script has
to be called by printcap. The pertinent lines in mine read:

        :sh:\
        :if=/usr/bin/hpfilter:\

This will get rid of the stair stepping. Barkakati gives a similar script in
Linux Secrets, but I could not get his version to work.

John W. Dougherty  |"Theories," ... So the dragon once spoke.

                   |their crackpot theories." I recall his laugh.
                   |            -Grendel

 
 
 

1. Black Hole / Sink Hole Routing

All,

I applied black hole / Sink hole routing to our Cisco router that redirect
all packets that have known "virus/worm" pattern to null device. It is very
helpfull to drop all packets that contain NIMDA, NACHI, etc

Is it possible to do the same action by using IPTABLES?

Your answer is very appreciated and waited for.

Thx & Rgds,

Awie

2. Bus Error

3. SYN packets dropping into a black hole

4. Mandrake 7.2: standby no longer viable option

5. Electric Vehicles are a black hole.

6. cmsg cancel <yxs7k6xomy3k.fsf@nortelnetworks.com_.nospam>

7. Strange mail black hole

8. Many $HOMEs under a single directory or what?

9. Is it time for a black hole list for

10. Memory Black Hole

11. gimp running in 24-bit color: black hole ?

12. Black hole routing with Linux 2.0 kernel?

13. Doesn't return to prompt after running X - black holes