From 3283beba697934fd98119b888dacc4ce327100b1 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Tue, 3 Mar 2015 01:20:09 +0100 Subject: [PATCH] docs: Add section on starting Mopidy at login Fixes #887 --- docs/installation/osx.rst | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/docs/installation/osx.rst b/docs/installation/osx.rst index dbc56137..71beece3 100644 --- a/docs/installation/osx.rst +++ b/docs/installation/osx.rst @@ -84,3 +84,50 @@ about any other requirements needed for the extension to work properly. For a full list of available Mopidy extensions, including those not installable from Homebrew, see :ref:`ext`. + + +Running Mopidy automatically on login +===================================== + +On OS X, you can use launchd to start Mopidy automatically at login. + +If you installed Mopidy from Homebrew, simply run ``brew info mopidy`` and +follow the instructions in the "Caveats" section:: + + $ brew info mopidy + ... + ==> Caveats + To have launchd start mopidy at login: + ln -sfv /usr/local/opt/mopidy/*.plist ~/Library/LaunchAgents + Then to load mopidy now: + launchctl load ~/Library/LaunchAgents/homebrew.mopidy.mopidy.plist + Or, if you don't want/need launchctl, you can just run: + mopidy + +If you happen to be on OS X, but didn't install Mopidy with Homebrew, you can +get the same effect by adding the file +:file:`~/Library/LaunchAgents/mopidy.plist` with the following contents:: + + + + + + Label + mopidy + ProgramArguments + + /usr/local/bin/mopidy + + RunAtLoad + + KeepAlive + + + + +You might need to adjust the path to the ``mopidy`` executable, +``/usr/local/bin/mopidy``, to match your system. + +Then, to start Mopidy with launchd right away:: + + launchctl load ~/Library/LaunchAgents/mopidy.plist