I would like to get Spotify working on Debian and Ubuntu servers and stream via http. What I found out so far is that I can do the whole thing best with pulseaudio. However, there are only problems with both spotify and pulseaudio. Maybe it’s because I don’t have a screen for these servers either, only the console and I don’t want to simulate a screen or anything.
For example, if I want to start Spotify with the command spotify
, I get the following error message:
Unable to init server: Could not connect: Connection refused
(spotify:691): Gtk-WARNING **: cannot open display:
Or when I start pulseaudio with the command pulseaudio
, I get this error message among others:
W: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
W: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Does anyone know what this is and can help me?
Or is there a better way than pulseaudio?
The important thing is that it must end up being an http stream. I found e.g. for pulseaudio the following script, which should do this: https://gist.github.com/djmaze/5234008.
Can someone give me a detailed explanation how to implement the http stream? I am not completely new to Linux servers, but I am far from being an expert. So it would be great if you could explain this for stupid people.
My goal is to implement the whole thing not only for me, but also for users of my final product. So the whole thing must run without much effort on all Debian and Ubuntu systems.
I would like to get Spotify running on Debian and Ubuntu servers and stream it via http. What I’ve found out so far is that the best way to do this is with pulseaudio. However, there are only problems with both spotify and pulseaudio. Maybe it’s also because I don’t have a screen for these servers, but only the console and I don’t want to simulate a screen or something.
For example, if I want to start Spotify with the command spotify
, then the following error message appears:
Unable to init server: Could not connect: Connection refused
(spotify:691): Gtk-WARNING **: cannot open display:
Or when I use pulseaudio with the command pulseaudio
start, the following error message comes up:
W: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
W: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Does anyone know why and can I help? Or is there a better way than pulseaudio? It is important that it has to be an http stream at the end. For example, I found the following script for Pulseaudio which should do this: https://gist.github.com/djmaze/5234008
Can someone even give me an exact explanation how I can do that with the http stream? I’m not completely new to Linux servers, but I’m still far from an expert. So it would be great if you could explain that to be stupid. My goal is to do the whole thing not only for me, but also for the users of my end product. So the whole thing has to run on all Debian and Ubuntu systems without much effort
–