2017-03-09 16 views
0

特定のプレイリストを持つVLCをコマンドで起動するPythonスクリプトの形式でサービスを作成しました。 サービスのplist:pythonスクリプトから開始プログラムをサービスとして起動しよう

<?xml version="1.0" encoding="UTF-8"?> 
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs$ 
<plist version="1.0"> 
<dict> 
    <key>Label</key> 
    <string>com.bioxakep.biobot.plist</string> 
    <key>Program</key> 
    <string>/Users/BioMac/Documents/Scripts/newHome.py</string> 
    <key>KeepAlive</key> 
    <true/> 
    <key>StandardOutPath</key> 
    <string>/tmp/biobot.out</string> 
    <key>StandardErrorPath</key> 
    <string>/tmp/biobot.err</string> 
</dict> 
</plist> 

〜/ライブラリ/のLaunchAgentsディレクトリは、原則的に不足しているので、サービスが/ライブラリ/のLaunchAgentsディレクトリにあります。 サービスが正常に起動しますが、このスクリプトでは、私はプログラム(パラメータを持つVLC - プレイリスト)を起動しよう :

os.system('open -a vlc /Users/BioMac/Desktop/Radio.m3u') 

VLCが起動し、ハングアップしようとしますが、ログビューのエラーに:

私が理解する
LSOpenURLsWithRole() failed for the application /Aplplications/VLC.app with error -600 for the file /Users/BioMac/Desktop/Radio.m3u. 
LSOpenURLsWithRole() failed for the application /Aplplications/VLC.app with error -10810 for the file /Users/BioMac/Desktop/Radio.m3u. 

ヘルプ...

答えて

関連する問題