@Praisethesun the -p
variable of both lpadmin
and lpoptions
is actually the name of the printer on the system, not the friendly name you see in the System Preferences pane, but the printer name as it is in CUPS. You can see these names if you list the printers on a system with the lpstat -a
command:

I only have the one printer, but the printer name is that first "column" of info, so in this case EPSON_XP_410_Series. If I wanted to see what basic options are set currently: lpoptions -p EPSON_XP_410_Series
would get me that list. If I wanted to see all options that are available to be set: lpoptions -p EPSON_XP_410_Series -l
.
Printer drivers live in /Library/Printers/PPDs/Contents/Resources
and for a Canon IR C5550 that driver is most likely /Library/Printers/PPDs/Contents/Resources/CNMCIRAC5550S2.ppd.gz
.
To add that printer you'd use
lpadmin -p <CUPS name> -E -o printer-is-shared=false -v lpd://<ipaddress> -D "<Friendly Name>" -P "<driver path>"
or something along those lines. For example you might use the following for that C5550:
lpadmin -p Studio_Canon_C5550 -E -o printer-is-shared=false -v lpd://1.1.1.1 -D "Studio Canon C5550" -P "/Library/Printers/PPDs/Contents/Resources/CNMCIRAC5550S2.ppd.gz"
You can either set your options via the lpadmin
command above, or you can use lpadmin -p <cupsname> -o <option>
or lpoptions -p <cupsname> -o <option>
. I do find that there are some options, especially on printers with Fiery RIPs that only work with the lpadmin
command to set options.
We have a lot of Canon printers, and for the most part the BW flag is set with the CNColorMode
option, so this line should do that:
lpadmin -p Studio_Canon_C5550 -o CNColorMode=mono
But test the heck out of that.
I have these topics written up on my blog and an example Add Printer script on GitHub:
Deploy Printers via Script
Identify EFI Fiery Driver
Using lpoptions To Identify Printer Options
addPrintersTEMPLATE.sh
JNUC 2018 Presentation
Hope that helps!