Showing posts with label apple. Show all posts
Showing posts with label apple. Show all posts

Linux firewall settings for Apple Airplay (Shairport / Shairtunes / Shairplay)

VS. 


The following has taken me an eternity to figure out. I use Airplay from a Linux server to Apple and other airplay devices on my network. Configuring the firewall properly for this to work has not been simple - many guides are vague and lack the specifics needed.

My actual configuration centres around Logitech's squeezeboxserver now known as logitechmediaserver 'LMS' whereby I use the following plugins:

AirPlay bridge - this enables Airplay devices to be used as if they were squeezebox devices, i.e. I can play my LMS stored music / radio / spotify on any of my Airplay devices

ShairTunes2 - this enables Squeezebox devices to be Airplayed to, i.e. I can Airplay from my iPhone/iPad/Mac etc. to any of my LMS squeezebox devices. This is an incarnation of shairplay / shairport .

For along time I have had to disable my firewall to enable my LMS device to connect to my Airplay devices and for music to flow. Once the connection is established I had to then re-enable my firewall - which is not ideal and very cumbersome. Whilst the Airplay devices always showed up in LMS and LMS client the music would just not stream. 

Here's how to configure a linux firewall with UFW to enable Airplay:

Apple Script - prevent Mac OSX login items opening Script Editor at startup / login

To prevent Apple Scripts from opening the Apple Script Editor on Mac OSX login the script should be export to an application within Script Editor. The application (.app) should be added to OSX login items, not the script (.scpt).
To do this From the Script Editor menu, choose File -> Export and select “Application” from the File Format dropdown.
This is necessary because if you only save it as a script (.scpt file), when run at login it will simply open in AppleScript Editor. 
We want this to be an automated process so that the functionality runs without our having to do a thing. As an application, the script functionality will run the same as if you opened it in the editor and clicked the “Run” button.
Kudos: http://www.creativecongo.com/mac-tips-how-to-run-applescripts-at-login/

Ubuntu as an Apple Time machine capsule with Samba SMB2

Apple's TimeMachine now works with Samba SMB2. Apple also is moving to depreciate AFP which was the previously underpinned TimeMachine. Since Yosemite OSX 10.10 it is possible to use samba which in my view is easier and simpler to set up. Read on...

Setup the Apple AirPort Express v2 802.11n as an AirPlay bridge using the Windows AirPort Utility




The AirPort Express is a simplified and compact version of Apple's AirPort Extreme gateway,. it functions as a wireless access point when connected to an ethernet network. The current model includes AirPlay (successor of AirTunes), that allows users to stream audio from a computer running iTunes to a stereo

I purchased an Apple AirPort Express to expand my AirPlay / AirTunes network. The AirPort Express base station offers a couple of novel features which I was keen to explore, notably:

- Ability to extend an existing network
- Creating a guest wi-fi network, alongside an existing wi-fi network
- 3.5mm audio output to push music via AirPlay (formerly 'AirTunes') to external speakers/amp

Airplay to Squeezebox Touch (via Linux)



UPDATE 2017: THIS ARTICLE IS NOW OUT OF DATE. USE THE SHAIRTUNES2 PLUGIN AVAILABLE IN THE LOGITECHMEDIASERVER PLUGINS PAGE - FOR FIREWALL SETTINGS SEE HERE: 
http://confoundedtech.blogspot.co.uk/2018/01/linux-firewall-settings-for-apple.html



This post focuses on playing music from iTunes or iOS devices to a Logitech Squeezebox using AirPlay. The concept is to stream music from iTunes or iOS devices > Ubuntu server > Squeezebox. This requires three key tools Shairport, WaveInput, ecasound and some patience.

Shairport authored by James Laird in 2011 emulates an AirPort Express for the purpose of streaming music from iTunes and compatible iPods. It implements a server for the Apple RAOP protocol, it does not support AirPlay v2 (video and photo streaming). It is a reverse engineer of the RAOP protocol and relies upon the ALAC decoder released by David Hammerton, which is reproduced within Shairport. The project can be found at https://github.com/albertz/shairport

WaveInput authored by BPA is a Logitech Squeezebox plugin that enables PC audio to be captured and played through a Squeezebox. There are version of Windows and Linux and the project can be found here http://code.google.com/p/bpaplugins/

ecasound is a multitrack processing tool for playback, recording, format conversions, effects and mixing. Its use here is to transcode the raw stream from Airplay/Shairport into a format the Squeezebox can understand. I use it to introduce some LAME MP3 compression to the stream to help with my network bandwidth and to reduce playback stutter.

Ubuntu: XBMC with AirPlay enabled

As of XBMC v11 (Eden), XBMC supports being an AirPlay target, allowing any device/platform that can run XBMC to receive AirPlay content from an iOS or iTunes source (as well as other 3rd party AirPlay sources for desktops and even Android).
Here's how...

Ubuntu: Automatically rip CD to FLAC and convert to ALAC m4a for iTunes & HomeSharing




Since getting iTunes running smoothly on my Ubuntu server under VirtualBox I was looking to upgrade and automate my CD ripping process. My aim here was to have a near 'zero click' approach for ripping an inserted CD to FLAC for opensource goodness and then to convert the files to ALAC for iTunes compatibility and HomeSharing. The two click solution I've reached involves 1) to select the right CD metadata from an CD info site and 2) to hit the button to rip, the script does the rest. It now takes me under 15 minutes to rip a CD to FLAC and get it into iTunes and shared over HomeSharing with just two clicks, here's how...


N.B. As of October 2011 ALAC is now open source too.

Setup Virtual box 4.x.x with Windows XP and iTunes for Home sharing under Ubuntu


After experiencing intermittent success with iTunes under Wine since upgrading iTunes to 10.4.1; both from the perspective of iTunes working with Wine and also with Wine/iTunes worknig with Apple TV2 (ATV2). I've decided to bite the bullet and run iTunes within a virtual instance of Windows XP running on top of Ubuntu 10.04. I've tried this on both an Intel Atom based server (without native support for virtualisation) and with an AMD Neo server (with native virtualisation support). I've had good results on both set ups using Oracles free VirtualBox and Windows XP SP3, best of all it was rather simple - here's how...

Successfully kill and restart iTunes in Wine (Ubuntu & Apple TV 2 / ATV2)

I run iTunes under Wine on my Ubuntu server to share media to an Apple TV 2 using Home sharing. Since upgrading to iTunes 10.4.1 under Wine I've had regular issues with my Apple TV 2 no longer seeing the Ubuntu based iTunes Home share after a period of time. The easy way I've found to fix this is to kill iTunes in Wine and restart it is as follow a helpful script to achieve this follows...

Android IPSec PSK VPN - Nexus One with OpenSWAN

Looking to secure my internet traffic when on a public network and away from home I decided to set up a VPN between my phone and my Ubuntu server. This would allow all of my phone's traffic to be encrypted and tunneled through my Ubuntu server and home internet connection. Effectively this will make it difficult for people to listen to my traffic and in essence would offer additional security to my browsing and email when on a public network. My phone is an Android Google Nexus One; and unfortunately Android versions up to and including Gingerbread (2.3.4) do not support OpenVPN out of the box, unless you root your device. Read on to see how I set up my Android to Home IPSec VPN...

Ubuntu as an Apple Time machine capsule with Netatalk


I use my Ubuntu server for nearly everything, it'd be great if my Macs could back up to it too using the great built in Apple Time Machine functionality. TimeMachine relies on the AFP as the transfer protocol for backing up and transmitting data over the network. Netatalk is the Open Source implementation of AFP. Mac OS X requires encryption to work properly but the standard package of netatalk provided in the Ubuntu repositories doesn’t include this feature. So we have to build our own netatalk package from the sources with the encryption feature enabled. Read on...