Spotify

Is there any way to use Spotify on FreeBSD 11.1?
I tried using the webplayer with firefox, but couldn't get it to work.
I was able to install Clementine player and its spotify plugin, but the plugin does not successfully login to my spotify premium account.

Tried Wine as well with the current windows Spotify installer but was not able to get it to work.

Is there any way to use Spotify on FreeBSD?
 
Last edited by a moderator:
No, Spotify does need some DRM bs what does not compile in FreeBSD (same for Netflix). However, maybe, you can make it run using the Linuxolator, but I do not know indeed as I do not use Spotify... or run it in a VM on top of Linux/Windows etc...

Alternatively, you can use a superior music streaming service like Qobuz what does not need any DRM bs.

Cheers! :beer:
 
xforce said:
is there any way to use Spotify on FreeBSD 11.1?

yes as lebarondemerde pointed out, the only current solution for Spotify Streaming on FreeBSD is running Linux as VM, which can be comfortable enough, especially provided you already did it for other purpose, like Netflix.
lebarondemerde said:
... or run it in a VM on top of Linux/Windows etc...
Sure, I use OpenSuSE Leap on QEMU with Google-Chrome-Stable, for both Spotify and Netflix, and it never gives problems;)

Until recently emulators/playonbsd's pre-packaged wine port for Firefox was a good way of streaming Spotify.
Unfortunately the Firefox version PlayonBSD used for its port is no longer able to display spotify.com, due to incompatibility of latest Adobe Flash Player version with legacy Firefox.
On the other hand I do not know of anyone who reportedly ran a recent version of Firefox on wine.

There are however several worth ways of streaming music on FreeBSD:
- multimedia/minitube
- audio/mps
- multimedia/livestreamer (I love this one)
- www/get_flash_videos,
- multimedia/mps-youtube (love this one too)
- multimedia/mplayer.

There are also some other good lightweight streaming utilities, available on github, which compile without problem on FreeBSD:

1) streamlink also officially available on OpenBSD repositories, as ported by Ibara

2) pyradio, just build it with devel/py3-pip


3) pms (Poor Man's Spotify), yes you heard right, it's an amazing streamer. You can easily build this as well with pip

4) Finally, I have never tried this, even on Linux (as there wasn't an official Slack package), but there's been a lot of rumor around Tizonia. I've grown curious about compiling it since it officially supports Spotify streaming, and was thinking of giving it a try, just a couple of days ago, like the silly music addict I am
 
Sorry for resurrecting anold thread but has anyone tried ncspot? It's written in Rust and supposedly works on the BSDs.
 
I can confirm, that Spotify runs "right out of the box", when installed in FreeBSD 13's built-in Linux Binary Compatibility. I wrote each command line instruction on how to do it on https://www.micski.dk/2022/01/19/how-to-install-spotify-on-freebsd/.
Hi there,

Firstly, I appreciate this blog post, did not know about FreeBSDs Linux Binary Compatibility!

I am able to install, and get going just fine. However, when I try to play (any) music I receive the following error:

"Spotify can't play this right now. If you have the file on your computer you can import it"

Terminal output:

spotify:81484): GLib-GIO-CRITICAL **: 14:47:17.603: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

ALSA lib confmisc.c:767parse_card) cannot find card '0'

ALSA lib conf.c:4693_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory

ALSA lib confmisc.c:392snd_func_concat) error evaluating strings

ALSA lib conf.c:4693_snd_config_evaluate) function snd_func_concat returned error: No such file or directory

ALSA lib confmisc.c:1246snd_func_refer) error evaluating name

ALSA lib conf.c:4693_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:5181snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2642snd_pcm_open_noupdate) Unknown PCM default


(spotify:81484): GLib-GIO-CRITICAL **: 14:47:17.914: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed


(spotify:81484): GLib-GIO-CRITICAL **: 14:47:18.457: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed


(spotify:81484): GLib-GIO-CRITICAL **: 14:47:18.460: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed


(spotify:81484): GLib-GIO-CRITICAL **: 14:47:22.325: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed


(spotify:81484): GLib-GIO-CRITICAL **: 14:47:22.834: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed


(spotify:81484): GLib-GIO-CRITICAL **: 14:47:22.836: g_dbus_connection_send_message: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

^CSegmentation fault (core dumped)

I do not know much/at all about Ubuntu (especially not with how FreeBSD deals with this). Any thoughts? Much appreciated.
 
Hi there,

Firstly, I appreciate this blog post, did not know about FreeBSDs Linux Binary Compatibility!

I am able to install, and get going just fine. However, when I try to play (any) music I receive the following error:

"Spotify can't play this right now. If you have the file on your computer you can import it"
Did you find any way to solve this?
Currently I experience the same issue when running Ubuntu Jammy. No problems with Ubuntu Focal though.
 
Hi there,

Firstly, I appreciate this blog post, did not know about FreeBSDs Linux Binary Compatibility!

I am able to install, and get going just fine. However, when I try to play (any) music I receive the following error:

"Spotify can't play this right now. If you have the file on your computer you can import it"

Terminal output:



I do not know much/at all about Ubuntu (especially not with how FreeBSD deals with this). Any thoughts? Much appreciated.

it works.
 
Ok, for those not having sound, this fixed it for me (using spotify binary instead of chrome), post #43:
 
If you want a headless Spotify player, then also raspotify or spotifyd might be worth a look.


These are daemons based on Libspotify, and then connecting to it and playing back music. You can steer this in the Spotify app of your choice, e.g. smartphone.

Or you could use web based frontends like Mopidy to steer it. https://mopidy.com/
 
I followed micski 's tutorial (used focal), and everything worked great for a couple days. Now today Spotify loads, but I get lots of "Couldn't find that page" and it can no longer play music that wasn't already locally cached from previous play. My terminal is filled with ERR: getaddrinfo failed: -3 messages from Spotify. Has anyone encountered this, or does anyone have any idea what might have triggered this? I haven't mucked with settings from the tutorial beyond installing a few additional packages in /compat/ubuntu (prior to the last time playback worked).
 
Could it be related to DNS or internet connection from the chroot via host computer? I just tested and it still works with Spotify 1:1.1.84. You can confirm latest version in chroot with apt show spotify-client.
 
My terminal is filled with ERR: getaddrinfo failed: -3 messages from Spotify
I know nothing about this Spotify stuff but the above error message sounds like address resolution failed.
This can have many reasons including:
  • Spotify having changed some of the "URLs" of their server(s) and the utility you're using has them hardcoded somewhere.
  • DNS is (temporarily) unavailable.
  • Changes in the network prevent you from resolving the address.
  • Just a general bug in the software/utility you're using.
Or it is something completely different - again: No idea about this particular case.
 
Apparently the issue is must simpler and independent of spotify; it seems I can't access the internet at all from within the Ubuntu jail, pinging anything fails and I can't even run apt update. Thanks for the comments, I'll dig into this deeper issue.
 
jbodenmann was spot-on. After some digging I figured out that the issue is a combination of:
  • I'm on a laptop using wifi
  • I set up the Ubuntu /compat at work
  • I'm currently at home
  • The two have very different DNS setups (in particular, my employer's DNS servers are naturally not available from my house)
  • Connecting to wifi at home updated /etc/resolv.conf for my BSD host, but not in the jail.
I verified that this was the problem by manually copying the BSD conf into the /compat/ubuntu directory, which I guess has been standard practice for a while (https://forums.freebsd.org/threads/...on-a-freebsd-jail-with-zfs.41470/#post-241453).
 
Did you find any way to solve this?
Currently I experience the same issue when running Ubuntu Jammy. No problems with Ubuntu Focal though.
Hi,

A long reply, my apologies.

I never did get this working, ended up installing an Ubunu VM and running it through this.
 
Hi,

A long reply, my apologies.

I never did get this working, ended up installing an Ubunu VM and running it through this.
I got it running though by installing pulseaudio in host and ubuntu jail and using the script linked in post #14.
 
My expeirence it worked the first time but not always. Then it starts working on its own months after the install.
Should probably be possible to rule the problems out.
Works absolutely stable for me at least.
Only thing: After closing, I have to manually kill all "ghost" Spotify processes before opening again. I use kill -9 `ps -Af | grep spotify | grep compat | awk '{ print $1 }'` for this.
 
Back
Top