Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Print from OS X to any Linux-supported printer Network
My problem was that I couldn't print from an OS X 10.2.8 G4 laptop via the network to my Samsung ML-1710 which is plugged into my WinXP PC . Apparently the Samsung OS X drivers only work for printers connected via USB. This solution can be used to enable a Mac to print to any printer that Linux can print to.

The CUPS ML-1210 driver on my Linux PC works fine with the ML-1710, so I decided to use it to act as a PostScript translator so that the Mac could print to it using generic PostScript, and then send the job on to the printer on my WinXP PC (or it could just as well be a printer connected locally to the Linux box).

Read the rest of the hint for the solution...

  1. Install the printer on the Linux box and make sure that it prints properly. (I gave mine the name "printer").

  2. Login as root on your Linux box and create the following script. I saved it in /etc/ps2lpr but thats probably not the most ideal spot:
    
      #!/bin/bash
    
      # delete the fifo pipe (in case it already exists)
      rm -f /dev/ps2lpr
    
      # create a fifo pipe to send print jobs to
      mkfifo /dev/ps2lpr
    
      # make things easy
      chmod 666 /dev/ps2lpr
    
      while true
      do
        # redirect any job sent to /dev/ps2lpr to the lpr command
        # so it prints on the printer called printer
        lpr -P printer < /dev/ps2lpr
      done
    
    Now make it executable by running chmod 700 /etc/ps2lpr, and add /etc/ps2lpr & to your /etc/rc.local so that it starts when you boot. So that you don't have to reboot to start testing it, run /etc/ps2lpr & at the prompt.

  3. Install a new printer (I called it printer3) which uses the Generic PostScript driver and make it print to the local device /dev/ps2lpr. In the CUPS web GUI, you can't specify a custom device so you'll need to hand edit /etc/cups/printers.conf so that you get DeviceURI file:/dev/ps2lpr for your printer.

    You could add the printer in the web GUI and initially select the parallel port and then go back and edit the file, or do it the easy way and just use redhat-config-printer (if you've got Red Hat) which allows you to add a custom device. Don't forget to restart CUPS if you edit the conf file by running /etc/init.d/cups restart.

  4. If CUPS browsing is enabled on both your Linux and OS X box, then the new printer should just appear in the Print Center in OS X. If not, you'll have to add a "Generic" printer and point it to your linux box using a URI such as: ipp://mylinuxserver/printers/printer3 or maybe printer3@mylinuxserver. Hold down Option when you click Add to get the Advanced settings.

  5. To enable Carbon apps to print PostScript that CUPS (pre 1.2) can handle, you'll need to install Printer UnPICTifier, which some legend created.
That's it! Now try printing something, preferably from a non-Carbon app such as Safari.
    •    
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (2 votes cast)
 
[11,818 views]  

Print from OS X to any Linux-supported printer | 3 comments | Create New Account
Click here to return to the 'Print from OS X to any Linux-supported printer' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Print from OS X to any Linux-supported printer
Authored by: vladimus on Nov 25, '03 01:39:36PM

In my experience, all you need is CUPS installed on the Linux box. The printer just popped up in Print Center as soon as I'd set up the printer, at least under Mandrake.

Don't even need Rendezvous/ZeroConf installed, CUPS does it automatically.



[ Reply to This | # ]
Print from OS X to any Linux-supported printer
Authored by: slaeyer on Nov 25, '03 02:02:43PM

I've used this ability of CUPS for a year or so now with absolutely wonderful results. First discovered it using Mandrake 9.0 and Mac OS X 10.2 when I went to add the printer using CUPS and there was NO configuration needed! It just worked!

---
Through the router, down the cable, accross the fiber, nothin but 'Net



[ Reply to This | # ]
Print from OS X to any Linux-supported printer
Authored by: Moneystradamus on Jan 28, '04 01:03:02PM

I am having trouble understanding why the author of the original hint would want to go through the hassles of having his printer connected to an XP box and using an intermediary Linux box to do the translation. My question, if you can answer it, is if I have the printer connected to a FreeBSD box, could I duplicate the procedure, as documented?



[ Reply to This | # ]