Installation guide

Chapter 21. Printer Configuration 193
Your configuration is saved to the file settings.xml.
If you save this file, you can restore your printer settings. This is useful if your printer config-
uration is deleted, you reinstall Red Hat Linux and do not have your printer configuration
file anymore, or you want to use the same printer configuration on multiple systems. To
restore the configuration, type this command as root:
/usr/sbin/printconf-tui --Ximport < settings.xml
If you already have a configuration file (you have configured one or more printers on the
system already) and you try to import another configuration file, the existing configuration
file will be overwritten. If you want to keep your existing configuration and add the config-
uration in the saved file, you can merge the files with the following command (as root):
/usr/sbin/printconf-tui --Ximport --merge < settings.xml
Your printer list will then consist of the printers you configured on the system as well as the
printers you imported from the saved configuration file. If the imported configuration file
has a print queue with the same name as an existing print queue on the system, the print
queue from the imported file will override the existing printer.
After importing the configuration file (with or without the merge command), you must
restart the printer daemon with the command /sbin/service lpd restart or by starting
printconf and clicking Apply.
21.10. Managing Your Print Jobs
When you send a print job to the printer daemon such as printing text file from Emacs or
printing an image from The 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 username of the person who sent the
request, the hostname of the system that sent the request, the job number, and more. To view
the list of print jobs in the print spool, open a shell prompt and type the command lpq. The
last few lines will look similar to the following:
Example 21-1. Example of lpq output
Rank Owner/ID Class Job Files Size Time
active user@localhost+902 A 902 sample.txt 2050 01:20:46
If you want to cancel a print job, find the job number of the request with the command lpq
and then use the command lprm job number. For example, lprm 902 would cancel the
print job in Example 21-1. You must have proper permissions to cancel a print job. You can
not cancel print jobs that were started by other users unless you are logged in as root on
machine to which the printer is attached.
You can also print a file directly from a shell prompt. For example, the command lpr sam-
ple.txt will print the text file sample.txt. The print filter determines what type of file it is
and converts it a format the printer can understand.
21.11. Configuring the CUPS Printing System
CUPS (Common UNIX Printing System) can be used instead of the default LPRng printing
system. Some of the advantages of CUPS include: