After connecting the printer to the computer and installing the software, the printer must be installed in the system. If possible, this should be done with the tools delivered with SUSE LINUX, not with any other tools. As SUSE LINUX puts great emphasis on security, third-party tools often have difficulties with the security restrictions and end up causing more complications than benefits.
If your local printer is detected as not yet configured when you log in, a YaST module starts for configuring it (see Section 22.214.171.124. “Configuration with YaST”). To configure the printer with command-line tools, you need a device URI, such as parallel:/dev/lp0 (printer connected to the first parallel port) or usb:/dev/usb/lp1 (first detected printer connected to the USB port).
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 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. Example for a device URI: socket://host-printer:9100/
The proven LPD protocol is described in RFC 1179. Under this protocol, some job-related data, such as the print queue, is sent before the actual print data is sent. Therefore, a print 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 print queue. If necessary, the printer manual may indicate which name to use. LPT, LPT1, LP1, or similar names are often used. Of course, 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. Example for a device URI: lpd://host-printer/LPT1
IPP is a relatively new (1999) protocol based on the HTTP protocol. With IPP, more job-related data is transmitted than in 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 for a device URI: ipp://host-printer/ps or ipp://host-cupsserver/printers/ps
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 for a device URI:
smb://user:password@workgroup/server/printer smb://user:password@host/printer smb://server/printer
The protocol supported by the printer must be determined prior to the configuration. If the manufacturer does not provide the needed information, the command nmap (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
Network printers should be configured with YaST. YaST facilitates the configuration and is best equipped to handle the security restrictions in CUPS (see Section 2.4.3. “Printer”).
Alternatively, CUPS can be configured with command-line tools. If the preparatory work has been done (i.e., if you know the PPD file and the name of the device), the following steps are necessary:
lpadmin -p <queue> -v <device-URI> \ -P <PPD-file> -E
Do not use -E as the first option. For all CUPS commands, -E as the first argument implies the 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
Example for a network printer:
lpadmin -p ps -v socket://192.168.1.0:9100/ -P \ /usr/share/cups/model/Postscript-level1.ppd.gz -E
YaST allows certain options to be activated by default during the installation. These options can be modified for every print job (depending on the print tool used) or specified later (e.g., with YaST).
Using command-line tools, this can be done as follows:
First, list all options:
lpoptions -p <queue> -l
Resolution/Output Resolution: 150dpi *300dpi 600dpi 1200dpi
The activated default option is evident from the preceding asterisk (*).
Change the option with lpadmin:
lpadmin -p <queue> -o Resolution=600dpi
Check the new setting:
lpoptions -p <queue> -l
Resolution/Output Resolution: 150dpi 300dpi *600dpi 1200dpi