Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

SUSE Linux Enterprise Server (SLES 10) Installation and Administration
Previous Page Home Next Page

24.4 Configuring the Printer

After connecting the printer to the computer and installing the software, install the printer in the system. This should be done with the tools delivered with SUSE Linux Enterprise. Because SUSE Linux Enterprise puts great emphasis on security, third-party tools often have difficulties with the security restrictions and cause more complications than benefits. See Section 24.6.1, CUPS Server and Firewall and Section 24.6.2, Changes in the CUPS Print Service for more information about troubleshooting.

24.4.1 Local Printers

If an unconfigured local printer is detected when you log in, YaST starts for configuring it. This uses the same dialogs as the following description of configuration.

To configure the printer, select Hardware > Printer in the YaST control center. This opens the main printer configuration window, where the detected devices are listed in the upper part. The lower part lists any queues configured so far. If your printer was not detected, configure it manually.

IMPORTANT: If the Printer entry is not available in the YaST control center, the yast2-printer package probably is not installed. To solve this problem, install the yast2-printer package and restart YaST.

Automatic Configuration

YaST is able to configure the printer automatically if the parallel or USB port can be set up automatically and the connected printer can be detected. The printer database must also contain the ID string of the printer that YaST retrieves during the automatic hardware detection. If the hardware ID differs from the model designation, select the model manually.

To make sure that everything works properly, each configuration should be checked with the print test function of YaST. The test page also provides important information about the configuration tested.

Manual Configuration

If the requirements for automatic configuration are not met or if you want a custom setup, configure the printer manually. Depending on how successful the autodetection is and how much information about the printer model is found in the database, YaST may be able to determine the right settings automatically or at least make a reasonable preselection.

The following parameters must be configured:

Hardware Connection (Port)

The configuration of the hardware connection depends on whether YaST has been able to find the printer during hardware autodetection. If YaST is able to detect the printer model automatically, it can be assumed that the printer connection works on the hardware level and no settings need to be changed in this respect. If YaST is unable to autodetect the printer model, there may be some problem with the connection on the hardware level. In this case, some manual intervention is required to configure the connection.

In the Printer Configuration dialog, press Add to start the manual configuration workflow. Here, select your Printer Type (for example USB printer) and, with Next, enter the Printer Connection and select the device.

Name of the Queue

The queue name is used when issuing print commands. The name should be relatively short and consist of lowercase letters and numbers only. Enter the Name for printing in the next dialog (Queue name).

Printer Model and PPD File

All printer-specific parameters, such as the Ghostscript driver to use and the printer filter parameters for the driver, are stored in a PPD (PostScript Printer Description) file. See Section 24.3, Installing the Software for more information about PPD files.

For many printer models, several PPD files are available, for example, if several Ghostscript drivers work with the given model. When you select a manufacturer and a model in the next dialog (Printer model), YaST selects the PPD file that corresponds to the printer. If several PPD files are available for the model, YaST defaults to one of them (normally the one marked recommended). You can change the chosen PPD file in the next dialog with Edit.

For non-PostScript models, all printer-specific data is produced by the Ghostscript driver. For this reason, the driver configuration is the single most important factor determining the output quality. The printout is affected both by the kind of Ghostscript driver (PPD file) selected and the options specified for it. If necessary, change additional options (as made available by the PPD file) after selecting Edit.

Figure 24-1 Selecting the Printer Model

Always check whether your settings work as expected by printing the test page. If the output is garbled, for example, with several pages almost empty, you should be able to stop the printer by first removing all paper then stopping the test from YaST.

If the printer database does not include an entry for your model, you can either add a new PPD file by selecting Add PPD File to Database, or use a collection of generic PPD files to make the printer work with one of the standard printer languages. To do so, select UNKNOWN MANUFACTURER as your printer manufacturer.

Advanced Settings

Normally, you do not need to change any of these settings.

24.4.2 Network Printers

A network printer can support various protocols, some of them even concurrently. Although most of the supported protocols are standardized, some manufacturers expand (modify) the standard because they test systems that have not implemented the standard correctly or because they want to provide certain functions that are not available in the standard. Manufacturers then provide drivers for only a few operating systems, eliminating difficulties with those systems. Unfortunately, Linux drivers are rarely provided. The current situation is such that you cannot act on the assumption that every protocol works smoothly in Linux. Therefore, you may have to experiment with various options to achieve a functional configuration.

CUPS supports the socket, LPD, IPP, and smb protocols. Here is some detailed information about these protocols:

socket

Socket refers to a connection in which the data is sent to an Internet socket without first performing a data handshake. Some of the socket port numbers that are commonly used are 9100 or 35. An example device URI is socket://host-printer:9100/.

LPD (line printer daemon)

The proven LPD protocol is described in RFC 1179. Under this protocol, some job-related data, such as the ID of the printer queue, is sent before the actual print data is sent. Therefore, a printer queue must be specified when configuring the LPD protocol for the data transmission. The implementations of diverse printer manufacturers are flexible enough to accept any name as the printer queue. If necessary, the printer manual should indicate what name to use. LPT, LPT1, LP1, or similar names are often used. An LPD queue can also be configured on a different Linux or Unix host in the CUPS system. The port number for an LPD service is 515. An example device URI is lpd://host-printer/LPT1.

IPP (Internet printing protocol)

IPP is a relatively new (1999) protocol based on the HTTP protocol. With IPP, more job-related data is transmitted than with the other protocols. CUPS uses IPP for internal data transmission. This is the preferred protocol for a forwarding queue between two CUPS servers. The name of the print queue is necessary to configure IPP correctly. The port number for IPP is 631. Example device URIs are ipp://host-printer/ps and ipp://host-cupsserver/printers/ps.

SMB (Windows share)

CUPS also supports printing on printers connected to Windows shares. The protocol used for this purpose is SMB. SMB uses the port numbers 137, 138, and 139. Example device URIs are smb://user:password@workgroup/server/printer, smb://user:password@host/printer, and smb://server/printer.

The protocol supported by the printer must be determined before configuration. If the manufacturer does not provide the needed information, the command nmap, which comes with the nmap package, can be used to guess the protocol. nmap checks a host for open ports. For example:

nmap -p 35,137-139,515,631,9100-10000 printerIP

Configuring CUPS in the Network Using YaST

Network printers should be configured with YaST. YaST facilitates the configuration and is best equipped to handle the security restrictions in CUPS (see Section 24.6.2, Changes in the CUPS Print Service). For guidelines for installation of CUPS in the network, read the article CUPS in a Nutshell in the Support Database at https://en.opensuse.org/SDB:CUPS_in_a_Nutshell.

Start the printer configuration then click Add. If not told otherwise by the network administrator try the option Print Directly to a Network Printer and proceed according to your local requirements.

Configuring with Command Line Tools

Alternatively, CUPS can be configured with command-line tools like lpadmin and lpoptions. You need a device URI (uniform resource identifier) consisting of a back-end, such as usb, and parameters, like /dev/usb/lp0. For example, the full URI could be parallel:/dev/lp0 (printer connected to the first parallel port) or usb:/dev/usb/lp0 (first detected printer connected to the USB port).

With lpadmin, the CUPS server administrator can add, remove, or manage class and print queues. To add a printer queue use the following syntax:

lpadmin -p queue -v device-URI \
-P PPD-file -E

Then the device (-v) will be available as queue (-p), using the specified PPD file (-P). This means that you must know the PPD file and the name of the device if you want to configure the printer manually.

Do not use -E as the first option. For all CUPS commands, -E as the first argument sets use of an encrypted connection. To enable the printer, -E must be used as shown in the following example:

lpadmin -p ps -v parallel:/dev/lp0 -P \
/usr/share/cups/model/Postscript.ppd.gz -E
    

The following example configures a network printer:

lpadmin -p ps -v socket://192.168.1.0:9100/ -P \
/usr/share/cups/model/Postscript-level1.ppd.gz -E
   

For more options of lpadmin, see the lpadmin(1) man page.

During printer setup, certain options are set as default. These options can be modified for every print job (depending on the print tool used). Changing these default options with YaST is also possible. Using command line tools, set default options as follows:

  1. First, list all options:

    lpoptions -p queue -l

    Example:

    Resolution/Output Resolution: 150dpi *300dpi 600dpi

    The activated default option is evident from the preceding asterisk (*).

  2. Change the option with lpadmin:

    lpadmin -p queue -o Resolution=600dpi
  3. Check the new setting:

    lpoptions -p queue -l
    
    Resolution/Output Resolution: 150dpi 300dpi *600dpi

Settings are written to ~/.lpoptions when a normal user runs lpoptions. root settings are written to /etc/cups/lpoptions.

SUSE Linux Enterprise Server (SLES 10) Installation and Administration
Previous Page Home Next Page

 
 
  Published Courtesy of Novell, Inc. Design by Interspire