lpr(1) Problems on a Sun
Scott Simpson
trwarcadia!simpson at usc.edu
Tue Oct 17 07:41:05 AEST 1989
I am having problems with lpr(1) specifically in a Sun environment. I
have a very large file (16M) that I want to queue. (This file is the
PostScript output of a dvi file that contains a bunch of bitmap figures
but that is irrelevant.) My printer is connected to one of the
clients. My root filesystem on the client (which has a very
small filesystem) fills up when I try to queue it with lpr. I could
use the -s (symbolic link) option but then the -r (remove) option does
not work. Also, the symbolic link option will not work if I try to
queue from another client because a temporary file has to be made that
is shipped across the network.
The problem is actually more complex than this. We are running
the Imagen software supplied with our Imagen printer. Imagen uses lpr but
you are supposed to use the "ipr" interface rather than lpr directly.
The reason for this is that ipr prepends a document header onto each file
that it queues to lpr telling the Imagen printer things like which printer
language to use, the user's name, whether a job header should be printed,
etc. For example, ipr prepends input like this
@document(language ultrascript, pagecollation off, jobheader on)
...your file here...
Because of this prepending, ipr always queues to the standard input so
you can never use the -s option.
Because ipr queues to standard input, it does not have a -s option.
I modified ipr to take a -s option. If this option is given, ipr
1. copies the input file to a file named ",iprXXXXXX"
IN THE CURRENT DIRECTORY.
2. queues this file directly using the symbolic link option
to lpr and without using standard input.
If the -r option is given to ipr, it deletes the original file, not the
",iprXXXXXX" copy (with the Imagen prepend) which needs to hang around
until the job is completed printing. This works if you are queueing on
the client with the printer. The problem with this approach is that
the ,iprXXXXXX file will not get deleted when the print job is done.
There is no way to get lpd to delete this file at the termination of
printing the job.
I could make the root filesystem of the machine the printer is
on much bigger, but then I would have to make the root partition of all
the other clients much bigger too, because these clients create large
temporaries files when they are shipping print files across the network.
The result is that I waste a lot of space in large root partitions for
each client.
What I'd really like is a pool of space shared by all the
clients that could be used to store large print files.
Unfortunately there is not an option to lpr/lpd that says where to
place temporary files. Even if there was, how could I get all the
clients to share this file space in a secure manner? Root privileges
on one client doesn't mean you get root privileges on another client or
the server. This precludes using a directory on the server filesystems
because client root privileges don't work on fileserver partitions.
Help!
Scott Simpson
TRW Space and Defense Sector
usc!trwarcadia!simpson (UUCP)
trwarcadia!simpson at usc.edu (Internet)
More information about the Comp.unix.wizards
mailing list