[MacTUG] Creating printers with the command line

Dani Roloson daroloso at mfcf.math.uwaterloo.ca
Sat Nov 12 16:57:50 EST 2011


> Any one done this?  I want to get it to work on 10.6
> before I have to recreate 30 printers in 10.7.

% lpadmin -p PrinterQueue -E -v "lpd://UNIXPrintServerFQDN/PrinterQueue" -P '/Library/Printers/PPDs/Contents/Resources/HP LaserJet P4010_P4510 Series.gz' -o printer-is-shared=false -o HPOption_Duplexer=True

% /usr/libexec/PlistBuddy -c Print /Library/Preferences/org.cups.printers.plist | fgrep -e device-uri -e printer-make-and-model
        device-uri = lpd://UNIXPrintServerFQDN/PrinterQueue
        printer-make-and-model = HP LaserJet P4010 Series

Fill in your own PrinterQueue and UNIXPrintServerFQDN.
You have to make sure the PPD is installed first.

I think PlistBuddy comes from the Xcode/Developer install ... very handy.

So the fun thing is that 10.6 shows you the URL when you click on 
"Options & Supplies" and 10.7 doesn't so I didn't think the command
was working.

Dani
MFCF


More information about the MacTUG mailing list