How can I open a printer queue using Terminal?
How can I open a printer queue using Terminal?
I have found plenty of information on the internet on how to install a printer, delete a printer, control attributes of the document being printed, view the contents of a print queue, clear a print queue, delete a print queue, cancel all printing, etc, etc., using Terminal commands which involve lp, lpd, lpadmin, lpq, lpoptions, and so on. But I have not been able to find one which actually opens the print queue just as if I had clicked on the "Open Print Queue…" button in the Printers & Scanners pane of System Preferences.
I am working on an AppleScript which, amongst other things, installs a printer using a shell script and then opens the printer queue by telling Finder to open the printer app (eg HP4100.app) which is created in ~/Library Printers. I have discovered that this app is created the first time the print queue is opened after a printer is installed. Manually, you would do this in the Printers & Scanners pane of System Preferences by clicking on the button "Open Print Queue…" and Voila!, the printer.app is created. I need/would like to be able to achieve the same result programmatically, either in pure AppleScript or preferably by using a shell script within AppleScript - namely, a shell script installs the printer and then the printer queue is opened - BEFORE this printer.app is created. Opening the queue by any method will actually create the printer.app, but I need a way to open the queue if the printer.app is not there yet.
Any suggestions, thoughts, ideas would be gratefully accepted. I know nothing about C, C++, Python, Ruby, etc., so I will not be able to implement any solutions in those languages unless there is a really simple way of doing it which does not assume any prior experience with using those languages.
iMac, macOS Sierra (10.12.6), mid-2011, 3.4GHz i7, 27in, 32GB RAM