Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!lll-winken!abhg!wrangler!ssbn!bill From: bill@ssbn.WLK.COM (Bill Kennedy) Newsgroups: comp.unix.sysv386 Subject: remote printing Message-ID: <1955@ssbn.WLK.COM> Date: 17 Dec 90 04:49:38 GMT Organization: W.L. Kennedy Jr. & Associates, Pipe Creek, TX Lines: 66 A couple of weeks ago I posted a recipe for making uucp work across the ethernet (ISC TCP/IP 1.2, 386/ix 2.2) using TLI. The purpose of the ceremony was to let one machine (ssbn) use another's printers (dunsel). First, the solution was less than optimal, but it did/does work. Further, the lp script enclosed with the original article darned near worked, it worked well enough to suit me and to post. Yesterday I decided to add another layer of distraction and move the printers off of dunsel onto wrangler. That's interesting because wrangler isn't on the ethernet, so what on earth to do if I want to print something from ssbn who has no direct connect to wrangler and wrangler is the only machine in the building with a printer. Here's the answer. You need a script like what's enclosed on the originating site and a similar one on the relay site, just the plain old lp script on the print site. This has all been tested with the ssbn->dunsel->wrangler lash up and it should work for you. Season to taste, there are some blood spatters on it... Also note that dunsel is running an identical script with rem changed to wrangler since wrangler owns the printers. Refinements are welcome, I don't claim that it does anything but work. # # Print a file using uux to a remote site's printer. # Note that if there are no optional arguments, just # uux the file to the remote site. If there is only # one optional argument, pass it intact, but if there # is more than one optional argument, enclose it in # apostrophes and give it to eval to pass to the remote # site (courtesy wgb@balkan.TNT.COM, Bill Bunton) # # /usr/spool/lp/admins/lp/interfaces/hp # send=/usr/bin/uux ############################### change below ################################# rem=dunsel prt=hp ############################### change above ################################# user=$2 copies=$4 if [ "$5" = " " ] then options="" else options=$5 fi shift; shift; shift; shift; shift files="$*" for file in $files do if [ -z "$options" ] then $send -p -a$user "$rem!lp -d$prt -n$copies" < $file else set -- $options if [ $# -eq 1 ] then $send -p -a$user "$rem!lp -o$* -d$prt -n$copies" < $file else eval $send -p -a$user "$rem!lp \'-o$*\' -d$prt -n$copies" < $file fi fi done exit 0 -- Bill Kennedy usenet {att,cs.utexas.edu,pyramid!daver}!ssbn.wlk.com!bill internet bill@ssbn.WLK.COM or attmail!ssbn!bill