Ubuntu / Linux news and application reviews.

I'm using MPD and GMPC both from GIT (not compiling them, but using the Launchpad PPA which has daily builds) and some recent updates resulted in an error:
socket(): Address family not supported by protocol

Which apparently has something to do with IPv6, and this error resulted in not allowing any MPD client to connect to MPD (I've tried GMPC, Sonata, NCMPCPP).

I couldn't find an actual fix for this, but a work-around which allows local clients to connect to MPD.

Here's what I did (this will hopefully help others having the same issue) to get GMPC/Sonata/NCMPCPP/etc to connect to MPD again. Open a terminal and:

sudo gedit /etc/mpd.conf
and scroll down to:
bind_to_address "localhost"
and comment this line (add a "#" in front of it - without the quotes)
Under that line, you should have this:
#bind_to_address "/var/run/mpd/socket"

Uncomment this line (remove the "#"). Then save the file.

Now, to get any MPD client to connect again, edit its config file and replace "localhost" with "/var/run/mpd/socket"

-For GMPC: open it, go to Music > Preferences, on the "Connection" tab, under "Host", enter:

-For NCMPCPP: if you already have created the .ncmpcpp directory in your home folder, skip the first command:
sudo mkdir ~/.ncmpcpp
sudo gedit ~/.ncmpcpp/config

If you already have a "mpd_host" line, replace "localhost" with "/var/run/mpd/socket". If not, add this line:
mpd_host = "/var/run/mpd/socket"

You can comment the port line.

If you use a different MPD client, search its config file and follow the steps above.