Airplay to AppleTV From Linux PC

by kaustad in Circuits > Apple

234432 Views, 44 Favorites, 0 Comments

Airplay to AppleTV From Linux PC

apple_tv-q410-angled-lg.jpg
Mirroring a desktop computers display can be easily done on a Mac, but what about Linux/Ubuntu? It can be achieved in just a few short steps. Follow these steps and you'll be pseudo-mirroring in no time!

Getting the Files.....

Screenshot from 2014-01-11 14:18:56.png
Airplaying media to an AppleTV can be done on Ubuntu/Linux using XBMC. Sharing the desktop and mirroring are not as easy however. Follow this guide and you'll be mirroring in no time!

First you need all the files. I have put a link to my copy of the files below. Download the airplay.jar file.

Airplay.jar file download

Once you have downloaded the file, place it in your home directory. Easy enough? Next Step!

Getting a Java Runtime...

u1.png
u2.png
Nearly any Java Runtime Environment will work for this. The easiest one to get is the OpenJDK. If you already have it installed or Oracle's Java installed then you can skip this step.

First, you need to open the Ubuntu Software Center. Go to the top right corner, to the search bar, and search 'Java'. You should see the third or fourth one down is the OpenJDK Java Runtime 7. Make sure it is version 7 not 6. Install that and you'll be sitting pretty for the next step!

Executing in Terminal....

Term1.png
Term2.png
term3.png
The next step you need to open the terminal. Use the hotkey CTRL-ALT-T to open the terminal quickly.

You now need to leave your computer and go to your AppleTV. Go to Settings->General->Network and notice the IP Address. Use the DHCP one if it shows more than one. Write this down, unless you have good memory. Back to the computer.

In terminal you need to change the directory that your commands are executing in by typing - cd /home/USER - but substitute USER for your actual user name. Example in image. Now you need to type the following command -

java -jar airplay.jar -h 172.18.129.223 -d

Just remember to substitute the ip address with the address of YOUR AppleTV. You should now see your desktop on your AppleTV! If not run the command as root by typing - sudo - before the command. This is a pseudo-mirroring technique meaning that it just relays images of you desktop over time to the AppleTV so it could be a little choppy and slow but its the best we have for now. Enjoy! If you have any questions feel free to ask them in the comments!