The lpadmin command is used to configure printers. The following is an example of setting up a laser printer with CUPS. You will have to become root or use sudo to execute these commands:
====================================================================================
/usr/sbin/lpadmin -p Laser -v parallel:/dev/lp0 -P /root/laser.ppd
/usr/bin/enable Laser
/usr/sbin/accept Laser
/usr/sbin/lpadmin -d Laser
====================================================================================
Please note that bash has a builtin command called enable, so bash users must use the full path (/usr/bin/enable) to enable printers.
The first command creates a new printer called "Laser" that is connected to the first parallel port and is using the PPD file /root/laser.ppd. "Laser" is then enabled and told to accept jobs with the enable and accept commands. The last command sets "Laser" as the default printer.
If your printer is connected to a USB port or if you do not know the correct device-uri for your printer try running /usr/sbin/lpinfo -v to get a list of available printer devices.
Make sure your printer's page size and other options are set correctly by running /usr/bin/lpoptions -l. More detailed information about printer configuration is available in the CUPS documentation.
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment