Printers

Printing to AirPort shared printers from Linux

While the Airport Extreme wireless base makes sharing printers easy with a Mac, it's not so simple to make a printer directly available for Linux. Vincent Danen shows you the best way to do it.

If you have a mixed networking environment at home that includes Mac systems, chances are you may be using an Airport Extreme base station for wireless network access. While there are many other wireless base stations to choose from, for myself, I've found that the Apple Airport base stations work the best (and I've run through quite a few, including wireless routers from D-Link and Linksys). The Airport Extremes are also very easy to configure and administer.

The Airport Extreme makes sharing printers easy -- to Macs. It isn't as easy to make a Linux box work with them, so I had previously made the printer available via my Mac to the other systems in the home and bypassed printing via the Airport Extreme directly. The downside to this is that the Mac has to be running in order for the printer to be available, even if the printer is running and not attached to the Mac.

There is a way around this, however, and Linux can be taught to print to the Airport Extreme directly. There are a few steps to take, but nothing overly difficult.

To begin with, you need to know the IP address of the Airport Extreme device (so, for example, 192.168.1.1). You will also need to know the make and model of the printer; for myself, I have an HP Laserjet P2015 attached to my Airport Extreme. If you want wired systems to connect to it, the Airport Extreme must be on the wired network as well. You will also want the "Share printers over the Internet using Bonjour" setting enabled (Note: This presumes you're not using the Airport Express as your firewall on the internet as well; if you are, you probably want this setting off). This should open port 9100, which is the port we need to have opened in order to talk to the printer. If you are unsure, you can use nmap on the client you are trying to connect to the printer to portscan the Airport Extreme and make sure it is open.

You can either use the CUPS web interface to configure the printer (navigate to http://localhost:631) or you can use the printer configuration utility commonly found with your distribution. Fedora's printer configuration utility can be found under System | Administration | Printing in GNOME. The configuration steps are relatively the same.

When adding a new printer, you want to select the "AppSocket/HP JetDirect" type of printer connection. In the Host field, you want to use the IP address or hostname of the Airport Extreme with the port 910, a URI that might look like "socket://192.168.1.1:9100". You will then need to select the printer driver to use; in my case I selected the "HP" make and the "LaserJet P2015" model. If there are other configurable options (such as whether it is a full-duplex printer, page size, etc.), you can select those as well.

To complete the setup, print a test page and check. It should be a standard CUPS test page.

At this point, the printer connected to the Airport Extreme should be shared properly with your Linux client. This is the best and most straightforward way to share a printer connected to the Airport Extreme, and is the only direct-connection method that I have found to work.

About

Vincent Danen works on the Red Hat Security Response Team and lives in Canada. He has been writing about and developing on Linux for over 10 years and is a veteran Mac user.

4 comments
owenmonilla
owenmonilla

I agree with Gis, why spend $150 on a router!!! and you have to have a mac so you could access it.. it is like buying a bulk of ink cartridges for printers already!!!

victoria2403
victoria2403

This post was well worth reading and I wanted to thank you for your view on the subject.vet in Dallas dermatologists in Raleigh antiques Long Beach builders Tucson personal trainer in Phoenix

Gis Bun
Gis Bun

Why on earth would someone spend $150+ on a router when you can get one from Cisco or DLink for half the price. On top of that, you can only configure the damn things only with a Mac.

dick.dunbar
dick.dunbar

Where did you acquire that silly notion? i tested 5 routers for N-compatibility. Only one passed; the Extreme. It was far cheaper for me to throw my Dlink/Cisco routers in the dustbin, then to continue to "trouble shoot". Of course you can configure Apple Extreme using Airport Utility.

Editor's Picks