Command-Line Configuration


If you do not have X installed and you do not want to use the text-based version of the Printer Configuration Tool, you can add a printer using the command line. This method is useful if you want to add a printer from a script or in the process of a kickstart installation.

Adding a Printer

To add a printer, type this command:

redhat-config-printer-tui --Xadd-local options

Following are the available 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 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.

After adding the printer, use the following command to start/restart the printer daemon, lpd:

service lpd restart

Removing a Printer

You can also remove a printer queue with the command line. To remove a printer queue, type the following command:

redhat-config-printer-tui --Xremove-local options

Following are the available options:

--device=node

Required. The device node used (for example, /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 in the foomatic database.

After removing the printer from the Printer Configuration Tool configuration, use the following command to restart the printer daemon for the changes to take effect:

service lpd restart

If you removed all printers and do not want to run the printer daemon anymore, execute the following command:

service lpd stop




Official Red Hat Linux Administrator's Guide
Official Red Hat Linux Administrators Guide
ISBN: 0764516957
EAN: 2147483647
Year: 2002
Pages: 278
Authors: Red Hat Inc

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net