Printing to an AppleTalk printer via Samba

Jan 19, '02 09:55:17AM

Contributed by: William McCallum

I have a network of Macintoshes running OS X and a PC running Windows XP. I wanted to enable the PC to print to a LaserWriter that only talks AppleTalk. There is commercial software that enables you to do this, but here's how to do it for free. In brief, the missing piece of the puzzle was figuring how to make OS X print to an AppleTalk printer from the command line. For those of you who want to figure the rest out for yourself, the relevant UNIX commands are at_cho_prn and atprint.

If you'd like the step-by-step instructions, read the rest of the article.

First install Samba X on your OS X machine. You can get it here . There is a Samba web administration tool with documentation on your local machine at http://localhost:901. There is also a comprehensive discussion of using Samba to share files here on macosxhints. Make sure your Samba server is working by setting up a share and checking that you can access it from your PC.

Next, return to your OS X machine and execute the command at_cho_prn as root to find and set up the AppleTalk printers attached to your network. Test this by trying the command

cat file.ps | atprint
on some Postscript file.

Then use the Samba web administration tool to set up a printer. The only option you need to change from the default settings is the print command, available in advanced view. This should be set to
cat %s | atprint
Finally, go to your PC and set up the printer. How this works depends on the system you are using, I guess. I was using Windows XP and asked the wizard to find all network printers. It found the Samba printer I had set up, and asked me to choose the driver from a list. I chose the closest one I could find from the list of Apple drivers.

Of course, I don't know in what generality this works. My printer is a LaserWriter 4/600 PS, hooked into the Ethernet hub using a Farallon Ethermac Iprint adaptor. The mac is running OS 10.1 and the PC is a Dell laptop running Windows XP.

[Editor's note: I don't have an AppleTalk-only printer available to test this with, and my current Ethernet print setup is working fine ... and since printers and I don't usually get along very well, I'm not going to change anything! ;-) But this looks like a fairly simple task.]

Comments (5)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20020119095517715