Marketplace:

 
Cheap web hosting provider with extensive free web hosting features
Register or buy domain name, include free email and domain forwarding services
Cheap and affordable domain name registration and domain name transfer from $2.95/yr

 

   

CUPS Command Line Interfaces

next up previous contents index

You can also simply use the command line to administer the printers. You can add a network printer enable the printer with:



  # lpadmin -p hplj -v socket://192.168.0.6:9100/ -E


Another example for a LPD print server:



  # lpadmin -p lp1nd -v lpd://printhost/lp1nd -E


To add information about the Location and a Description of the printer:



  # lpadmin -p lp0 -L "Level 2 South" -D "HP LaserJet 4"


To specify a PPD for the printer:



  # lpadmin -p lp7 -P /usr/share/postscript/ppd/HP_LaserJet_4050_Series.ppd
  # lpadmin -p lp11 -P LEXC750.PPD


The PPD file is copied into /etc/cups/ppd/lp11.ppd, for example.

You can look at the printer options (assuming it has a PPD) with:



  # lpoptions -p lp7 -l


And you can set options with:



  # lpoptions -p lp7 -o PageSize=A4
  # lpoptions -p lp1 -o PageSize=A4


And so on. These options are placed in /etc/cups/lpoptions. The same options can be set using the web interface. The web interface is indeed somewhat easier to use, and it modifies the PPD file directly (e.g., /etc/cups/ppd/lp1.ppd) rather than using the /etc/cups/lpoptions file!

You can access printer options directly from the command line when printing, if the printer's PPD supports the option. For example, the HP LaserJet 4050 driver I'm using (from hp-ppd) supports n-up printing and watermarks:



  $ lp -o HPNup=TwoUpL sample.pdf
  $ lp -o HPwmText=Draft odbcmine.pdf



next up previous contents index


Copyright (c) 1995-2004

 

      

Marketplace:
Facts: " Counting in binary is just like counting in decimal if you are all thumbs.   "  

Tuesday 6 January 2009 12:24:47 1231244687