Chapter 8: Printer Configuration


Printer configuration has long been a headache for Linux and UNIX administrators. Red Hat Linux provides the Printer Configuration Tool for streamlining the task of configuring LPRng, the default printing system. As an alternative to LPRng, Red Hat Linux also includes the Common Unix Printing System (CUPS), which can be configured through a Web interface.

The Printer Configuration Tool allows users to configure a printer in Red Hat Linux. It helps maintain the /etc/printcap configuration file, print spool directories, and print filters. Starting with version 8.0, Red Hat Linux ships with two printer systems. The Printer Configuration Tool configures the printing system called LPRng. LPRng is also the default printing system. This chapter focuses on using the Printer Configuration Tool to configure LPRng. For more information on the alternate printing system called CUPS, refer to the “Configuring CUPS” section of this chapter.

To use the Printer Configuration Tool, you must have root privileges. To start the application, select Main Menu Button (on the Panel) > System Settings > Printing, or type redhat-config-printer. This command automatically determines whether to run the graphical or text-based version. You can also force the Printer Configuration Tool to run as a text-based application by using the command redhat-config-printer-tui from a shell prompt. To add a printer using the command-line version, refer to the “Command-Line Configuration” section of this chapter.

Warning

Do not edit the /etc/printcap file. Each time the printer daemon (lpd) is started or restarted, a new /etc/printcap file is dynamically created.

If you want to add a printer without using the Printer Configuration Tool, edit the /etc/printcap.local file. The entries in /etc/printcap.local are not displayed in the Printer Configuration Tool but are read by the printer daemon. If you upgrade your system from a previous version of Red Hat Linux, your existing configuration file is converted to the new format used by this application. Each time a new configuration file is generated, the old file is saved as /etc/printcap.old.

click to expand
Figure 8-1: The Printer Configuration Tool

Five types of print queues can be configured:

  • Local Printer — a printer attached directly to your computer through a parallel or USB port. In the main printer list as shown in Figure 8-1, the Queue Type for a local printer is set to LOCAL.

  • Unix Printer (lpd Spool) — a printer attached to a different UNIX system that can be accessed over a TCP/IP network (for example, a printer attached to another Red Hat Linux system on your network). In the main printer list as shown in Figure 8-1, the Queue Type for a remote UNIX printer is set to LPD.

  • Windows Printer (SMB) — a printer attached to a different system that is sharing a printer over a SMB network (for example, a printer attached to a Microsoft Windows machine). In the main printer list as shown in Figure 8-1, the Queue Type for a remote Windows printer is set to SMB.

  • Novell Printer (NCP Queue) — a printer attached to a different system that uses Novell’s NetWare network technology. In the main printer list as shown in Figure 8-1, the Queue Type for a remote Novell printer is set to NCP.

  • JetDirect Printer — a printer connected directly to the network through HP JetDirect instead of to a computer. In the main printer list as shown in Figure 8-1, the Queue Type for a JetDirect printer is set to JETDIRECT.

    Note

    If you add a new print queue or modify an existing one, you need to restart the printer daemon (lpd) for the changes to take effect.

Clicking the Apply button saves any changes that you have made and restarts the printer daemon. The changes are not written to the /etc/printcap configuration file until the printer daemon (lpd) is restarted. Alternatively, you can choose File > Save Changes and then choose File > Restart lpd to save your changes and then restart the printer daemon.

If a printer appears in the main printer list with the Queue Type set to INVALID, the Printer Configuration Tool is missing options that are required for the printer to function properly. To remove this printer from the list, select it from the list and click the Delete button.

Adding a Local Printer

To add a local printer such as one attached to the parallel or USB port of your computer, click the New button in the main Printer Configuration Tool window. The window shown in Figure 8-2 will appear. Click Next to proceed.

click to expand
Figure 8-2: Adding a printer

You will then see the screen shown in Figure 8-3. Enter a unique name for the printer in the Queue Name text field. This can be any descriptive name for your printer. The printer name cannot contain spaces and must begin with a letter a through z or A through Z. The valid characters are a through z, A through Z, 0 through 9, -, and _ (underscore). Select Local Printer from the Queue Type menu and click Next.

The Printer Configuration Tool attempts to detect your printer device and model as shown in Figure 8-4. If your printer device is not shown, click Custom Device. Type the name of your printer device and click OK to add it to the printer device list. A printer device attached to the parallel port is usually referred to as /dev/lp0. A printer device attached to the USB port is usually referred to as /dev/usblp0. If your printer model does not appear, you will be given the opportunity to select it in the next step. Click Next to continue.

click to expand
Figure 8-3: Adding a local printer

click to expand
Figure 8-4: Local printer device

If the Printer Configuration Tool detects your printer model, it displays the recommended print driver. Skip to the section “Selecting the Print Driver and Finishing” to continue.

Adding a Remote UNIX Printer

To add a remote UNIX printer, such as one attached to a different Linux system on the same network, click the New button in the main Printer Configuration Tool window. The window shown in Figure 8-2 will appear. Click Next to proceed.

You will then see the screen shown in Figure 8-5. Enter a unique name for the printer in the Queue Name text field. The printer name cannot contain spaces and must begin with a letter a through z or A through Z. The valid characters are a through z, A through Z, 0 through 9, -, and _ (underscore). Select Unix Printer from the Queue Type menu and click Next.

Text fields for the following options appear as shown in Figure 8-6:

  • Server — The hostname or IP address of the remote machine to which the printer is attached.

  • Queue — The remote printer queue. The default printer queue is usually lp. By default, the Strict RFC1179 Compliance option is not chosen. If you are having problems printing to a non-Linux lpd queue, choose this option to disable enhanced LPRng printing features.

Click Next to continue.

click to expand
Figure 8-5: Adding a remote printer

The next step is to select the type of printer that is connected to the remote system. Skip to the section “Selecting the Print Driver and Finishing” to continue.

click to expand
Figure 8-6: Choosing the printer server

Note

The remote machine must be configured to allow the local machine to print on the desired queue. As root, create the file /etc/hosts.lpd on the remote machine to which the printer is attached. On separate lines in the file, add the IP address or hostname of each machine that should have printing privileges.

Adding a Samba (SMB) Printer

To add a printer that is accessed using the SMB protocol (such as a printer attached to a Microsoft Windows system), click the New button in the main Printer Configuration Tool window. The window shown in Figure 8-2 will appear. Click Next to proceed.

You will see the screen shown in Figure 8-7. Enter a unique name for the printer in the Queue Name text field. The printer name cannot contain spaces and must begin with a letter a through z or A through Z. The valid characters are a through z, A through Z, 0 through 9, -, and _ (underscore). Select Windows Printer from the Queue Type menu and click Next. If the printer is attached to a Microsoft Windows system, choose this queue type.

click to expand
Figure 8-7: Adding an SMB printer

Text fields for the following options appear as shown in Figure 8-8:

  • Share — The name of the shared printer on which you want to print. This name must be the same name defined as the Samba printer on the remote Windows machine. Notice the syntax of //machinename/sharename.

  • User — The name of the user you must log in as to access the printer. This user must exist on the Windows system, and the user must have permission to access the printer. The default user name is typically guest for Windows servers, or nobody for Samba servers.

  • Host IP — The hostname or IP address of the remote system that is sharing the SMB printer.

  • Password — The password (if required) for the user specified in the User field.

  • Workgroup — The name of the workgroup on the machine running Samba.

Click the Translate \n => \r\n button to translate the end-of-line characters to a form that is readable by a Microsoft Windows system. Click Next to continue.

The next step is to select the type of printer that is connected to the remote SMB system. Skip to the section “Selecting the Print Driver and Finishing” to continue.

click to expand
Figure 8-8: Choosing the print server

Note

If you require a username and password for an SMB (LAN Manager) print queue, they are stored unencrypted in the spool directory, which only root or lp may read. Thus, it is possible for others to learn the username and password if they have root access. To avoid this, the username and password to access the printer should be different from the username and password used for the user’s account on the local Red Hat Linux system. If they are different, then the only possible security compromise would be unauthorized use of the printer. If there are file shares from the SMB server, it is recommended that they also use a different password from the one for the print queue.

Adding a Novell NetWare (NCP) Printer

To add a Novell NetWare (NCP) printer, click the New button in the main Printer Configuration Tool window. The window shown in Figure 8-2 will appear. Click Next to proceed.

You will see the screen shown in Figure 8-9. Enter a unique name for the printer in the Queue Name text field. The printer name cannot contain spaces and must begin with a letter a through z or A through Z. The valid characters are a through z, A through Z, 0 through 9, -, and _ (underscore). Select Novell Printer from the Queue Type menu and click Next.

Text fields for the following options appear below the Queue Type menu as shown in Figure 8-10:

  • Server — The hostname or IP address of the NCP system to which the printer is attached.

  • Queue — The remote queue for the printer on the NCP system.

  • User — The name of the user you must log in as to access the printer.

  • Password — The password for the user specified in the User field above.

    click to expand
    Figure 8-9: Adding an NCP printer

    click to expand
    Figure 8-10: Choosing the print server

The next step is to select the type of printer that is connected to the remote NCP system. Skip to the section “Selecting the Print Driver and Finishing” to continue.

Note

If you require a username and password for a NCP (NetWare) print queue, they are stored. Thus, it is possible for another person to learn the username and password. To avoid this, the username and password to use the printer should be different from the username and password used for the user’s account on the local Red Hat Linux system. If they are different, then the only possible security compromise would be unauthorized use of the printer.

Adding a JetDirect Printer

To add a JetDirect printer, click the New button in the main Printer Configuration Tool window. The window shown in Figure 8-2 will appear. Click Next to proceed.

You will see the screen shown in Figure 8-11. Enter a unique name for the printer in the Queue Name text field. The printer name cannot contain spaces and must begin with a letter a through z or A through Z. The valid characters are a through z, A through Z, 0 through 9, -, and _ (underscore). Select JetDirect Printer from the Queue Type menu and click Next.

click to expand
Figure 8-11: Adding a JetDirect printer

Text fields for the following options appear below the Queue Type menu as shown in Figure 8-12:

  • Printer IP — The hostname or IP address of the JetDirect printer.

  • Port — The port on the JetDirect printer that is listening for print jobs. The default port is 9100.

    click to expand
    Figure 8-12: Choosing a print server

The next step is to select the type of printer that is connected to the JetDirect system. Skip to the section “Selecting the Print Driver and Finishing” to continue.




Official Red Hat Linux Administrator's Guide
Official Red Hat Linux Administrators Guide
ISBN: 0764516957
EAN: 2147483647
Year: 2002
Pages: 278
Authors: Red Hat Inc

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net