13.07.2015 Views

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

Linux System Administration Recipes A Problem-Solution Approach

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 10 ■ THINGS GO IN, THINGS GO OUT■ Note These paths seem to change distressingly often! This was in use at time of writing; it may have changedby the time you read this. Take a look in the /usr/share/cups directory if this path doesn’t work.Now set up the printer like this:# lpadmin -p print1 -L "Room 43" -D "HP LaserJet 4350" -P /usr/share/cups/model/hpijs/HP/HP-LaserJet_4350-hpijs.ppd.gz -v lpd://post4.example.com/post4 -E-p sets the printer name, -L the location, and -D a human-readable description field. -P gives thepath to the printer driver, and -v sets the URI location. In this case, we’re accessing the printer via LPD,which will almost certainly be what you want. -E enables the printer (meaning it will be open to acceptjobs).After this, you can use lpoptions to set up the default options. To check what options are availablefor a given printer, use this:lpoptions -p print1 -lDepending on your printer model, this might be a very long list! For options such as memorysettings, you’ll need to check your printer documentation (or get it to print an information sheet aboutitself—most printers should have this as an option from the menu buttons on the printer itself) to findout what values your specific printer has. The lpoptions command here just tells you what options canbe set via this printer driver. Unfortunately, it’s not very helpfully formatted; an example option will looklike this:TR-Duplex/Duplex: False *TrueThis first gives the name of the option (TR-Duplex) and how it’s displayed in a GUI or web interface(Duplex). Then after the colon is the list of possible values (False or True). The starred one is the currentsetting. So to set this option, you’d use the following command:lpoptions -p print1 -o TR-Duplex=TrueYou can also try lphelp print1, which produces a much more nicely formatted result; unfortunately,the lphelp script isn’t available for Debian/Ubuntu but may be for other systems.If your printers are duplex-compatible, you should make sure to set duplex as the default, to savepaper; and you’ll also want to set the default paper size (particularly if you’re based in a country thatdoesn’t use Letter as the default size!). Here’s the lpoptions setup for my HP LaserJet 4350:lpoptions -p print1 -o Duplex=DuplexNoTumble -o PageSize=A4 -o InputSlot=Auto InstalledMemory=Mem4Again, -p is the printer name, and you use -o OptionName=OptionValue to set each option.InputSlot=Auto sets the input source to be automatically detected (this will usually mean the manualfeed if there’s paper in that and then the top tray). The InstalledMemory value is set by getting the optionname from lpoptions as earlier and checking it against your printer specs.206Download at WoweBook.Com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!