AirPrint for Mac on Linux

Apple is finally offering printing services from your iOS device, they are marketing this capability as AirPrint and it is in fact an amalgam of a number of existing network technologies. There are some HP printers already configured for AirPrint, but the list is rather short. Wouldn’t it be nice if you could use your existing printers to do this?

Thanks to Ryan Finnie for his research and TJ Fontaine for a fabulous script that automates the services configuration for your AirPrint printers.

Before proceeding, this tutorial assumes you are running CUPS on a Linux (Ubuntu) server to share out one or more printers on your network. In my configuration, an HP PSC 500 provides printing and scanning services and a Brother 2820 is our general purpose laser printer with fax. After settings things up for AirPrint using CUPS and Avahi, I am now able to print successfully to both devices from my iPhone 3GS.

  1. Configure CUPS. Get your CUPS server properly configured. This is going to require the following entries included in your cupsd.conf:
    Listen 631
    Browsing on
    BrowseOrder allow,deny
    BrowseAllow all
    BrowseLocalProtocols CUPS dnssd
    BrowseAddress @LOCAL
    ServerAlias *
    It will need to be have the option to share printers connected to the system (Browsing On), as a general rule of thumb if you can print to your CUPS server from another computer on your network then it’s probably configured correctly.
  2. Install Avahi. You need this to broadcast your printer services, if you’re running Ubuntu server this can be done as follows:
    sudo apt-get install avahi-daemon
  3. Download TJ’s Script. It will make your next step much easier:
  4. Run the airprint-generate script. This produces services files for Avahi. Copy the resulting files to:
  5. Restart Services. Restart your avahi service:
    /etc/init.d/avahi-daemon restart

Now browse to your printers on your favorite iOS device running 4.2.1 or later, when selecting Print from any of the standard applications (Mail, Safari, etc.) your printers should appear available.

AirPrint from iPhone to HP PSC 500

If you made it this far and are on iOS 6, then your journey is not yet complete. Visit AirPrint on Linux with iOS 6 for a rundown on how to get your server setup to support the changes Apple made in this release.

10 thoughts on “AirPrint for Mac on Linux

  1. Pingback: Tweets that mention micromux » AirPrint for Mac on Linux --

  2. Pingback: Airprint using Linux Server | IPhone

  3. Pingback: AirPrint freischalten ohne Download: Auch unter Linux und Windows prinzipiell möglich

  4. Pingback: AirPrint + nieobs?ugiwana drukarka

  5. i have CentOS 5. To get the script in step 3 to work with python 2.4 (which is what ships with CentOS 5) you need to modify line 43 to be:

    from cElementTree import Element, ElementTree, tostring

    assuming you also have “python-elementtree” and “libxml2-python” installed

  6. Pingback: AirPrint for iOS on Linux |

  7. Pingback: Compartir impresoras desde Linux con iOS (iPad/iPhone) « Delirios de un Informático

  8. Pingback: Install AirPrint On Ubuntu Sever 8.04 - Justin Walker

  9. Hi, does this still work with iOS6? One of my Devices, i updated to iOS6, does not work? Do you have a solution?

Comments are closed.