Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

34.11. Command Line Configuration

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.

34.11.1. Adding a Local Printer

To add a printer:

system-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 (if none is available) the printer manufacturer's name as it appears, in the foomatic database.

--model=model

(Required) The IEEE 1284 MODEL string or (if non is available) the printer model listed in the foomatic database.

--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") is used.

--as-default

(Optional) Set this as the default queue.

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

service cups restart

34.11.2. Removing a Local Printer

A printer queue can also be removed via the command line.

As root, to remove a printer queue:

system-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 it appears 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.

After removing the printer from the Printer Configuration Tool configuration, restart the printer daemon for the changes to take effect (as root):

service cups restart

If all printers have been removed, and you do not want to run the printer daemon anymore, execute the following command (as root):

service cups stop

34.11.3. Setting the Default Printer

To set the default printer, use the following command and specify the queuename:

system-config-printer-tui --Xdefault --queue=queuename

 
 
  Published under the terms of the GNU General Public License Design by Interspire