Friday, October 5, 2007

Redhat Linux -- Printer Tips

You may have number of printers configured on a Linux Servers and on some day the server needs the replacement, so you will need to configure the printers on new server again. Does this mean you have to run configuration to add all printers one by one?? NO, you don't. The easiest way it to export printers from original server & import it on any other server/s. Here are the steps in detail:
on original server, login as root and run following command to export all configured printers to file 'printers.xml'

#system-config-printer-tui --Xexport > printers.xml

Copy 'printers.xml' to the new server by the way you are comfortable.
Now run the following commands as root on the new server to import the printers:

#system-config-printer-tui --Ximport [--force/--merge] < printers.xml

import options:
overide the current settings with the imported settings, this is the default.
merge the current settings with the imported settings.


Just exit with 'yes' to save settings.

#lpstat -t

To verify that all printers are configured.