Spotify running on FreeBSD

I'm having a good run these past few days - being on leave has given me the headspace to deal with a few niggling tech issues. This time around - Spotify running on FreeBSD 13.1 :)

Spotify daemon running in a FreeBSD terminal buffer

Spotify QT GUI playing Blues for Ben

The script itself is quite straightforward ...

spotify script

#!/usr/bin/env bash

set -euxo pipefail
shellcheck "$0"

# for now, spotifyd and avahi-daemon can't coexist ;(
sudo service avahi-daemon stop || echo "Maybe it's already stopped ..."

spotify-qt &
spotifyd --config-path /home/duncan/personal-git/conf/spotify/spotifyd.conf --no-daemon

# restart avahi-daemon after spotify is done
sudo service avahi-daemon start

It uses a simple config that decrypts credentials using GPG ...

[global]
username_cmd = "gpg --decrypt /home/duncan/personal-git/conf/spotify/username.gpg 2>/dev/null"
password_cmd = "gpg --decrypt /home/duncan/personal-git/conf/spotify/password.gpg 2>/dev/null"
backend = "portaudio"

And now I can have music wherever I go :)

So long as I keep paying my Spotify family account bill, that is, and as long as I have a decent network connection. I'm okay with that, though - as much as pirating music is more convenient, I prefer mechanisms that actually get money into artists' hands.

If you'd like to comment on any of my posts, please visit my public inbox.

---

Home

Why Gemini?

Projects

Gemlog

Contact me

Brought to you by Halp