Add specific printer output tray as new printer
I need to add printer output tray which has virtual name how can I add that tray as printer in Ubuntu.
I need to add that printer with shell command not in GUI.
I found the answer
-
I need to add new printer as shell script which can be part of my charm config.
-
With
lpadmin
(adding new network /shared printer) there is an optionpart -o [options]
-
All options are printer specific and all defined in printer's PPD
-
Install printer with correct PPD
-
Look at all "options" with
lpoptions -p [Printer Name -l]
; it displays all printer's features as options and finds Output Tray or Output Bin -
In my case it was "OutputBin=" however in one of my printers the tray or bin numbers were Bin1,Bin2, ... and the other one was MailBoxBin1, MailBoxBin2,..
So the correct command is:
lpadmin -p [printer local name] -v smb://domain/user:pass@printer_server_IP/Printer_shared_name [ or socket://printer_IP:port/ ] virologic/apprunner:[email protected]/ITPrinterBW -E -P [printer PPD file]-o OutputBin=Bin1