In my previous Blog (SuSE Linux at a Glance in View of Rechil Part-1), I have written a little about Linux. Don’t worry, there are lots more to write here. It is universally known that, the core architecture (i.e. kernel) of any Linux flavor is same and kernel is the heart of any Linux system. SuSE Linux which is a main product of Novell Inc., has distributed this product as Enterprise Server and Enterprise Desktop. SuSE stands for “Software- und System- Entwicklung”. There is also an unofficial rumor that the name is an analogy with the German computer pioneer Konrad Zuse.
If any module is configured through YaST , there is a back-end service called ‘SuSEconfig’ which I mentioned earlier. Now, the question is “What is the utility of SuSEconfig”….
When information enters is first written to a file in the directory called /etc/sysconfig before it is written into the final configuration file. It is a very important tool that is used to configure the system according to the variables that are set in the various files in /etc/sysconfig & its sub-directories. These files contain variables like SYSLOGD_PARAMS=”” in /etc/sysconfig/syslog & SMTPD_LISTEN_REMOTE=”no” in /etc/sysconfig/mail. After modification files in /etc/sysconfig/ using an editor, need to do is restart service for the change to take effect. It is also necessary to run SuSEconfig. For proper work, it is recommended run SuSEconfig after manually editing files in /etc/sysconfig. There is a specific scripts in /sbin/conf.d to configure the various subsystems while SuSEconfig uses this subsystem.
Printer Configuration through YaST….
Printers can be configured in two ways ! During installation, when hardware configuration dialog box appears, most of the printers are connected locally, can be detected automatically. And another is after installation through YaST Control Center. Or with the command yast2 printer and can start YaST printer configuration module directly from a terminal window (By right click on the desktop and select Terminal). To set up a Print Server, the packages are required….
- cups – provides printer daemon cupsd
- Cups-client – provides command line printing tools
- cups-libs – basically necessary for samba configuration
- cups-drivers – provides the PPD (PostScript Printer Daemon)
- cups-SuSE-ppds-dat – provides a pre-generated file which is in /etc/cups/ppds.dat
Until YaST is used for printer configuration, these files are not installed automatically.
There are two ways to add a printer. Through GUI (yast2) and from Command Line.
Through GUI i.e. yast2, you may open a terminal with root privilege and type as yast2 printer or from Yast Conrol Center > Printer > under Hardware > Printer. When a dialog box comes, the upper part lists the printers that have already been detected . If the printer does not show, then select Add to add it manually. Depending on selection here, the next dialog (Printer Configurations) offers like,
Print via Network
- Autoconfig Settings
If a printer is locally attached, then it shows in the list and the check boxes (Local & Remote) already checked. For this purpose, select Edit to configure with proper driver. If the printer does not show up in the upper part then it is necessary to configure it manually by selecting Add. Next select Connection Wizard and there are five sections.
- Directly Connected Device
Parallel Port (For Dot Matrix Printer type only)
USB Port (For DeskJet/Laserjet and this type)
Serial Port (Generally not in use)
Bluetooth (Connection via this type only)
SCSI (Generally not in use)
- HP Devices (HPLIP) (If HPLIP software is installed)
Note: To see if HPLIP is installed properly, open terminal and type as: hp-setup and on next dialog box comes as Choose Connection Type and then follow on-screen instructions.
Tips: To know more about HPLIP commands, simply type as: hp- and press TAB key twice. OR type as: hp-toolbox and see how it is easy to install HP printers on Linux systems. I recommended before install any HP printer, it is necessary to install HPLIP software including HP-Plug ins for smooth operation.
- Access Network Printer or Printserver Box via
TCP Port (AppSocket/JetDirect) (For HP JetDirect Printer only)
Line Printer Daemon (LPD) Protocol (Almost not in use)
- Internet Printing Protocol (IPP) (If there are more than one printer)
- Print via Print Server Machine
Microsoft Windows/SAMBA [SBM/CIFS] (Printer which is connected other than Linux OS)
Traditional UNIX Server (LPR)
- Novell Netware Print Server (IPX)
Specify Arbitrary Device URI (Also called Device URI)
Send Print Data to Other Program (pipe)
- Daisy-Chain Backend Error Handler (beh)
I am discussing here, which are the most important use that are based on network….
IPP is based on HTTP protocol. This is the preferred protocol for a forwarding queue between CUPS server. The port no of IPP is 631.
Device URI (Universal Resource Identifier) can be used to specify rather configure a printer.
LPD is described in RFC 1179 which is found at www. Ietf.org/rfc.html. The port no is 515.
SAMBA (SMB/CIFS) Standard Message Block/Common Internet File System) supports printing on printers connected to other than Linux OS or better to say Windows share. The port nos are 137; 138 and 139
TCP Port (AppSocket/JetDirect) is used to connect to a printer equipped with a network port as HP JetDirect system. The port nos are 9100 or 35.
Add a Printer from the Command Line….
After collecting the necessary informations like PPD (PostScript Printer Description) file and name of the printer and model, you may type the following to connect a printer ! (of course with root privilege)
lpadmin -p -v \ -P -E
-p specifies the print queue name, while -v sets the device URI attribute of the printer queue and -P is used to specify the PPD file.
Caution: Never use -E as the first option. It implies the use of an encrypted connection and as the end option enables printer to accept jobs.
To install a parallel printer type as:
lpadmin -p ps -v parallel:/dev/lp0 -P \ /usr/share/cups/model/xxxx.ppd.gz -E
Here /dev/lp0 means first parallel port of the printer. xxxx.ppd.gz means, the name of the PPD file.
Once again to add a network printer, type as:
lpadmin -p ps -v socket:/// -P \ /usr/share/cups/model/xxxx.ppd.gz -E
Here, 9100 is the port no and ipaddr means, the ip address of the computer where the printer locally attached/installed.
Notes: Documentation for these command line tools is installed with the package cups in /usr/share/doc/packages/cups/, for
1. CUPS Software Users Manual: sum.html and sum.pdf
2. CUPS Software Administration Manual: sam.html and sam.pdf
There are two kinds of style to manage printers.
1. Berkeley Style and
2. System V Style
Compared with Berkeley Style, System V Style provides more extensive range of features for printer administrations.
Generate a print job: Berkeley Style –
System V Style –
If you want to disable duplex printing just insert duplex=none before the printfilename.
To view possible options: lpoptions -l
Tips: For more information, type as man lpr and man lp
See the print jobs: lpq -P or lpstat -o -p
Cancel/Delete Print Jobs: lprm -P jobno or cancel jobno
Enable printer queue: /usr/bin/enable
Disable printer queue: /usr/bin/disable
Reject print jobs: /usr/sbin/reject
Accept print job: /usr/sbin/accept
Note: The reject command is useful, when need to perform maintenance on a printer and will not be available for a significant period of time. lpstat -a shows information on the accepting states of a queue.
To use the Web Interface for printer configuraton: http://<ipaddr>:631 for eg. 192.168.1.1:631 or http://localhost:631
Remember, Common Unix Printing System or CUPS is the default printing system used in most Linux OS. The main configuration file is /etc/cups/cupsd.conf. Information on print queues is kept in /etc/cups/printers.conf. The PPD files are generally located in /etc/cups/ppd/. The defined queues file is /etc/printcap.
To create a member of the CUPS administration group sys: lppasswd -a root -g sys
Here is the CUPS URL
There are lots more to tell on Printer Installation for various types or models of printers on Linux System. I will come on my next blog (in SuSE Linux at a Glance in View of Rechil Part-3). Needless to say that, Network Card can be also configured through command line.