TotalNET Advanced Server 5.2 Reference Manual

Examples

  1. 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
  2. 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
  3. 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

Using ruprint as a Printer

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.

For BSD UNIX:

  1. 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:

  2. 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

  3. 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

For System V:

  1. 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
  2. After attempting to print to this printer, examine /tmp/args.test to determine the sequence of arguments.

  3. Create the printer definition by entering the following command:


    Rapidan -p dosq -i /usr/bin/dosq.rup -v /dev/null
  4. Enable printing and allow jobs to queue by entering the following commands:


    enable dosq 
    accept dosq
  5. 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