Use a StyleWriter II printer on 10.2.X

Jun 03, '03 09:19:30AM

Contributed by: Anonymous

After going through the trials of getting an old StyleWriter II printer working on OSX 10.2, I felt I should publish how I did it for the benefit of others.

[robg adds: Read the rest of the article for the detailed how-to. Note that these steps assume you already have the Developer Tools installed. I have not tested these at all, given that I don't have a StyleWriter!]

Assumptions: Printer serial port = /dev/cu.printer Modem serial port = /dev/cu.modem

  1. Install enscript, gs etc. Get "ESP Ghostscript" (espgs) and install from Gimp-Print

  2. Install lpstyl StyleWriter driver:
    1. Grab the StyleWriter Driver
    2. Type this in the Terminal:
      tar -zxvf stylewriter.tar.gz  
      cd stylewriter
      cc -Dunix -o lpstyl lpstyl.c
      sudo cp lpstyl /usr/local/bin/lpstyl
  3. Add serial support for CUPS (Standard doesn't support it):
    1. Download current (1.1.19) CUPS source from CUPS
    2. Type this in the Terminal (don't type the "##" line):
      tar -zxvf cups-1.1.19.tar.gz 
      cd cups-1.1.19
      ./configure
      make
      ## Next two lines should be one row, shown as two for spacing
      sudo cp /usr/libexec/cups/backend/serial
         /usr/libexec/cups/backend/serial.bak
      sudo cp ./backend/serial /usr/libexec/cups/backend/serial
  4. Test printer. Type the following in the Terminal, and note that it's all one very long line:
    enscript --output=- /etc/hosts | gs -q -dBATCH -dPARANOIDSAFER 
      -dQUIET -dNOPAUSE -sDEVICE=pbmraw -r360x360 -sOutputFile=- - |
      lpstyl -f /dev/cu.printer
  5. Install printer PPD file:
    1. Visit the StyleWriter II page at linuxprinting.
    2. Download the stylewriter.ppd file.
    3. Edit the file with a pure text editor (vi/pico), and add -f /dev/cu.printer to the two *FoomaticRIPOptionSetting lines
    4. I also set full paths to lpstyl and gs but this is most probably unnecessary.
    5. Type sudo cp stylewriter.ppd /private/etc/cups/ppd/stylewriter.ppd.

  6. Install printer script (foomatic-rip)
    1. Go to Cups-Doc
    2. Download and save foomatic-rip
    3. Type sudo cp foomatic-rip /usr/libexec/cups/filter/foomatic-rip
    4. Type sudo chmod 755 /usr/libexec/cups/filter/foomatic-rip

  7. Bounce CUPS by typing:
    sudo /System/Library/StartupItems/PrintingServices/PrintingServices stop
    sudo /System/Library/StartupItems/PrintingServices/PrintingServices start
  8. Add printer by typing (this is all on one line):

    sudo lpadmin -p stylewriter -m /private/etc/cups/ppd/stylewriter.ppd
      -v serial:/dev/cu.printer -E

    Then visit http://localhost:631/ in your browser and do a test print (can be very slow, be patient, check top for gs and 'perl' activity).
Thanks to:

Comments (18)


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