My first idea was to use bluetooth.
I had a hard time to set this up and finally succeeded to make an audio sink from iPhone using bluez(http://www.bluez.org/).
I could listen music with desktop speaker via bluetooth, but it was not so easy to make it running every time I want.
So I bought a bluetooth receiver.
This was very compatible and easy to use.
It automatically turned on only when it pairs with my iphone.
But I have not been using this because I was disappointed its sound quality.
Finally, I could do this with Apple's Airplay (http://www.apple.com/itunes/airplay/).
ShAirPort (https://github.com/albertz/shairport) can make Ubuntu to emulate airplay speaker.
It seems to me that ShAirPort was implemented to use Apple's private key(http://en.wikipedia.org/wiki/AirPlay#Reverse_engineering_AirTunes_and_AirPlay), so please use this at your own risk.
Also note that this instruction is from INSTALL.md in ShAirPort source.
1. download source of ShAirPort
Just click 'ZIP' icon, then you can download all source files in one zip archive.
I confirmed new version of shairport does not work with my fresh ubuntu 12.04.
I am not sure what has been changed, but old version of shairport still works on my fresh ubuntu 12.04.
If you don't mind, you may download old version of shairport below.
You may compile and run it as described below.
Open terminal, go to the directory where you stored the source file and unzip.
$ cd Downloads$ unzip albertz-shairport-83c1b71.zip$ cd albertz-shairport-83c1b71
3. Install followings
$ sudo apt-get install build-essential libssl-dev libcrypt-openssl-rsa-perl libao-dev libio-socket-inet6-perl libwww-perl avahi-utils pkg-config
Make sure that you have no error.
Now see your iPhone and make sure that you have ios version 5 or later.
You may play it with iPad, iPod and iTunes also.
You should see a new icon when you play a music,
just select new speaker in that menu.
- All you need is just local network between iPhone and Ubuntu
- No quality loss
- Easy to configure
- Only few resource consumption
- Consumes wireless bandwidth (802.11n is recommended)