Thursday, February 7, 2013

RC » Home » » » » » » » Command line based Linux printer installation

Command line based Linux printer installation

 In order to install a new printer to your computer on the command line you can use the tool lpadmin. You have to be root (or make an su) to use lpadmin

General syntax for the lpadmin command:

/usr/sbin/lpadmin -p [printername] -E -v[device] -m[ppd-file

Options:
-p: followed by printer name (chosen by admin)
-E: enables print queue
-v: followed by device e.g. File:/ , parallel:/ , lpd:/ , socket:/ ,
ipp:/ . Choose the type of device your printer is connected to. If it is connected via the network, choose lpd. If it is connected locally to your computer, choose lpd and so on.

-m: The PPD file is taken from /usr/share/cups/model . You can choose every possible directory for installing the needed PPD file. There is no need to copy it into a specific directory (mostly this would be /usr/share/cups/model ), lpadmin would do this for you.

2. After installation you should configure the printer depending on the installed hardware and your needs. For system wide configuration of your printers you have to edit the PPD files in
/etc/cups/ppd/[printername].ppd

The PPD files of your installed printers are saved here and the original PPD files are stored in
/usr/share/cups/model
For user specific configuration you might use the program lpoptions. After that, edit .lpoptions in your home directory.
The command lpoptions gives you important information about the features of your printer that you can use with CUPS.
General syntax for the lpoptions command:
lpoptions -h [host] -p [printer] –l
Options:
-h: host name
-p: printer name


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.