Turn Linux into a remote AirPlay speaker

Some time ago Apple game out with the AirPlay feature (an upgraded AirTunes) which enables iOS devices and iTunes play music and videos on a remote device.

 

In our office we have a Linux box, a set of speakers and a few laptops sporting Mac and Windows. Tonight I set out with a goal to turn that Linux box into an AirPlay speaker so that each of us can play music from their laptop without having to reconnect the cables every time.

Airfoil

First off I stubled upon RougeAmoeba’s Airfoil, which is a $25 sofware piece that, enables half a dozen device classes to be hooked up as remote speakers to a Mac or Windows (yes, that too). And, better yet, instead of only enabling iTunes to play, it can reroute all sound to that remote speaker. Though, it’s Linux speaker software is free download, it still seems to require paid Airfoil to route audio, because bare iTunes couldn’t care less of the wannabe Linux speaker that should have appeared to the WiFi. As the price would have been multiplied by the number of laptops, it was unfortunately out of question.

Shairport

With a bit of googling around, I next found Shairport, which (if I got it correctly) is based on data found in a hacked and reverse engineered AirPort Express. ShairPort turns a random PC into a fake AirPlay speaker set. The software itself got installed relatively quickly after going through the short docs (perhaps because I had most of the dependencies like avahi etc already in place because of the Airfoil).

 

Also, for Airfoil, I had already opened firewall to Zeroconf/Bonjour and ports TCP:5000-5005 and UDP:6000-6005  which seemed to apply to Shairport too.

After starting up the daemon, all of our iTunes magically discovered the new remote speakers and allowed us to play music there with a simple mouse click. Even from Windows. And from iPhone. And, if wanted, all at the same time. Voila!

This is definitely much easier than messing with the wires all the time.

 

desopafy Wikipedia

Today Wikipedia has a blackout. This is because US is passing a law that can threaten open Internet.

Please read all about the SOPA blackout in the Wikipedia article. I have signed a petition against SOPA and I am fully concerned about what this could mean to Internet.

Wikipedia is main source of information for me and when googling around I hit Wikipedia dozens of times a day. I would not even like to think about what it would be like if Wikipedia would be blocked, because of linking to webpages that, among other things, contained some alleged pirated materials.

 

Now what?

Having said all this and having already put in my 2 cents, I now have work to do and this blackout is hindering my progress, even if for just one day. Fortunately Wikipedia has not removed itself from Internet. It only has drawn a black blanket over it’s contents. So, after viewing this black page and dedicating a few (milli)seconds to think about the consequences of SOPA, tech-savvy people can still reach the articles and make use of them.

NOTE: This post is not about avoiding Wikipedia blackout. This post is about getting work done, after you have signed some anti-SOPA petition or written a letter of concern to the US Senate or your own Ministry of Foreign Affairs if you live outside US.

Desopafy

There are several ways to still access Wikipedia today. Wikipedia itself has pointed out that mobile Wikipedia is still accessible and as the blackout is JavaScript-based, disabling JavaScript, will avoid the blackout too. But being JavaScript based, the blackout can also be reversed with JS. My initial code was a bit crude, so I googled around and found a more thorough version (thanks timraymond and kballenegger). Add this link to your bookmarks (or drag it to your bookmark bar):

Desopafy_Wikipedia

This bookmarklet will hide the blackout and show the Wikipedia article. But please, do at least think of what this blackout means, before you remove it.