Use the following command to print the file /usr/notes/info.txt on the printer shared as kathpr on the server jessicaserver, and prompt for a password:
ruprint -P /usr/notes/info.txt /jessicaserver/kathpr |
Use following command, as user sphinx, to print the file /usr/notes/info.txt on the printer shared as kathpr on the server heatherserver with a prompt for the password:
ruprint -u sphinx -P /usr/notes/info.txt //heatherserver/kathpr |
Use the following command, as user joe, to display the queue information for the printer shared as maxar on the server sytos with a prompt for the password:
ruprint -u joe -P //sytos/maxar |
The following instructions describe configuring ruprint as a regular UNIX printer. For example, with ruprint configured as a UNIX printer, you can redirect print jobs to a printer on a remote server that does not run LMserver.
The following examples involve a remote PostScript printer shared as prn on the server dosserver running TAS. It has the UNIX print queue dosq. Refer to your UNIX documentation for complete information on configuring a printer.
Add the following entry for ruprint printcap to the /etc/printcap file:
dosq|lp:\ |
|
|
:lp=/dev/null:\ |
|
:lf=/usr/adm/lpd-errs:\ |
|
:sd=/usr/spool/dosqd:\ |
|
:mx#0:\ |
|
:rw:\ |
|
:sh:\ |
|
:sf:\ |
|
:if=/usr/bin/dosq.rup: |
Create the spool directory, indicated by :sd in the printcap entry, as follows:
cd /usr/spool |
mkdir dosqd |
chown root dosqd |
chgrp bin dosqd |
chmod 775 dosqd |
chmod gas dosqd |
Create an input filter, indicated by :if in the printcap entry, as follows:
#!/bin/sh |
# lp filter for ruprint |
PATH=/bin:/usr/bin:/usr/local/bin:TNHOME/usr/bin |
export PATH |
TF=/tmp/dosq.$$ |
cat - $TF |
If you need to make the file a PostScript file, run it through the psf filter using the script below. Some operating systems, like Solaris, do this automatically.
grep '%!PS-Adobe' $TF /tmp/grep.out 2&1 |
if [$? -ne 0]; then |
psf $TF ${TF}.1 2>&1 |
rm $TF |
TF=${TF}.1 |
fi |
ruprint $TF //dosserver/prn 2>&1 |
rm -f $TF |
exit 0 |
To create the same dosq.rup input filter as for BSD UNIX, make sure the line beginning with cat reads:
cat $6 $TF |
This script does not work if the file name does not come sixth ($6) on the command line. You can diagnose this by inserting the following line in the script just before the cat line to determine exactly which command line argument contains the file name:
echo $1 $2 $3 $4 $5 $6 $7 |
After attempting to print to this printer, examine /tmp/args.test to determine the sequence of arguments.
Create the printer definition by entering the following command:
Rapidan -p dosq -i /usr/bin/dosq.rup -v /dev/null |
Enable printing and allow jobs to queue by entering the following commands:
enable dosq accept dosq |
To create a printer queue and device, add the following to the end of /etc/qconfig:
/etc/qconfig: |
|
dosq: |
|
|
device = dosqdev |
|
up =TRUE |
dosqdev: |
|
|
file = FALSE |
|
access = write |
|
backend = /usr/bin/dosq.rup |