I recently switched back to Arch Linux as my daily driver when I got my new Thinkpad, so I’ve been trying to replicate the setup that I used to have. Back then, I was using ncmpcpp, a beautiful MPD client as my music player. Now that I solely use Spotify as my music source, there are a few tweaks that need to be done for ncmpcpp to be able to stream your songs in Spotify.
There are 4 pieces of software you’ll need:
- ncmpcpp (of course!)
- Mopidy
- Mopidy-Spotify
- Mopidy-MPD
For ncmpcp, you have a choice to either install the official package using pacman or use the git version from AUR. Mopidy is also available in the official community repository but the extensions need to be installed from AUR.
Install all dependencies:
|
|
The next step is to authenticate your Spotify account to be used with Mopidy. Follow this link to get your client_id
and client_secret
values. You’ll need this value later for your configuration. Once you got the keys, create your Mopidy configuration in $HOME/.config/mopidy/mopidy.conf
. You can also run Mopidy as a service, which in that case, you’ll need to edit the main configuration file at /etc/mopidy/mopidy.conf
but this guide will focus on running it under a user.
Towards the end of your configuration file, add these sections:
|
|
The first part is the configuration for Spotify, while the second part will allow Mopidy to act like a MPD server so that ncmpcpp can connect to it. I uses 6600
for the standard MPD port, but if you change it to something else, you’ll also need to change it in the ncmpcpp’s config file.
The last thing you need to do is to actually run the service:
|
|
Verify that the service is running by:
|
|
You’re good to go! Once you run ncmpcpp, you should be able to see your Spotify playlists and stream them normally. There are some limitations when using this extension, so please take a further look at the official documentation for Mopidy-Spotify.