]> Untitled Git - yocto/meta-hvmpd.git/commitdiff
mpd: add local socket support
authorHugo Villeneuve <hugo@hugovil.com>
Sun, 29 Mar 2026 02:56:32 +0000 (22:56 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Sun, 29 Mar 2026 03:16:20 +0000 (23:16 -0400)
By default, the "config" command is restricted when using the TCP connection:

    # telnet localhost 6600
    Connected to localhost
    OK MPD 0.24.0
    config
    ACK [4@0] {config} Command only permitted to local clients

Add support for local socket so that the config command will work for
locally-installed clients (ex: mympd).

Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
recipes-multimedia/musicpd/mpd_%.bbappend

index b1580f38cfaa946dffac9bd41c51ff854773815b..f13d219d5ce3444abe008bba9b17b8205b36923f 100644 (file)
@@ -37,6 +37,9 @@ do_install:append() {
     iniconf_set ${D}/${sysconfdir}/mpd.conf zeroconf_enabled "yes"
     iniconf_set ${D}/${sysconfdir}/mpd.conf zeroconf_name    "Serveur Musique MPD"
 
+    # Add local socket interface
+    echo "bind_to_address  \"/var/lib/mpd/socket\"" >> ${D}/${sysconfdir}/mpd.conf
+
     echo "audio_output {" >> ${D}/${sysconfdir}/mpd.conf
     echo "    type    \"alsa\"" >> ${D}/${sysconfdir}/mpd.conf
     echo "    name    \"${ALSA_DEVICE_NAME}\"" >> ${D}/${sysconfdir}/mpd.conf