Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch
Ghostscript/Netatalk HOWTO by Mike Pearson I've been struggling with this for some time now but it finally gave up and worked! So here's how for anyone else who might care to try... Aim The idea is to serve out a Linux attached non-postscript printer over netatalk, but to make it appear as a fully capable postscript printer through the use of ghostscript.
This is a really cheap way of getting a quality colour postscript printer! This should be fairly easy to do since its easy enough to make a non-postscript printer print postscript files for the linux user with the excellent apsfilter package. You install apsfilter as an if filter in your /etc/printcap, and it is then clever enough to invoke whatever filter is needed to prepare the file for printing. In my case ghostscript 2.6.1 gets called if apsfilter detects a postscript file. Read the apsfilter and ghostscript documents for more info on this - and get the local printing working before you try AppleTalk. How to do it --- Begin not needed for SuSE Linux --- Find out the socket name that your lpd daemon listens on for print requests etc. The BSD man page says it's /dev/printer, and that's what the Netatalk-1.3.3 papd source distribution expects it to be. But...my version of lpd listens on /tmp/.printer. You can check yours with ls -aF /tmp and ls -aF /dev & you'll see which it is. (Or justlook around for plausible sockets in your file store, or look at the lpd source...) If you need to, edit netatalk/include/atalk/paths.h. Change #define _PATH_DEVPRINTER "/dev/printer" to #define _PATH_DEVPRINTER "/tmp/.printer" or whatever. --- End not needed for SuSE Linux --- FTP to ftp://ftp.adobe.com/pub/adobe/printerdrivers/win/all/ppdlevel1/ and pull a plausible dos PPD file for your printer. I'm using an HP850c (DEVICE= CDJ550c compiled into ghostscript), and having tried a few of the hundreds available, I've settled on APLWNTR1.PPD. Even if you've more than 300dpi resolution, this is probably a good place to start because it appears to work. Many others don't! (symptom: ghostscript complains and bails out.) make and install netatalk as per instructions in netatalk package. Make sure rc.atalk starts up papd. Read the man pages for papd, lpd, printcap. Maybe this should have been the first step. (But that takes all the fun out of it!) Edit /etc/atalk/papd.conf file. Mine now looks like this... # # Attributes are: # # Name Type Default Description # pd str ".ppd" Pathname to ppd file. # pr str "lp" LPD printer name. # op str "operator" Operator name, for LPD spooling. # gs850c:pr=lp:op=mikep:pd=/etc/atalk/APLWNTR1.PPD: Some further explanation of this file might be helpful... The printer here is registered over AppleTalk as gs850c. That should be the name you see in the mac chooser. The pr field should default to lp - I'm playing safe. You can use any other printer name defined in your printcap file. (This is not the device name. That would be something like /dev/lp1) Reboot linux. On the mac, install a laserwriter driver if you haven't already got one. Laserwriter 8 works for me. From the chooser, click on 'LaserWriter 8'. gs850c should appear. You can switch background printing off, since linux is going to spool anyway. Click on setup. Click on SelectPPD and select LaserWriter II NT. Click on Printer Info Click on Update Info - you'll see some communications activity. It's at this point that /etc/atalk/APLWNTR1.PPD is squirtedto the mac. You may see the printer info values change. Print something on your brand new ghostly laserwriter. The job should be visible to lpq, and should print just like a locally sourced job. You should find colour works if your printer does colour. If(when?) it doesn't work... You'll probably find lpq reports no daemon. Try restarting with lpc restart lp as root. If this still fails to start the daemonrecheck socket names. (and reboot - that seems to be the only way of clearing this state). Check /usr/log/lpd-errs (or wherever syslog(LOG_ERR,...) goes). Check /usr/spool/your printer/log. If you see the file in the queue, but it won't print, try printing it locally with lpr. This will show up any incompatibilities with ghostscript. If you don't want to waste paper, just do gs file and see whether ghostscript can cope. If it can't, the solution is probably in another PPD somewhere. That's it! Mike
Keywords: ATALK, APPLETALK, NETATALK, PRINTING
Categories:
Netatalk
Mainpage
Searchform
History
Versions
Categories
Contents
Deutsch