[biz.sco.general] Remote Printing Over SCO TCP/IP?

rfarris@rfengr.com (Rick Farris) (05/20/91)

I'm trying to figure out how to automatically print on a
printer attached to another host.

I have your typical TCP/IP network, with a laser printer
attached to one of the hosts on the net.  I'm running SCO
UNIX and SCO Open Desktop, which use a Locus-based tcp/ip.

I have rcp, rcmd and rlogin available. (I even have a
man-page for rprint, but rprint is a Xenix-Net or LM/X
command.)

I've been rcp'ing files to the printer-host and then
rcmd'ing a print command.  Is there a more straightforward
way to do this remote printing?  Has anyone written any
clever shell scripts to implement the "rprint" function?


--
Rick Farris  RF Engineering POB M Del Mar, CA 92014  voice (619) 259-6793
rfarris@rfengr.com     ...!ucsd!serene!rfarris      serenity bbs 259-7757

paulz@sco.COM (W. Paul Zola) (05/21/91)

In article <1991May19.204503.1754@rfengr.com> rfarris@rfengr.com (Rick Farris) writes:
}I'm trying to figure out how to automatically print on a
}printer attached to another host.
}

[details deleted]

}
}--
}Rick Farris  RF Engineering POB M Del Mar, CA 92014  voice (619) 259-6793
}rfarris@rfengr.com     ...!ucsd!serene!rfarris      serenity bbs 259-7757


The following article from the SCO Information Tools database should help 
with your problem.   I'm posting because I think this may be of general
interest.

################## cut here ################ cut here ##################

How do I set up remote printing with SCO TCP/IP?

KEYWORDS: printer remote lpinit mkdev rcmd 

RELEASE:  SCO TCP/IP Generic

PROBLEM:  How do I set up remote printing with SCO TCP/IP.

SOLUTION: The following steps outline how to set up remote printing
	  with SCO TCP/IP.  
	  
	  (1) If you are running over SCO TCP/IP, the utility remote
	  command (rcmd) can provide access to all remote printers with 
	  an identical User Interface, "lpr."  There are a few steps you 
	  need to do to set this up:
	  
	  	(i) Get rcmd working. The machines need to be set up as 
		trusted hosts.  The easiest way to do this is to add the 
		remote machines to the "/etc/hosts.equiv" file.  Then you 
		can test the rcmd command in the following manner:
	  	 
	  	   cat /etc/motd | rcmd <remote_host> lp -d<dest_printer> 

	  	where anything enclosed in braces <> is replaced with the
	  	correct host or remote printer destination. This will print
		the local /etc/motd on the remote printer.
	  
	  	If you are testing rcmd as root, you must also have an entry
		in /.rhosts on the remote machine that looks like:
	  
	  	   <local_host> root
	  
	  	See rcmd(C) in the SCO TCP/IP documentation for more details.
	  
	  
  	(2) Follow the guidelines below depending on whether you have an
	    SCO XENIX System V Operating System or an SCO UNIX System V/386
	    Release 3.2 Operating System.

	    SCO XENIX 386 Operating System:

		(i) You will need to run "lpinit" on the local machine
		(the one that does not have the printer(s)). Choose Add
		(Option 1) from the lpinit main menu.  Then, from the Add
		menu, choose Remote Printer (Option 3).  Do not select SCO 
		XENIX-NET, as this is dependent upon xnlpc.  Rather, choose
		UUCP and answer the questions appropriately.  SCO recommends
		using the same printer name on this machine that is used on
		the remote machine so users do not have to send printouts to
		different destinations when they are on different machines.
	  
	  	(ii) Edit the /usr/spool/lp/remote file and change the entry 
		that lpinit added.  Initially it should look like:
	  
	  	   foo_printer:  uux - <remote_host>!lp -dfoo_printer
	  	   (where "foo_printer" would be the name of your printer)
	  
	  	After editing the file, it should look like:
	  
	  	   foo_printer:  rcmd remote_host lp -dfoo_printer
	  	   (where "foo_printer" would be the name of your printer)
	  
	  	(iii) Create "/usr/spool/lp/.rhosts on the destination machine
	  	(where the printer is) with an entry as follows:
	  
	  	   <local_host> root
	  
	  
	    SCO UNIX System V/386 Operating System:

		(i) You will need to run "sysadmsh", on the local machine
		(the one that does not have the printer(s)). Choose the
		following options:

		   Printers
		   Configure
		   Add

		You will then be presented with a menu as follows:

		   Printer name   <enter the printer name>

		SCO recommends using the same printer name on this machine 
		that is used on the remote machine so users do not have to 
		send printouts to different destinations when they are on 
		different machines.

		Comment       <enter a comment such as remote printer on max>

		Class Name    <press return if you do not have classes>

		Use printer interface <select Existing>

		Name of interface <enter "network," as this is the name of the
				   interface script>
		
		Connection   <select Direct>

		Device name  <enter "/dev/null">

		Dial-up information <press return>

		Device       <select Hardwired>

		Require banner  <select yes or no>

	  	(ii) Create the /usr/spool/lp/remote file and add the 
		following information:

	  	   foo_printer:  rcmd remote_host lp -dfoo_printer
	  	   (where "foo_printer" would be the name of your printer)
	  
		You will need to make an entry for each printer you add.
		After you have finished editing /usr/spool/lp/remote
		execute the following commands:

		   chown lp remote
		   chgrp lp remote
		   chmod 755 remote

	  	(iii) Create "/usr/spool/lp/.rhosts on the destination 
		machine (where the printer is) with an entry as follows:
	  
	  	   <local_host> root

		Then change the permissions and ownership to be the same
		as the remote file.

################## cut here ################ cut here ##################

I hope this helps you with your problem.

-
Paul Zola			Support Technical Lead, Operating System
				paulz@sco.COM 
Gotta tend the earth if you want a rose.  - Emily Saliers
    DISCLAIMER: I speak for myself, and not for SCO.

trevor@trevan.uucp (05/21/91)

paulz@sco.COM (W. Paul Zola) writes:


>In article <1991May19.204503.1754@rfengr.com> rfarris@rfengr.com (Rick Farris) writes:
>}I'm trying to figure out how to automatically print on a
>}printer attached to another host.
>}

>[details deleted]

>}
>}--
>}Rick Farris  RF Engineering POB M Del Mar, CA 92014  voice (619) 259-6793
>}rfarris@rfengr.com     ...!ucsd!serene!rfarris      serenity bbs 259-7757


>The following article from the SCO Information Tools database should help 
>with your problem.   I'm posting because I think this may be of general
>interest.

>################## cut here ################ cut here ##################

>How do I set up remote printing with SCO TCP/IP?

>KEYWORDS: printer remote lpinit mkdev rcmd 

>RELEASE:  SCO TCP/IP Generic

>PROBLEM:  How do I set up remote printing with SCO TCP/IP.

>SOLUTION: The following steps outline how to set up remote printing
>	  with SCO TCP/IP.  
>	  

>		Device name  <enter "/dev/null">

Dont do this on ODT 1.0. We reported a bug with this method some time ago.
the line printer scheduler send a sighup to processes associated with 
/dev/null when it finishes printing (I thing this is a security feature!).
This will kill some of those processes. The work around is to make a special
null file ie

	mknod /dev/lpnull c 4 255

This problem was reported to SCO some months ago so I would like to know
if it has been fixed in 1.1. 
-- 
				regards trevor
------------------------------------------------------------------------------
Trevor Harris				UUCP: trevor@trevan.uucp
Trevan Designs Limited

mikes@iuvax.cs.indiana.edu (Michael Squires) (06/22/91)

In article <1991May19.204503.1754@rfengr.com> rfarris@rfengr.com (Rick Farris) writes:
>}I'm trying to figure out how to automatically print on a
>}printer attached to another host.

There is also a portable lpr that can dump stuff to BSD printer queues written
by Keith Moore (moore@cs.utk.edu).  I have it installed under ODT 1.0 and
it is working fine with our ULTRIX host.

I believe that I got it via ftp from cs.utk.edu.
-- 

Mike Squires (mikes@iuvax.cs.indiana.edu)     812 855 3974 (w) 812 333 6564 (h)
mikes@iuvax.cs.indiana.edu          546 N Park Ridge Rd., Bloomington, IN 47408
Under construction: mikes@sir-alan.cica.indiana.edu