UNIX Programming, Certification, System Administration, Performance Tuning Reference Books
How to configure Digital UNIX to print to an ip-address and socket number?

(i.e. a terminal server).

  1. Add the ip-address of the terminal server to the /etc/hosts file and give it a meaningful name.
  2. Add an entry to /etc/services. The entry should consist of the printer name i.e. printer1 or hp-4si, the socket number configured on the terminal server i.e. 1002, the protocol used in this case tcp and a comment to indicate the name and the port number of the terminal server.
  3. Example         printer1   1001/tcp   #term serv at London port 1
  4. Then setup the printer using lprsetup

  5.  

     
     
     

    As root type lprsetup and follow the following prompts

    (an asterix * means the response is up to you)

    Digital UNIX Printer Setup Program

    Command < add modify delete exit view quit help >: add

    Adding printer entry, type '?' for help.

    Enter printer name to add [1] : "hit return" as this is the next available number

    For more information on the specific printer types

    Enter `printer?'

    Enter the FULL name of one of the following printer types:

    Lot's of printer types are shown here

    or press RETURN for [unknown] : *

    Enter printer synonym: "Printer name"

    Enter printer synonym: "Another name for the same printer or hit return"

    Set device pathname 'lp' [] ? @"enter hostname in host file"/"name from services file"

    Example       @London_termserv/printer1
    Do you want to capture print job accounting data ([y]|n)? *

    Set spooler directory 'sd' [/usr/spool/lpd184] ? *

    Set printer error log file 'lf' [/usr/adm/lp184err] ? *

    Enter the name of the printcap symbol you wish to modify.

    Lot's of symbols are shown here

    Enter symbol name: *

    Are these the final values for printer 184 ? *

    Printer values are shown here

    Adding comments to printcap file for new printer, type '?' for help.

    Do you want to add comments to the printcap file [n] ? : *

    Set up activity is complete for this printer.

    Verify that the printer works properly by using

    the lpr(1) command to send files to the printer.

    Command < add modify delete exit view quit help >: exit

  6. Test the printer by typing lp -d"printer name" "file to print"

  7. Example         lp -d lp1 /etc/hosts

Return to : Unix System Administration Hints and Tips