Translation(s): English - ?Français - Español - ?Italiano
Spotify is a digital music streaming service that gives you access to millions of songs, podcasts and videos from artists all over the world. There is also an online player and official Linux install instructions. |
Installing Spotify
Debian 8 "Jessie"
Using third-party repositories as recommended below is not supported by the Debian project and could break your system now or when you upgrade later. Use with caution at your own risk!
Add the Spotify repository signing key to be able to verify downloaded packages
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4773BD5E130D1D45
Add the Spotify repository
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
Update list of available packages
sudo apt update
Install Spotify
sudo apt install spotify-client
Debian 9 "Stretch"
Using third-party repositories as recommended below is not supported by the Debian project and could break your system now or when you upgrade later. Use with caution at your own risk!
NB: You will need to install dirmngr if not already installed
sudo apt install dirmngr
dirmngr is installed in Buster
Add the Spotify repository signing key to be able to verify downloaded packages
curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/repository-spotify-com-keyring.gpg >/dev/null
Add the Spotify repository
echo deb [signed-by=/usr/share/keyrings/repository-spotify-com-keyring.gpg] http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
Update list of available packages
sudo apt update
Install Spotify
sudo apt install spotify-client
Debian 12 "Bookworm" (testing)
sudo mkdir -p /etc/apt/keyrings curl -sSf https://download.spotify.com/debian/pubkey_7A3A762FAFD4A51F.gpg | gpg --dearmor | sudo tee /etc/apt/keyrings/spotify.gpg > /dev/null echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/spotify.gpg] http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list sudo apt update sudo apt install spotify-client # The spotify package is currently broken and installs files owned by uid 1000, fix it dpkg -L spotify-client | sudo xargs chown --no-dereference root:root
Tricks
Controlling playback using MPRIS D-Bus interface
On minimal systems it might be required to launch the desktop environment or window manager through dbus-launch --exit-with-session (provided by dbus-x11).
Typically you would edit .xinitrc from
exec openbox-session
to
exec dbus-launch --exit-with-session openbox-session
Spotify implements MPRIS interface so commands like these should work:
playerctl --player spotify play-pause dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause