TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [TCLUG:7538] printing (lpr/lpd?) problems



>Might be the version of GhostScript, too.  Upgrading to RH 6.0 will
>definitely help with the print filters.
        yeah, tried to upgrade it once before; but found out the new version
of printtool eventually depends on glibc2.1; which i'd need to upgrade to
6.0 to get.

>Ah, this is an important concept.  A redirect sends a program's STDOUT to a
>device or a file.  A pipe sends a program's STDOUT to the STDIN of another
>program, effectively joining the two programs together into one.  This lets
>us Unix/Linux geeks accomplish complicated feats with one line of code! :)
>i.e. 'du / | sort -n -r | head -50 | mail cpatte -s"Here's the biggest 50
>files and directories on our server"'
        ok. tried printing with "| lpr -P hp4v 2>/dev/null"; no change.
still jams in the print spool (although the file size that lpq reports is
now 2700 bytes, rather than 2731 bytes)

>If the OSAS system forces you to use a redirect, you may be able to do
>something like "> /tmp/tmprpt.txt ; lpr -r -Php4v /tmp/tmprpt.txt"  This
>redirects the output to a temp file, then runs the print process to print
>and remove that file.  You'll encounter problems, though, if two people run
>reports at the same time.
        tried redirecting print with  "> /tmp/r.txt"; kept giving me "file
does not exist" errors. 
        tried printing to a file; and it would happily write to
'/tmp/r.txt', tho. the *intersting* thing, was that this file would not
print either! if I lpr'ed it, it would jam up the print spool.
        so i opened the file with PICO, and there's some funky '^L'
character at the end. if i removed the '^L' char, the file prints just fine!
(tried this a couple of times to make sure).
        if I cat the file, the ^L seems to do some sort of carriage return
and tab.
        i tried printing the screen to a file (since the screen-printing
function seems to work); and the file prints fine. no ^L char at the end of it.
        this would seem to be what's bunging up the system; wtf do I do
about it? am going to pass this on to the consultant; see if he knows something.
        perhaps it has something to do with the (formatting) escape codes
that OSAS sends to the printer. (to get compressed text, landscaping, etc).

>Incidentally, your vendor may be assuming that the "-s" option to lpr makes
>it print silently.  This is true under SCO Unix but NOT true under RH Linux.
>Under Linux this option creates a symbolic link to the spool directory,
>which doesn't make any sense since you're working with STDOUT and not a
>file.  Try getting rid of "-s" and see if it helps.  RH Linux prints
>silently by default.
        I think you're right. I believe he mentioned something about it
being for 'silent '. I checked the man page to see, and yes, he was wrong;
but since the man page said that this option was useful for large files, i
figured it was a good thing anyway. but what you're saying makes sense; if
it uses STDIN/STDOUT, the symbolic thing shouldn't matter.
        i already tried removing it, and no luck there.


>>        it prints fine from the command line; however, I don't know how to
>>configure it for OSAS, and it gives me some strange error about the
>>operating system.
>Can't help you on the OSAS side, that's up to your panel of experts.  If you
>could post the OS error, though, it would be a great help.
it's something like this one:
- Error ---------------------------------------------------------------------
  WARNING! - Unexpected Error Has Occurred.                                  
                                                                             
  BASIC ERROR = 49  HOST ERROR=-32  LINE = 3820  PROGRAM = GLPRJ             
                                                                             
  3820 CALL "GENOUT.PUB",DEVICE$,F,OUTCOLS                                   
                                                                             
                                                                             
                                                                             
  BBx ERR 49 = STBL Error                                                    
  Host ERR means UNIX operating system reported an error 32.                 
  Base Workspace Program = GLPRJ                                             
  Press Shft F3  for support information.                                    
                                                                             
  Press Enter to Continue.                                                   
-----------------------------------------------------------------------------
^this is actually the one i got from trying to print to a file. i don't have
a printer physically connected to it anymore to try printing to.
i'm not looking for a specific interpretation of this; just throwing it out
to see if anyone understands any part of it.

thanks,
Carl Soderstrom