Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I work in a university library. We offer wireless printing services to our students using Pharos Print Server, and we have handy installers for the Windows print drivers.

There are Mac drivers available, but the Mac installation process is incredibly painful. It requires downloading, installing, and configuring 2 different programs, followed by manually defining a new printer with some decidedly non-intuitive settings. Overall there are 43 steps if you know EXACTLY what you're doing.

I'd like to create combined installer program that would let our Mac users download a single file, run it, and get everything set up automatically without having to mess around with advanced printer settings. On Windows, I would use InnoSetup for this. Is there an equivalent program I could use on Mac?

EDIT:

The Pharos print system requires two programs to be installed in order to function:

  1. Pharos Notify, which monitors print requests (I think)
  2. Pharos Popup, which pops up a dialog asking the user to assign a name and password to each print job handled by Pharos.

The DMG files for those two programs contained .pkg files. I used installer to run those in silent mode, then tried copying a printer app folder into ~/Library/Printers:

sudo -S installer -verbose -pkg Notify.pkg -target /
sudo -S installer -verbose -pkg Popup.pkg -target /
cp -r ./printers/ ~/Library/Printers/

The two packages work fine when installed in this manner, but the system doesn't recognize the printer settings.

In order to create the printer settings, I did the setup for a printer via the System Preferences UI, then copied the resulting .app folder out of ~/Library/Printers to a "printers" directory in the same place as the .pkg files. But copying it back into the ~/Library/Printers folder does not seem to make OSX recognize the printer. So I guess the problem there is that I don't know how to create or deploy preconfigured printer settings on Mac.

share|improve this question
1  
Have you tried simply providing a preconfigured printer package (in ~/Library/Printers) for download, one for each of the queues? –  Daniel Beck Aug 24 '12 at 17:19
1  
Also, standard OS X installer packages (such as the one for Popup and Notify) can easily be viewed, and probably with little effort, be merged into a single setup package. Using the command-line tool installer, you can probably install them silently as well. –  Daniel Beck Aug 24 '12 at 17:22
    
No, I haven't tried either of those things -- I'll look into them and report back. Thanks. –  Will Martin Aug 24 '12 at 18:16
    
@DanielBeck Okay, made some progress. See updated question. –  Will Martin Aug 24 '12 at 20:37
    
Just a wild guess (no idea if a printer application is sufficiently self-contained), have you opened the printer application at least once after installation? –  Daniel Beck Aug 24 '12 at 20:42

1 Answer 1

up vote 2 down vote accepted

Okay, the solution was to use lpadmin command to configure a new printer. My finished script looks like this:

#!/bin/sh

echo "Installing Pharos Notify ..."
installer -verbose -pkg Notify.pkg -target /

echo "Installing Pharos Popup ..."
installer -verbose -pkg Popup.pkg -target /

echo "Configuring black and white printer ..."
lpadmin -p CFL_Black_and_White -L "Chester Fritz Library, room 230, by reference desk." -E -v popup://uniprint.und.nodak.edu/CFL230_BW_MAC_Q -P ./CFL_Black_and_White.ppd

echo "Configuring color printer ..."
lpadmin -p CFL_Color -L "Chester Fritz Library, room 230, by circulation desk." -E -v popup://uniprint.und.nodak.edu/CFL%20Color%20Q -P /Library/Printers/PPDs/Contents/Resources/HP\ Color\ LaserJet\ 4700.gz

echo "Installation complete!"

Then, I used Platypus to make a friendly click-to-run application out of the script, being sure to click the checkbox that runs the whole script using admin permissions after prompting the user for their password. And I made a DMG for distribution purposes. The end result is a comparatively simple installer for the library's printers.

There are two caveats:

  1. Because neither Popup, Notify, nor the script itself have been approved by Apple, they will not run on OSX 10.8 or later unless the user loosens their system security settings.
  2. For reasons that I haven't nailed down yet, the color printer doesn't always get set up. I suspect the PPD file isn't included by default in all Mac installations.

Hope this helps someone.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.