Skip to content

Latest commit

 

History

History
115 lines (74 loc) · 3.73 KB

INSTALL.mdown

File metadata and controls

115 lines (74 loc) · 3.73 KB

General requirements

To run airplayer, you'll need:

  • Python (>= 2.6)
  • Pip
  • A compatible DNS-SD library (such as Avahi), on OSX this is installed by default

Platform specific requirements

Linux

On Linux you'll have to install a compatible DNS-SD library.

Ubuntu

For Ubuntu you should install the following package:

apt-get install libavahi-compat-libdnssd1 python-setuptools python-pip python-dev

Fedora

yum install python-setuptools python-pip python-devel avahi-compat-libdns_sd

Other

On other Linux distributions you'll have to install a similar package.

Mac OS X

There are no specific requirements for Mac OS X.

Windows

For Windows you'll have to install the Bonjour SDK.
Get it at http://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20737. (beware, login required).

Installation

Make sure all requirements are met (see above) and execute the following command:

pip install -r requirements.txt

This will install the required python packages airplayer depends on. Note that, depending on your system configuration you might need to execute this command with sudo rights.

Running Airplayer

Edit settings.py to reflect your setup. For help, read the comments in settings.py.

Airplayer can be run in the foreground in your terminal and in the background as a system daemon (on Linux and OS X). It is advised to first try to run airplayer in your terminal before trying to run it in the background, as it will be easier to spot (configuration) issues when running in the foreground.

Running in the foreground

To run airplayer in the foreground execute:

python airplayer.py

Running in the background

There are scripts included to make Airplayer run in the background on Ubuntu and Mac OS X. By installing this scripts, Airplayer will also start when your computer boots.

Ubuntu

For Ubuntu (and other Debian like systems) there's a init script included in scripts/ubuntu, to make airplayer run as a system daemon.
You should edit the DAEMON, USER, GROUP value to reflect your setup. Then place the file in /etc/init.d/ and make it executable (chmod +x). Also make sure the airplayer.py file itself is executable.

You can now start airplayer in the background by executing /etc/init.d/airplayer start. To make airplayer start at boot, execute:

update-rc.d airplayer defaults

Mac OS X

There's an launchd script included in scripts/macosx/ to make airplayer run in the background as a LaunchAgent.
Edit the path/to/airplayer.py string to match where you've put airplayer.py and make sure airplayer.py is executable by running chmod +x airplayer.py.
Then, place the launchd script in /Users/YOUR_USERNAME/Library/LaunchAgents/.

Make sure file permissions are set correctly by executing:

chmod 644 /Users/YOUR_USERNAME/Library/LaunchAgents/org.pwiddershoven.airplayer.plist
chown YOUR_USERNAME:Staff /Users/YOUR_USERNAME/Library/LaunchAgents/org.pwiddershoven.airplayer.plist

Now activate the launch daemon by executing:

launchctl load -w /Users/YOUR_USERNAME/Library/LaunchAgents/org.pwiddershoven.airplayer.plist

You can now start and stop airplayer by issuing the following command:

launchctl start|stop org.pwiddershoven.airplayer

Airplayer will also automatically start when you login. Logs are stored in /Users/YOUR_USERNAME/Library/Logs/airplayer.log.

Windows

See this guide, contributed by smaccona, to install Airplayer as a Windows Service and making it automatically start at boot.