Xref: utzoo comp.unix.questions:8736 comp.unix.xenix:2965 Path: utzoo!utgpu!attcan!uunet!lll-winken!lll-tis!ames!killer!vector!rpp386!pigs!haugj From: haugj@pigs.UUCP (Joe Bob Willie) Newsgroups: comp.unix.questions,comp.unix.xenix Subject: Re: $PRINTER environment variable in Unix Summary: people requested the model script ... ... so here it is. Keywords: PRINTER, environment Message-ID: <215@pigs.UUCP> Date: 9 Aug 88 16:26:41 GMT References: <1988Aug2.085719.11489@gpu.utcs.toronto.edu> <4907@rpp386.UUCP> Organization: Big "D" Oil and Gas Lines: 45 In article <4907@rpp386.UUCP>, jfh@rpp386.UUCP (John F. Haugh II) writes: > In article <1988Aug2.085719.11489@gpu.utcs.toronto.edu> romwa@gpu.utcs.toronto.edu (Mark Dornfeld) writes: > >Is there a "standard" method for implementation of a $PRINTER > >environment variable in a user's shell? > > yes, it is spelt "LPDEST". i frequently use it on three systems connected > by ether and uucp to route print requests. i can even provide model scripts > for anyone wanting to know how to queue lp requests over uucp. just as > soon as pigs.UUCP returns to the air ... ok, pigs is back on the air and as i've received a number of requests for the models i use (they are really QUITE simple ;-), i'm including them here. to use this model, install the file below as /usr/spool/lp/model/remote and then edit the resultant file after it is installed using lpadmin. you will then need to edit your L.cmds file to allow lp commands from the machine which is doing the calling. real easy ... the machine named below is on the ethernet with pigs. after you install this model you will need to change pifo to your remote machine's name. good luck. oh, this is shareware, please send $10 to my retirement fund ;-) - john. ----------------------- cut as /usr/spool/lp/model/remote ----------------- # # @(#)remote 1.1 4/19/84 # lp interface for remote line printer # # SCCS @(#)remote 1.1 machine=pifo copies=$4 shift; shift; shift; shift; shift files="$*" for file in $files do cat "$file" 2>&1 echo "\014\c" done | uux -n - "$machine!lp -s -n$copies" exit 0 -- jfh@rpp386.uucp (The Beach Bum at The Big "D" Home for Wayward Hackers) "Never attribute to malice what is adequately explained by stupidity" -- Hanlon's Razor