If you do not have X installed and you do not want to use the text-based
version, you can add a printer via the command line. This method is useful
if you want to add a printer from a script or in the %post section of a
kickstart installation.
27.11.1. Adding a Local Printer
To add a printer:
redhat-config-printer-tui --Xadd-local options |
Options:
- --device=node
(Required) The device node to use. For example,
/dev/lp0.
- --make=make
(Required) The IEEE 1284 MANUFACTURER string or the printer
manufacturer's name as in the foomatic database if the
manufacturer string is not available.
- --model=model
(Required) The IEEE 1284 MODEL string or the printer model
listed in the foomatic database if the model string is not
available.
- --name=name
(Optional) The name to be given to the new queue. If one is not
given, a name based on the device node (such as "lp0")
will be used.
- --as-default
(Optional) Set this as the default queue.
If you are using CUPS as the printing system (the default), after adding
the printer, use the following command to start/restart the printer
daemon:
If you are using LPRng as the printing system, after adding the printer,
use the following command to start/restart the printer daemon:
27.11.2. Removing a Local Printer
A printer queue can also be removed via the command line.
As root, to remove a printer queue:
redhat-config-printer-tui --Xremove-local options |
Options:
- --device=node
(Required) The device node used such as
/dev/lp0.
- --make=make
(Required) The IEEE 1284 MANUFACTURER string, or (if none is
available) the printer manufacturer's name as in the foomatic
database.
- --model=model
(Required) The IEEE 1284 MODEL string, or (if none is available) the
printer model as listed in the foomatic database.
If you are using the CUPS printing system (the default), after removing
the printer from the Printer Configuration Tool
configuration, restart the printer daemon for the changes to take effect:
If you are using the LPRng printing system, after removing
the printer from the Printer Configuration Tool
configuration, restart the printer daemon for the changes to take effect:
If you are using CUPS, have removed all printers, and do not want to run the
printer daemon anymore, execute the following command:
If you are using LPRng, have removed all printers, and do not want to run the
printer daemon anymore, execute the following command: