DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Getting Started with CUPS on UnixWare

Getting Started with CUPS on UnixWare

CUPS (the Common UNIX Print Subsystem) is similar in many ways to the standard System V LP subsystem traditionally provided as part of UnixWare. Many of the same commands (such as lp, lpadmin, cancel, etc.) are supported by both interfaces, though some may have a slightly differnt syntax.

Read the CUPS Release Notes thoroughly to help you decide whether to move to CUPS from System V LP, and then read this topic to get started once you switch to CUPS. The documentation provided with the CUPS distribution is available under the Printing topic, once you install the cupsdoc package.

Enabling CUPS

To see if CUPS is installed, enter the following command:

   pkginfo cups

See the CUPS Release Notes for installation information if CUPS is not installed.

If CUPS is installed, enter the following command to determine the currently enabled print service:

   chprnsys

This command will return eithet lp or cups as the active print subsystem. To make CUPS the active print subsystem, enter (as root):

   chprnsys cups

Setting Up a Printer in CUPS

Setting up a printer correctly in CUPS depends on two critical choices: the printer device name and the printer driver. Most tasks can be performed using the CUPS graphical interface, but some will require the lpadmin(1M) command.

Devices are selected from a drop-down menu in the graphical interface, and are not always correct. For example, you may need to change the device name for a USB printer if the interface does not present the correct device name in the menu. The procedure below shows you how to use the lpadmin command to reset the device name as necessary.

CUPS provides its own generic printer drivers, that provide basic printing functionality, including drivers for PostScript printers. The foomatic package provides dozens of printer drivers, and it is recommended you install this package to provide more printer driver choices. The foomatic package, however, does not provide PostScript drivers; the drivers in the foomatic package use the native language of the target printer, such as PCL. When printing PostScript files, the driver translates the PostScript to PCL, for example, before sending it to the printer.

Your printer may work with more than one driver, but will probably work best with one of the available choices.

To set up a printer using the CUPS graphical administration interface:

  1. Start any browser and open http://localhost:631.

  2. Select Administration from the menu at the top of the page. Enter the root login and password, and select OK.

  3. Select Add Printer from the Admin menu.

  4. Enter the printer name, and optional location and description. Select Continue.

  5. Choose the printer device from the drop-down box. The following is an example of the choices presented:
       AppSocket/HP JetDirect
       Internet Printing Protocol (ipp)
       Internet Printing Protocol (http)
       LPD/LPR Host or Printer
       Parallel Port #1
       Serial Port #1
       Serial Port #2
       USB Printer #1
    

    Note that if no USB Printer is displayed, but you have one connected, you may need to restart the CUPS server in order for CUPS to recognize it. Make sure the printer is connected properly and is turned on. Then, open an xterm window and enter the following command (as root):

       /etc/init.d/cups restart
    

    Select the browser's Reload or Refresh menu command; the USB Printer should now be listed in the device choices.

    Choose the appropriate device and select Continue.

  6. Select the printer manufacturer from the list displayed, or Generic. Note that some manufacturers have more than one entry, with different drivers models listed in the following screen.

  7. Choose the printer model from the list displayed, and select Continue. If the model of your printer is not listed, check the printer documentation to determine the nearest compatible model listed. Or, make no selection to go back to the previous list and try another manufacturer. See CUPS.

  8. The following message should be displayed:
       Printer printername has been added successfully.
    

    Select the printer name to go to the printer description.

  9. Check the printer details displayed. If something is incorrect, select the Modify Printer button to change the printer definition or driver. If the device URI is not correct, open an xterm window and type the following command (as root) to set the device URI appropriately:
       lpadmin -p printername -v deviceURI
    
    The deviceURI contains the type of interface and the device path. For example, for a parallel port printer, the device URI might be parallel:/dev/lp0. For a USB printer, it is recommended you use a device URI of usb:/dev/usb_prnt#. See Printing: USB Support for USB device naming conventions.

    Once you have changed the printer definition as needed, select the browser Reload or Refresh menu command to check your changes.

  10. Test the printer:

    1. Select the Print Test Page menu command from the CUPS printer description page.

    2. Open an xterm window, and enter the following:
         man lpadmin | lp -d printername
      

      The above command should print the lpadmin(1M) manual page on printer printername.

    If the test page does not print, prints poorly, or printer performance is not optimal, select the Modify Printer menu command on the printer's description page to try another printer manufacturer or model.

Printing from CUPS to a Windows Printer

This procedure was performed using an HP officejet v40 (USB) connected to a Windows XPPro system. The print queue name is HP on Windows.

  1. On Windows: select Start > Settings > Printers.

  2. Open the printer Properties box, and make sure that the printer is Shared. Select OK to close the Properties window.

  3. Select Start > Control Panel > Add or Remove Programs > add/Remove Windows Components

  4. Enable the check box next to Other Network File and Print Services.

  5. Select Details. Make sure Print Services for UNIX is selected. Select OK and then Next.

  6. If the system needs to load Print Services for UNIX from the Windows CD, it will ask for the CD. Insert the Windows Installation CD into the CD drive and click OK. (Cancel the Installation Wizard if it appears.) Click Finish once the driver is loaded.

  7. Close the Add or Remove Programs window.

  8. Open Administrative Tools.

  9. Open Services.

  10. Look for "TCP/IP Print Services" in list. Select the entry to open the Properties window. Enable Automatic startup, and start now.

  11. On UnixWare 7: Open http://localhost:631 with any browser on Unixware. Define "hp" as an lpd printer, raw interface, and pick the deskjet model.

  12. Enter the following to test the printer:
    lp -d hp <textfile>
    

Going Back to LP

If you decide to stop using CUPS, enter:

   chprnsys lp

This restores System V LP as the default print system, including the configuration saved when the print system was switched to CUPS. The cups package may now be removed from the system, if desired.


© 2003 The SCO Group, Inc. All rights reserved.