Install from the AUR.
packer -S mopidy
packer -S mopidy-spotify
packer -S ncmpcpp
Create a directory to store the mopidy config.
mkdir -p ~/.config/mopidy
Then create mopidy.conf in that directory:
emacs ~/.config/mopidy/mopidy.conf
A simple config can look like:
[spotify]
enabled = true
username = _your_username_here_
password = _your_super_seekrit_password_here_
Then save that file.
The AUR package for mopidy includes cool things like systemd init scripts. We will be running it as a user session.
Create a directory to store the *.service files under $HOME:
mkdir -p ~/.config/systemd/user
You can find the service file in /usr/lib/systemd/system/mopidy.service. Copy this file into the user directory.
cp /usr/lib/systemd/system/mopidy.service ~/.config/systemd/user/
Edit the mopidy.service file.
emacs ~/.config/systemd/user/mopidy.service
It should look something like this:
[Unit]
Description=mopidy
After=network.target
[Service]
Type=simple
# User=mopidy # this should be removed
ExecStart=/usr/bin/mopidy
[Install]
WantedBy=multi-user.target
Then check if the user session is running.
systemctl --user status
Enable the mopidy service as a user.
systemctl --user enable mopidy
Run the mopidy service.
systemctl --user start mopidy
To check if it ran successfully:
systemctl --user status mopidy
Run ncmpcpp:
ncmpcpp
You should be able to see [spotify] as a link in Browse (when you press 3).