This is a HOWTO for printer sharing from Mac OSX, including installation of gimp-print, using Samba to share printers with ms-windows PCs, enabling lpd printer sharing to Unix and Linux machines, and IPP to MacOSX-attached printers. For sharing from Mac to Mac, you don't need this HOWTO. If you're trying to use the printer on a Mac from a PC or Unix/Linux box on the network, the solution you need may be here.
Gimp-print is included with MacOS 10.3 & 10.4 so you don't need to install anything or configure a special printer queue. To use the gimp-print drivers, configure printers with a USB driver rather than an Epson or HP driver.
If you are using MacOS-10.2, the gimp-print drivers produce better output or are more versatile than those supplied by the manufacturer of the printer or the stock MacOSX drivers, and in any case you will need them to share the printer via CUPS and for programs like LyX that do not use the Mac print-center. Install the latest version, and if you have not already done so, install ESP ghostscript. See the included documentation or the Gimp-Print FAQ for OS X for instructions on how to configure printer(s) with a gimp-print driver. For a USB printer that MacOSX has automatically configured with a stock OSX driver, you should configure a second queue with a gimp-print driver. On the Mac you can choose which queue to use for specific documents. From remote machines, you will want to use the gimp-print queue.
When you have configured your printer(s), look at http://localhost:631/printers or /etc/printcap to see the queue name(s) the system has assigned to your printer(s). This is the mac-queue-name in the instructions below.
If you are running MacOS-10.2 (these two steps are not necessary on later versions of MacOS):
[printers]
comment = All Printers
printable = yes
path = /tmp
guest ok = yes
Uses = ("Printing","Super Server");
between the line beginning Requires and the line beginning
OrderPreference.
Read the smb.conf man page or the Samba documentation to decide if you want to add to the [global] section of /etc/smb.conf:
workgroup = workgroup-name hosts allow = your-network-ip security = share
Depending on your network configuration, you may need to change the access in the <Location/> section of /etc/cups/cupsd.conf. The configuration rules are similar to those for the Apache web-server.
Enable Samba printer sharing in System Preferences by clicking Sharing → Windows File Sharing. If you upgrade your MacOS version, check to see that Windows File Sharing is still enabled. Caution: if your network is not behind a firewall blocking ports 137 and 139, and you haven't limited access in /etc/smb.conf, enabling Samba could share your printers and files with the world.
One user has reported that with some versions of MS-Windows he needed a user account on the Mac for each user on the PCs in the network, with the exact name (including capitalization) and password as used on the PCs.
On the ms-windows PCs on your network:
You should now be able to print from the PC to the printer on the Mac.
sudo killall cupsd sudo cupsd
If your Unix or Linux system uses lpd to share printers across a network. The CUPS print system on MacOS can communicate with these systems if you enable the cups-lpd daemon.
printer stream tcp nowait root /usr/libexec/cups/daemon/cups-lpd cups-lpd -o document-format=application/octet-streamThen restart inetd with sudo killall -HUP inetd.
service printer
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/libexec/cups/daemon/cups-lpd
server_args = -o document-format=application/octet-stream
groups = yes
}
Then restart xinetd with sudo killall -HUP xinetd.
sudo launchctl load -w /System/Library/LaunchDaemons/printer.plist
To configure a Unix or Linux machine that is not running CUPS to use the USB printer on the Mac, use the command
lpadmin local-printername -s mac-ip-name\!mac-queue-nameon the Unix or Linux box. If you don't have a working DNS, substitute the ip-address of the Mac for mac-ip-name. You may need to enable the printer with
enable local-printername accept local-printername
Some older versions of Unix or Linux may require different tools to add a printer. If you need to write an /etc/printcap entry, use :rm=mac-ip-name:rp=mac-queue-name:. Once the printer is configured on the Unix or Linux box, you should be able to print to local-printername with lpr and/or lp.
If you have a Unix/Linux driver for the printer, you can configure it as a filter with lpadmin or in /etc/printcap, and use lpr -P local-printername -o raw to avoid the Postscript-to-printer driver that CUPS on the Mac would normally invoke.
http://mac-ip-name:631/printers/mac-queue-nameIf you don't have a working DNS, substitute the ip-address of the Mac for mac-ip-name.
From a Linux or Unix system running CUPS, you may need to specify the printer as "Raw"/"Raw Queue (en)".
For ms-windows PCs, which by default do not generate Postscript printer output, use the Apple Laserwriter or Apple ColorLaserwriter driver.
If your remote system supports it, you can also use IPP print configuration with lpd if you have configured the Mac to handle remote lpd clients. The URL from the client is:
lpd://mac-ip-name/mac-queue-name
To use dedicated printer drivers on IPP or LPD clients instead of sending Postscript to the CUPS driver on the Mac, edit the files /etc/cups/mime.convs and /etc/cups/mime.types on the Mac to uncomment the lines beginning application/octet-stream. This will enable printing of the raw printer queue on the Mac. Reboot or give the commands
sudo killall cupsd sudo cupsdon the Mac after you make this change. You can then install the appropriate printer-driver on the remote client.
The information on this page is believed to be accurate, has been used successfully on many systems and sites, and has benefited from the comments and suggestions of many users. Due to the variations in individual systems and configuration, this information is conveyed as is with no warranty of any kind.
| Last modified: 11-Feb-2006 12:17:33 EST | © 2002 Ronald Florence |