Home
Settings for UNIX Users

Introduction to UNIX Settings
lpr filters
Setting Up Different UNIX Systems Using the lpr Command
Using the ftp Command

Introduction to UNIX Settings

This chapter explains how to set up the printer for different UNIX systems using the lpr command.

Your printer supports many standard UNIX commands and can be configured from a host computer without using a special setup utility.

Your printer is able to function as a remote printer on systems using TCP/IP Ethernet transfer with lpr remote printing protocol, or standard ftp (file transfer protocol).


Note:

Because this printer does not convert data into the printer control language, a printer driver and filter are necessary for each system.

Top
lpr filters

Filters for lpr are controlled by the name given to the remote printer. When setting up an lpr printer entry, a name is entered for:

  • the local printer name to be redirected

  • the host name of the station to which the print is sent

  • the remote printer name (name of the printer port on the remote station)

Many different remote printer names may be set up, all directed to the same Ethernet remote host, and each is given a different local printer name to be redirected. Different types of print jobs may be sent to different printer names, which will then all print out on the same printer, through the same Ethernet interface, but using different filters.

The remote printer name options used to invoke the different filters are as follows:

lpb

Binary files (no filters)

lpa

ASCII files (carriage returns at line ends)

lpbf

Binary file with form feed at file end

lpaf

ASCII file with form feed at file end

All other remote printer name options will be treated the same as lpb.

The following is an example of sending a text file, "txtfile", via lpr with a form feed appended:

    % lpr -plpaf txtfile

Top
Setting Up Different UNIX Systems Using the lpr Command

The following UNIX systems can print using the standard lpr command.

  • SunSoft Solaris 2.4 or later

  • SunOS 4.1.4 or later

  • IBM AIX 3.2.5 or later and 4.1.3 or later

  • HP-UX 9.05 or later

  • SCO UNIX 4.2 or later

Setting up for SunSoft Solaris 2.4 or later

In the following steps, substitute the name that your printer will be known by for HOSTNAME, and the name by which you want your printer to be known for Rprinter.

Add the IP address and printer host name to the \etc\hosts file.

    For example:
    22.33.44.55 HOSTNAME

Define the host name as a print server.

    For example:
    lpsystem -t bsd HOSTNAME

Create the printer.

    For example:
    lpadmin -p Rprinter -s HOSTNAME\aux-T unknown-1 any

Enable the printer for use.

    For example:
    accept Rprinter
    enable Rprinter

To print, use the lp command.

    For example:
    lp -d RPrinter Print-File-Name

Setting up for SunOS 4.1.4 or later

In the following steps, substitute the name that your printer will be known by for HOSTNAME, and the name by which you want your printer to be known for Rprinter.

Add the IP address and printer host name to the \etc\hosts file.

    For example:
    22.33.44.55 HOSTNAME

Create a spool directory.

    For example:
    mkdir\var\spool\lpd\PRIFx

Add the printer entry to the \etc\printcap file.

    For example:
    Rprinter │

    ALCXXXX:lp=:rm=HOSTNAME:rp=aux:sd=/var/spool/lpd/PRIFx

To print, use the lpr command.

    For example:
    lpt -s -PRPrinter Print-File-Name


Caution:

Files that exceed 1 MB may not be printed unless the -s option is used.

Setting up for IBM AIX 3.2.5 or later and 4.1.3 or later

In the following steps, substitute the name that your printer will be known by for HOSTNAME, and the name by which you want your printer to be known for Rprinter.

Add the IP address and printer host name to the /etc/hosts file.

    For example:
    22.33.44.55 HOSTNAME

Run smit.

    For example:
    smit printer

Set the printer name (for example: Rprinter) in:

    "Manage Remote Printer""Client Services""Remote Printer Queues""NAME of queue to add".

    Set the host name (for example: HOSTNAME) in:

    "DESTINATION HOST for remote jobs".

    Set the port name (for example: aux) in:

    "Name of QUEUE on remote printer".

To print, use the lpr command.

    For example:
    lpr -PRPrinter Print-File-Name

Setting up for HP-UX 9.05 or later

In the following steps, substitute the name that your printer will be known by for HOSTNAME, and the name by which you want your printer to be known for Rprinter.

Add the IP address and host name to the /etc/hosts file.

    For example:
    22.33.44.55 HOSTNAME

Terminate the printer service.

    For example:
    lpshut

Create a printer.

    For example:
    lpadmin -pRPrinter -v/dev/null -mrmodel-
    ormHOSTNAME -orpaux

Restart the print service.

    For example:
    lpshed

Enable the printer for use.

    For example:
    accept Rprinter

    enable Rprinter

To print, use the lp command.

    For example:
    lp -DRPrinter Print-File-Name

Setting up for SCO UNIX 4.2 or later (Open Server)

In the following steps, substitute the name that your printer will be known by for HOSTNAME, and the name by which you want your printer to be known for Rprinter.

Add the IP address and host name to the /etc/hosts file.

    For example:
    22.33.44.55 HOSTNAME

Execute rlpconf to register the printer.

    For example:
    rlpconf

Enter the name of the printer.

    For example:
    Please enter the printer name (q to quit):RPrinter

Specify the remote printer as the printer type.

    For example:
    Is Rprinter a remote printer or a local printer (r/l)? r

Enter the name of the remote printer’s host.

    For example:
    Please enter the name of the remote host that Rprinter is attached to:
    HOSTNAME Printer RPrinter is connected to host HOSTNAME

Confirm that the entries are correct.

    For example:
    Is this correct?(y/n)y

Specify that the RLP extended function (valid when the print server is SCO-UNIX) will not be used.

    For example:
    If HOSTNAME currently runs SCO OpenServer
    Release 5 or above, it can support the extended
    remote line printer protocol. Do you want to turn
    on the "extended RLP protocol" support flag?
    If you are not sure, answer "n"? (y/n)[n]n

Specify whether the created printer is to become the default printer.

    For example:
    Would you like this to be the system default printer? (y/n)y

To print, use the lpr command.

    For example:
    lpr -d RPrinter Print-File-Name

Top
Using the ftp Command

ftp commands are common to all UNIX systems.

ftp programs use interfaces that are common for all unix systems.

The following is an example of printing using the ftp command (the entry operations are underlined).

    ftp> open 22.33.44.55

    Connected to 22.33.44.55

    220 PR-Ifx(22.33.44.55) ftp server ready.

    Name:

    331 Password Required for (No Name).

    Password:

    230 User logged in.

    200 Type set to I.

    ftp> put binary file

    200 PORT command successful.

    150 Opening data connection for binary_file

    226 Transfer complete

    ftp> bye

Top