Mar 02, '07 07:30:03AM • Contributed by: gerritdewitt
The nice folks at cups.org have made a good installer package for the latest version of CUPS, 1.2.8. This version is newer than the version of CUPS included in Mac OS X 10.4.8, and offers features like: The ability to move jobs from queue to queue via the web interface (https://localhost:631); secure access via the web interface; and the ability to set print dialog default selections on a per-queue basis.
You may find it useful, especially if you use a Mac OS X or Mac OS X Server system as a print server. However, the installation isn't perfectly smooth, and it breaks some conventions that the Apple-supplied CUPS uses. Read on to see what breaks, and how I worked around those issues...
Here are some of the things that break with CUPS 1.2.8:
- The default cupsd.conf file that comes with CUPS 1.2.8 overwrites your existing one. The default configuration no longer lets you stop and start print queues via Printer Setup Utility or the various queue monitor applications.
- In my experience, CUPS 1.2.8 doesn't properly start after it has been installed. The Apple-supplied CUPS uses a StartupItem and a launchd item to start the two cups processes. The cupsd process is run via /System » Library » StartupItems » PrintingServices » PrintingServices, and cups-lpd is run via /System » Library » LaunchDaemons » printer.plist.
The CUPS 1.2.8 installer creates two launchd items instead. The /System » Library » LaunchDaemons » org.cups.cupsd.plist item is supposed to start cupsd, and the /System » Library » LaunchDaemons » org.cups.cups-lpd.plist is supposed to start cups-lpd.
However, this technique doesn't work. Further, the installer removes the StartupItem for PrintingServices, and does not remove the Apple-supplied printer.plist launchd item. The result, in my experience, is that cupsd does not always start upon system startup, and cups-lpd may be running twice. My directions revert back to the Apple-supplied StartupItem instead. Even though I agree that a launchd item is better, Apple must have had a reason for keeping the StartupItem. - Plus, if you're using the system as a print server, you may have written shell scripts that start and stop the printing services via SystemStarter. The default CUPS 1.2.8 installation will disable the functionality of your scripts.
- Download CUPS 1.2.8 from http://www.cups.org.
- Prior to installation, back up these items:
- Your CUPS configuration files in /etc/cups. For example: sudo ditto /etc/cups /etc/cups-original
- The Apple-supplied PrintingServices StartupItem. For example: sudo ditto /System/Library/StartupItems/\
PrintingServices /System/Library/StartupItems/PrintingServices-original
- Install CUPS 1.2.8 (the installer does not require a restart).
- After installing, quit any cups processes if they have been restarted: sudo killall cupsd
- Remove the launchd items that cups.org supplies: sudo rm /System/Library/LaunchDaemons/org.cups.*
- Restore and modify the Apple-supplied PrintingServices StartupItem:
- Move it back to the right place: sudo mv /System/Library/StartupItems\
/PrintingServices-original /System/Library/StartupItems/PrintingServices - Edit the startup item: sudo nano /System/Library/StartupItems/\
PrintingServices/PrintingServices. Remove the -L argument in the line that contains /usr/sbin/cupsd -L.
- Move it back to the right place: sudo mv /System/Library/StartupItems\
- Restore your CUPS configuration: sudo mv /etc/cups-original /etc/cups. Note: If you have made changes to your cupsd.conf file, you may have to alter your syntax a little bit to make CUPS 1.2.8 happy. The Apple-supplied cupsd.conf works fine, but I had trouble with some of my modifications in Limit directives. In particular, I found that CUPS 1.2.8 does not like CIDR notation for subnets. So I had to change several lines like this: Allow from 192.168.1.10/24 to Allow from 192.168.1.*
- Repair permissions on your startup volume: sudo diskutil repairPermissions /, or use Disk Utility, then reboot the computer.
