14.3. Print Settings

The Print Settings tool serves for printer configuring, maintenance of printer configuration files, print spool directories and print filters, and printer classes management.
The tool is based on the Common Unix Printing System (CUPS). If you upgraded the system from a previous Red Hat Enterprise Linux version that used CUPS, the upgrade process preserved the configured printers.

Important

The cupsd.conf man page documents configuration of a CUPS server. It includes directives for enabling SSL support. However, CUPS does not allow control of the protocol versions used. Due to the vulnerability described in Resolution for POODLE SSLv3.0 vulnerability (CVE-2014-3566) for components that do not allow SSLv3 to be disabled via configuration settings, Red Hat recommends that you do not rely on this for security. It is recommend that you use stunnel to provide a secure tunnel and disable SSLv3. For more information on using stunnel, see the Red Hat Enterprise Linux 7 Security Guide.
For ad-hoc secure connections to a remote system's Print Settings tool, use X11 forwarding over SSH as described in Section 10.4.1, “X11 Forwarding”.

Note

You can perform the same and additional operations on printers directly from the CUPS web application or command line. To access the application, in a web browser, go to http://localhost:631/. For CUPS manuals refer to the links on the Home tab of the web site.

14.3.1. Starting the Print Settings Configuration Tool

With the Print Settings configuration tool you can perform various operations on existing printers and set up new printers. You can also use CUPS directly (go to http://localhost:631/ to access the CUPS web application).
To start the Print Settings tool from the command line, type system-config-printer at a shell prompt. The Print Settings tool appears. Alternatively, if using the GNOME desktop, press the Super key to enter the Activities Overview, type Print Settings and then press Enter. The Print Settings tool appears. The Super key appears in a variety of guises, depending on the keyboard and other hardware, but often as either the Windows or Command key, and typically to the left of the Spacebar.
The Print Settings window depicted in Figure 14.3, “Print Settings window” appears.
Print Settings window

Figure 14.3. Print Settings window

14.3.2. Starting Printer Setup

Printer setup process varies depending on the printer queue type.
If you are setting up a local printer connected with USB, the printer is discovered and added automatically. You will be prompted to confirm the packages to be installed and provide an administrator or the root user password. Local printers connected with other port types and network printers need to be set up manually.
Follow this procedure to start a manual printer setup:
  1. Go to ServerNewPrinter.
  2. In the Authenticate dialog box, enter an administrator or root user password. If this is the first time you have configured a remote printer you will be prompted to authorize an adjustment to the firewall.
  3. Select the printer connection type and provide its details in the area on the right.

14.3.3. Adding a Local Printer

Follow this procedure to add a local printer connected with other than a serial port:
  1. Open the Add printer dialog (refer to Section 14.3.2, “Starting Printer Setup”).
  2. If the device does not appear automatically, select the port to which the printer is connected in the list on the left (such as Serial Port #1 or LPT #1).
  3. On the right, enter the connection properties:
    for Other
    URI (for example file:/dev/lp0)
    for Serial Port
    Baud Rate
    Parity
    Data Bits
    Flow Control
    Adding a local printer

    Figure 14.4. Adding a local printer

  4. Click Forward.
  5. Select the printer model. See Section 14.3.8, “Selecting the Printer Model and Finishing” for details.

14.3.4. Adding an AppSocket/HP JetDirect printer

Follow this procedure to add an AppSocket/HP JetDirect printer:
  1. In the list on the left, select Network PrinterAppSocket/HP JetDirect.
  2. On the right, enter the connection settings:
    Hostname
    Printer host name or IP address.
    Port Number
    Printer port listening for print jobs (9100 by default).
    Adding a JetDirect printer

    Figure 14.5. Adding a JetDirect printer

  3. Click Forward.
  4. Select the printer model. See Section 14.3.8, “Selecting the Printer Model and Finishing” for details.

14.3.5. Adding an IPP Printer

An IPP printer is a printer attached to a different system on the same TCP/IP network. The system this printer is attached to may either be running CUPS or simply configured to use IPP.
If a firewall is enabled on the printer server, then the firewall must be configured to allow incoming TCP connections on port 631. Note that the CUPS browsing protocol allows client machines to discover shared CUPS queues automatically. To enable this, the firewall on the client machine must be configured to allow incoming UDP packets on port 631.
Follow this procedure to add an IPP printer:
  1. Open the New Printer dialog (refer to Section 14.3.2, “Starting Printer Setup”).
  2. In the list of devices on the left, select Network Printer and Internet Printing Protocol (ipp) or Internet Printing Protocol (https).
  3. On the right, enter the connection settings:
    Host
    The host name of the IPP printer.
    Queue
    The queue name to be given to the new queue (if the box is left empty, a name based on the device node will be used).
    Adding an IPP printer

    Figure 14.6. Adding an IPP printer

  4. Click Forward to continue.
  5. Select the printer model. See Section 14.3.8, “Selecting the Printer Model and Finishing” for details.

14.3.6. Adding an LPD/LPR Host or Printer

Follow this procedure to add an LPD/LPR host or printer:
  1. Open the New Printer dialog (refer to Section 14.3.2, “Starting Printer Setup”).
  2. In the list of devices on the left, select Network PrinterLPD/LPR Host or Printer.
  3. On the right, enter the connection settings:
    Host
    The host name of the LPD/LPR printer or host.
    Optionally, click Probe to find queues on the LPD host.
    Queue
    The queue name to be given to the new queue (if the box is left empty, a name based on the device node will be used).
    Adding an LPD/LPR printer

    Figure 14.7. Adding an LPD/LPR printer

  4. Click Forward to continue.
  5. Select the printer model. See Section 14.3.8, “Selecting the Printer Model and Finishing” for details.

14.3.7. Adding a Samba (SMB) printer

Follow this procedure to add a Samba printer:

Note

Note that in order to add a Samba printer, you need to have the samba-client package installed. You can do so by running, as root:
yum install samba-client
For more information on installing packages with Yum, refer to Section 8.2.4, “Installing Packages”.
  1. Open the New Printer dialog (refer to Section 14.3.2, “Starting Printer Setup”).
  2. In the list on the left, select Network PrinterWindows Printer via SAMBA.
  3. Enter the SMB address in the smb:// field. Use the format computer name/printer share. In Figure 14.8, “Adding a SMB printer”, the computer name is dellbox and the printer share is r2.
    Adding a SMB printer

    Figure 14.8. Adding a SMB printer

  4. Click Browse to see the available workgroups/domains. To display only queues of a particular host, type in the host name (NetBios name) and click Browse.
  5. Select either of the options:
    • Prompt user if authentication is required: user name and password are collected from the user when printing a document.
    • Set authentication details now: provide authentication information now so it is not required later. In the Username field, enter the user name to access the printer. This user must exist on the SMB 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.
  6. Enter the Password (if required) for the user specified in the Username field.

    Warning

    Samba printer user names and passwords are stored in the printer server as unencrypted files readable by root and the Linux Printing Daemon, lpd. Thus, other users that have root access to the printer server can view the user name and password you use to access the Samba printer.
    Therefore, when you choose a user name and password to access a Samba printer, it is advisable that you choose a password that is different from what you use to access your local Red Hat Enterprise Linux system.
    If there are files shared on the Samba print server, it is recommended that they also use a password different from what is used by the print queue.
  7. Click Verify to test the connection. Upon successful verification, a dialog box appears confirming printer share accessibility.
  8. Click Forward.
  9. Select the printer model. See Section 14.3.8, “Selecting the Printer Model and Finishing” for details.

14.3.8. Selecting the Printer Model and Finishing

Once you have properly selected a printer connection type, the system attempts to acquire a driver. If the process fails, you can locate or search for the driver resources manually.
Follow this procedure to provide the printer driver and finish the installation:
  1. In the window displayed after the automatic driver detection has failed, select one of the following options:
    • Select a Printer from database — the system chooses a driver based on the selected make of your printer from the list of Makes. If your printer model is not listed, choose Generic.
    • Provide PPD file — the system uses the provided PostScript Printer Description (PPD) file for installation. A PPD file may also be delivered with your printer as being normally provided by the manufacturer. If the PPD file is available, you can choose this option and use the browser bar below the option description to select the PPD file.
    • Search for a printer driver to download — enter the make and model of your printer into the Make and model field to search on OpenPrinting.org for the appropriate packages.
    Selecting a printer brand

    Figure 14.9. Selecting a printer brand

  2. Depending on your previous choice provide details in the area displayed below:
    • Printer brand for the Select printer from database option.
    • PPD file location for the Provide PPD file option.
    • Printer make and model for the Search for a printer driver to download option.
  3. Click Forward to continue.
  4. If applicable for your option, window shown in Figure 14.10, “Selecting a printer model” appears. Choose the corresponding model in the Models column on the left.

    Note

    On the right, the recommended printer driver is automatically selected; however, you can select another available driver. The print driver processes the data that you want to print into a format the printer can understand. Since a local printer is attached directly to your computer, you need a printer driver to process the data that is sent to the printer.
    Selecting a printer model

    Figure 14.10. Selecting a printer model

  5. Click Forward.
  6. Under the Describe Printer enter a unique name for the printer in the Printer Name field. The printer name can contain letters, numbers, dashes (-), and underscores (_); it must not contain any spaces. You can also use the Description and Location fields to add further printer information. Both fields are optional, and may contain spaces.

    Figure 14.11. Printer setup

  7. Click Apply to confirm your printer configuration and add the print queue if the settings are correct. Click Back to modify the printer configuration.
  8. After the changes are applied, a dialog box appears allowing you to print a test page. Click Yes to print a test page now. Alternatively, you can print a test page later as described in Section 14.3.9, “Printing a Test Page”.

14.3.9. Printing a Test Page

After you have set up a printer or changed a printer configuration, print a test page to make sure the printer is functioning properly:
  1. Right-click the printer in the Printing window and click Properties.
  2. In the Properties window, click Settings on the left.
  3. On the displayed Settings tab, click the Print Test Page button.

14.3.10. Modifying Existing Printers

To delete an existing printer, in the Print Settings window, select the printer and go to PrinterDelete. Confirm the printer deletion. Alternatively, press the Delete key.
To set the default printer, right-click the printer in the printer list and click the Set as Default button in the context menu.

14.3.10.1. The Settings Page

To change printer driver configuration, double-click the corresponding name in the Printer list and click the Settings label on the left to display the Settings page.
You can modify printer settings such as make and model, print a test page, change the device location (URI), and more.
Settings page

Figure 14.12. Settings page

14.3.10.2. The Policies Page

Click the Policies button on the left to change settings in printer state and print output.
You can select the printer states, configure the Error Policy of the printer (you can decide to abort the print job, retry, or stop it if an error occurs).
You can also create a banner page (a page that describes aspects of the print job such as the originating printer, the user name from the which the job originated, and the security status of the document being printed): click the Starting Banner or Ending Banner drop-down menu and choose the option that best describes the nature of the print jobs (for example, confidential).
14.3.10.2.1. Sharing Printers
On the Policies page, you can mark a printer as shared: if a printer is shared, users published on the network can use it. To allow the sharing function for printers, go to ServerSettings and select Publish shared printers connected to this system.
Policies page

Figure 14.13. Policies page

Make sure that the firewall allows incoming TCP connections to port 631, the port for the Network Printing Server (IPP) protocol. To allow IPP traffic through the firewall on Red Hat Enterprise Linux 7, make use of firewalld's IPP service. To do so, proceed as follows:

Procedure 14.4. Enabling IPP Service in firewalld

  1. To start the graphical firewall-config tool, press the Super key to enter the Activities Overview, type firewall and then press Enter. The Firewall Configuration window opens. You will be prompted for an administrator or root password.
    Alternatively, to start the graphical firewall configuration tool using the command line, enter the following command as root user:
    ~]# firewall-config
    The Firewall Configuration window opens.
    Look for the word Connected in the lower left corner. This indicates that the firewall-config tool is connected to the user space daemon, firewalld.
    To immediately change the current firewall settings, ensure the drop-down selection menu labeled Configuration is set to Runtime. Alternatively, to edit the settings to be applied at the next system start, or firewall reload, select Permanent from the drop-down list.
  2. Select the Zones tab and then select the firewall zone to correspond with the network interface to be used. The default is the public zone. The Interfaces tab shows what interfaces have been assigned to a zone.
  3. Select the Services tab and then select the ipp service to enable sharing. The ipp-client service is required for accessing network printers.
  4. Close the firewall-config tool.
For more information on opening and closing ports in firewalld, see the Red Hat Enterprise Linux 7 Security Guide.
14.3.10.2.2. The Access Control Page
You can change user-level access to the configured printer on the Access Control page. Click the Access Control label on the left to display the page. Select either Allow printing for everyone except these users or Deny printing for everyone except these users and define the user set below: enter the user name in the text box and click the Add button to add the user to the user set.
Access Control page

Figure 14.14. Access Control page

14.3.10.2.3. The Printer Options Page
The Printer Options page contains various configuration options for the printer media and output, and its content may vary from printer to printer. It contains general printing, paper, quality, and printing size settings.
Printer Options page

Figure 14.15. Printer Options page

14.3.10.2.4. Job Options Page
On the Job Options page, you can detail the printer job options. Click the Job Options label on the left to display the page. Edit the default settings to apply custom job options, such as number of copies, orientation, pages per side, scaling (increase or decrease the size of the printable area, which can be used to fit an oversize print area onto a smaller physical sheet of print medium), detailed text options, and custom job options.
Job Options page

Figure 14.16. Job Options page

14.3.10.2.5. Ink/Toner Levels Page
The Ink/Toner Levels page contains details on toner status if available and printer status messages. Click the Ink/Toner Levels label on the left to display the page.
Ink/Toner Levels page

Figure 14.17. Ink/Toner Levels page

14.3.10.3. Managing Print Jobs

When you send a print job to the printer daemon, such as printing a text file from Emacs or printing an image from GIMP, the print job is added to the print spool queue. The print spool queue is a list of print jobs that have been sent to the printer and information about each print request, such as the status of the request, the job number, and more.
During the printing process, the Printer Status icon appears in the Notification Area on the panel. To check the status of a print job, click the Printer Status, which displays a window similar to Figure 14.18, “GNOME Print Status”.
GNOME Print Status

Figure 14.18. GNOME Print Status

To cancel, hold, release, reprint or authenticate a print job, select the job in the GNOME Print Status and on the Job menu, click the respective command.
To view the list of print jobs in the print spool from a shell prompt, type the command lpstat -o. The last few lines look similar to the following:

Example 14.4. Example of lpstat -o output

$ lpstat -o
Charlie-60              twaugh            1024   Tue 08 Feb 2011 16:42:11 GMT
Aaron-61                twaugh            1024   Tue 08 Feb 2011 16:42:44 GMT
Ben-62                  root              1024   Tue 08 Feb 2011 16:45:42 GMT
If you want to cancel a print job, find the job number of the request with the command lpstat -o and then use the command cancel job number. For example, cancel 60 would cancel the print job in Example 14.4, “Example of lpstat -o output”. You cannot cancel print jobs that were started by other users with the cancel command. However, you can enforce deletion of such job by issuing the cancel -U root job_number command. To prevent such canceling, change the printer operation policy to Authenticated to force root authentication.
You can also print a file directly from a shell prompt. For example, the command lp sample.txt prints the text file sample.txt. The print filter determines what type of file it is and converts it into a format the printer can understand.

14.3.11. Additional Resources

To learn more about printing on Red Hat Enterprise Linux, see the following resources.

Installed Documentation

  • lp(1) — The manual page for the lp command that allows you to print files from the command line.
  • lpr(1) — The manual page for the lpr command that allows you to print files from the command line.
  • cancel(1) — The manual page for the command-line utility to remove print jobs from the print queue.
  • mpage(1) — The manual page for the command-line utility to print multiple pages on one sheet of paper.
  • cupsd(8) — The manual page for the CUPS printer daemon.
  • cupsd.conf(5) — The manual page for the CUPS printer daemon configuration file.
  • classes.conf(5) — The manual page for the class configuration file for CUPS.
  • lpstat(1) — The manual page for the lpstat command, which displays status information about classes, jobs, and printers.

Online Documentation

  • http://www.linuxprinting.org/ — The OpenPrinting group on the Linux Foundation website contains a large amount of information about printing in Linux.
  • http://www.cups.org/ — The CUPS website provides documentation, FAQs, and newsgroups about CUPS.