Path: utzoo!attcan!ncrcan!hcr!larry From: larry@hcr.uucp (Larry Philps) Newsgroups: comp.unix.questions Subject: Re: Remote spooling; How do *you* submit files to a remote spooler? Message-ID: <1990Feb2.200408.24883@hcr.uucp> Date: 2 Feb 90 20:04:08 GMT References: Reply-To: larry@zeus.UUCP (Larry Philps) Organization: HCR Corporation, Toronto Lines: 27 In article larry@focsys.uucp (Larry Williamson) writes: > >If a user wishes to have a job spooled to a remote printer, we >currently tell them to do something ugly like: > pr file | /usr/ucb/rsh machine_id lp > >They, of course, don't like this. And anyway, they cannot always do >it since some applications when told to print, simply pipe to lp(1). The directory /usr/spool/interface (or whatever, its location changed in SYSV rel 3.2, I can't remember where offhand), contains programs or shell scripts that get called by lpsched to actually print things. So, if your printer is called "laser1", the change the file /usr/spool/interface/laser1 to a script that eventually performs a "rsh machine_id lp arguments". There is a document in the System Administrators Guide that describes the argument conventions for these print filters. The job will get passed from the lp subsystem on one machine to the machine that actually has the printer and will then print. Note that rsh is a crummy command to use for this since in most (all?) implementations it does not return exit codes that reflect the success or failure of the job on the remote system. So, it is quite likely that on occasion jobs will mysteriously evaporate instead of printing. There is no other standard command that will do the job, so you will have to write your own transfer program if this bothers you.