pascalw / Airplayer

Python script to make media playing software Apple Airplay compatbible. Currently supports XBMC, Plex and Boxee.
http://pwiddershoven.nl/blog/2011/01/05/airplayer.html
BSD 4-Clause "Original" or "Old" License
335 stars 42 forks source link

Mac OSX Launchd Script #4

Closed jayshed closed 13 years ago

jayshed commented 13 years ago

The Python script works great, but I am having trouble getting the launchd script to start the service. I am using OSX 10.6.6 and Python 2.7.1. Is there anything I may be missing?

Thanks!

pascalw commented 13 years ago

Can you describe what's not working please?

Did you edit the org.pwiddershoven.airplay.plist file as described in the installation instructions?

jayshed commented 13 years ago

I have edited the file as described in the instructions including providing read, write and execute rights on airplayer.py. The service loads as I have checked with launchctl. I have tried moving the files into different directories. When I run airplayer.py manually it works perfectly.

pascalw commented 13 years ago

Hm I'm really not sure why it isn't working for you. Is there a logfile created in /Users/YourUsername/Library/Logs/airplayer.log? If it is, could you post it's contents please?

jayshed commented 13 years ago

No log file.

pascalw commented 13 years ago

That means that Airplayer is not (correctly) started. I can't really tell what's wrong, but I tend to think you did something wrong in your configuration.

pascalw commented 13 years ago

Hm I see I forgot to include one needed command.

You should execute the following command to enable the launchd script:

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

After that you should be able to start Airplayer by executing launchctl start|stop org.pwiddershoven.airplayer.

I've updated the installation instructions accordingly.

Could you let me know if that works for you please?

jayshed commented 13 years ago

Still not working. I think it has to do with executing airplayer.py. Is there a way of testing whether it is executable from the terminal window?

pascalw commented 13 years ago

Yes.

In the terminal, enter the path to airplayer.py (without python in front of it, so just path/to/airplayer.py) and hit enter. If you get "permission denied", it's not executable.

Either way, you should just make it executable by issuing chmod +x path/to/airplayer.py.

pascalw commented 13 years ago

I've updated the installation insturctions for running Airplayer with launchd on Mac OS X. It now includes instructions to make sure the org.pwiddershoven.airplay.plist file has the right file permissions. That'll fix your problem.