<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=3261&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Install music player daemon and set up it as a user service in Devuan]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=3261</link>
		<description><![CDATA[The most recent posts in Install music player daemon and set up it as a user service in Devuan.]]></description>
		<lastBuildDate>Sun, 02 Aug 2020 16:46:43 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Install music player daemon and set up it as a user service in Devuan]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=23803#p23803</link>
			<description><![CDATA[<p>Thank you for the info, Vernon <img src="https://dev1galaxy.org/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[dummy@example.com (Ogis1975)]]></author>
			<pubDate>Sun, 02 Aug 2020 16:46:43 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=23803#p23803</guid>
		</item>
		<item>
			<title><![CDATA[Re: Install music player daemon and set up it as a user service in Devuan]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=23620#p23620</link>
			<description><![CDATA[<div class="quotebox"><cite>Ogis1975 wrote:</cite><blockquote><div><p>This short guide&#160; describes how to install mpd as a user service in Devuan 2.1 (ascii).<br />Install mpd and mpc </p><div class="codebox"><pre><code>#apt install mpd mpc</code></pre></div><p> <strong>Mpc</strong> is a command line user interface for MPD server.</p></div></blockquote></div><p>My favorite front end for MPD is YMPD. <a href="https://www.ympd.org/" rel="nofollow">https://www.ympd.org/</a></p><ul><li><p>Written in C</p></li><li><p>Very Lightweight and extremely fast</p></li><li><p>Built in Web server - no external web server neede</p></li><li><p>Uses HTM5 and WebSockets</p></li></ul><p>Have MPD and YMPD installed on a couple of PI Zeros. One PI Zero with a 5 dollar USB Sound card is connected to an original Bose Wave Radio and the other is connected to my Biuetooth Speaker.</p><p>I have built is on Raspbian so it should build fine on Devuan as well.</p>]]></description>
			<author><![CDATA[dummy@example.com (Vernon)]]></author>
			<pubDate>Fri, 24 Jul 2020 20:37:08 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=23620#p23620</guid>
		</item>
		<item>
			<title><![CDATA[Re: Install music player daemon and set up it as a user service in Devuan]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=19993#p19993</link>
			<description><![CDATA[<p>Most welcome - especially the softvol &quot;trick&quot; is necessary for certain Raspberry Pi DAC&#039;s without hardware volume (the pHAT DAC and some Hifiberry models, for instance).</p>]]></description>
			<author><![CDATA[dummy@example.com (therion23)]]></author>
			<pubDate>Mon, 10 Feb 2020 22:00:46 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=19993#p19993</guid>
		</item>
		<item>
			<title><![CDATA[Re: Install music player daemon and set up it as a user service in Devuan]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=19978#p19978</link>
			<description><![CDATA[<p>Thank you, therion23, for your configs. In near future i will try this.</p>]]></description>
			<author><![CDATA[dummy@example.com (Ogis1975)]]></author>
			<pubDate>Mon, 10 Feb 2020 15:05:02 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=19978#p19978</guid>
		</item>
		<item>
			<title><![CDATA[Re: Install music player daemon and set up it as a user service in Devuan]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=19946#p19946</link>
			<description><![CDATA[<p>And my /etc/asound.conf - this gives you OSS emulation and &quot;native&quot; ALSA with separate volume controls. Note: you have to use them before they show up in alsamixer.</p><p>-- CUT --</p><div class="codebox"><pre class="vscroll"><code>pcm.softvol {
    type softvol
    slave {
        pcm &quot;dmix&quot;
    }
    control {
        name &quot;Default Playback Volume&quot;
        card 0
    }
}
       
pcm.!default {
    type plug
    slave.pcm &quot;softvol&quot;
}

pcm.dsp0 {
    type plug
    slave.pcm &quot;dmix&quot;
    control.name &quot;sbagen&quot;
    control.card 0
}

# MPD volume
pcm.mpd {
        type softvol
        slave.pcm &quot;plug:dmix&quot;
        control.name &quot;MPD Playback Volume&quot;
        control.card 0
}

ctl.mpd {
        type hw
        card 0
}</code></pre></div><p>-- CUT --</p><p>PS: Remember to install alsa-oss before trying this!</p>]]></description>
			<author><![CDATA[dummy@example.com (therion23)]]></author>
			<pubDate>Fri, 07 Feb 2020 06:34:21 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=19946#p19946</guid>
		</item>
		<item>
			<title><![CDATA[Re: Install music player daemon and set up it as a user service in Devuan]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=19945#p19945</link>
			<description><![CDATA[<p>Great! mpd is so fun to play with, and you can strip it down to 1mb if you do not need anything fancy.</p><p>Here is a system wide init script:</p><p>--CUT--</p><div class="codebox"><pre class="vscroll"><code>#!/bin/sh

### BEGIN INIT INFO
# Provides:          mpd
# Required-Start:    $local_fs $remote_fs
# Required-Stop:     $local_fs $remote_fs
# Should-Start:      autofs $network $named alsa-utils pulseaudio avahi-daemon
# Should-Stop:       autofs $network $named alsa-utils pulseaudio avahi-daemon
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Music Player Daemon
# Description:       Start the Music Player Daemon (MPD) service
#                    for network access to the local audio queue.
### END INIT INFO

. /lib/lsb/init-functions

PATH=/sbin:/bin:/usr/sbin:/usr/bin
NAME=mpd
DESC=&quot;Music Player Daemon&quot;
DAEMON=/usr/local/bin/mpd
MPDCONF=/usr/local/etc/mpd.conf

# Exit if the package is not installed
[ -x &quot;$DAEMON&quot; ] || exit 0

# Read configuration variable file if it is present
[ -r /etc/default/$NAME ] &amp;&amp; . /etc/default/$NAME

if [ -n &quot;$MPD_DEBUG&quot; ]; then
    set -x
    MPD_OPTS=--verbose
fi

PIDFILE=$(sed -n &#039;s/^[[:space:]]*pid_file[[:space:]]*&quot;\?\([^&quot;]*\)\&quot;\?/\1/p&#039; $MPDCONF)

mpd_start () {
    log_daemon_msg &quot;Starting $DESC&quot; &quot;$NAME&quot;

    if [ -z &quot;$PIDFILE&quot; ]; then
        log_failure_msg \
            &quot;$MPDCONF must have pid_file set; cannot start daemon.&quot;
        exit 1
    fi

    PIDDIR=$(dirname &quot;$PIDFILE&quot;)
    if [ ! -d &quot;$PIDDIR&quot; ]; then
        mkdir -m 0755 $PIDDIR
        if dpkg-statoverride --list --quiet /run/mpd &gt; /dev/null; then
            # if dpkg-statoverride is used update it with permissions there
            dpkg-statoverride --force --quiet --update --add $( dpkg-statoverride --list --quiet /run/mpd ) 2&gt; /dev/null
        else
            # use defaults
            chown mpd:audio $PIDDIR
        fi
    fi

    start-stop-daemon --start --quiet --oknodo --pidfile &quot;$PIDFILE&quot; \
        --exec &quot;$DAEMON&quot; -- $MPD_OPTS &quot;$MPDCONF&quot; &amp;
    log_end_msg $?
}

mpd_stop () {
    if [ -z &quot;$PIDFILE&quot; ]; then
        log_failure_msg \
            &quot;$MPDCONF must have pid_file set; cannot stop daemon.&quot;
        exit 1
    fi

    log_daemon_msg &quot;Stopping $DESC&quot; &quot;$NAME&quot;
    start-stop-daemon --stop --quiet --oknodo --retry 5 --pidfile &quot;$PIDFILE&quot; \
        --exec $DAEMON
    log_end_msg $?
}

# note to self: don&#039;t call the non-standard args for this in
# {post,pre}{inst,rm} scripts since users are not forced to upgrade
# /etc/init.d/mpd when mpd is updated
case &quot;$1&quot; in
    start)
        mpd_start
        ;;
    stop)
        mpd_stop
        ;;
    status)
    	status_of_proc -p $PIDFILE $DAEMON $NAME
	;;
    restart|force-reload)
        mpd_stop
        mpd_start
        ;;
    force-start)
        mpd_start
        ;;
    force-restart)
        mpd_stop
        mpd_start
        ;;
    force-reload)
	mpd_stop
	mpd_start
	;;
    *)
        echo &quot;Usage: $0 {start|stop|restart|force-reload}&quot;
        exit 2
        ;;
esac</code></pre></div><p>--CUT--</p>]]></description>
			<author><![CDATA[dummy@example.com (therion23)]]></author>
			<pubDate>Fri, 07 Feb 2020 03:30:52 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=19945#p19945</guid>
		</item>
		<item>
			<title><![CDATA[Re: Install music player daemon and set up it as a user service in Devuan]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=19502#p19502</link>
			<description><![CDATA[<p>Thanks for sharing the guide Ogis1975, When it comes to cli audio player mpd (Daemon) is irreplaceable.</p>]]></description>
			<author><![CDATA[dummy@example.com (Nili)]]></author>
			<pubDate>Wed, 15 Jan 2020 14:49:40 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=19502#p19502</guid>
		</item>
		<item>
			<title><![CDATA[Install music player daemon and set up it as a user service in Devuan]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=19436#p19436</link>
			<description><![CDATA[<p>This short guide&#160; describes how to install mpd as a user service in Devuan 2.1 (ascii).<br />Install mpd and mpc </p><div class="codebox"><pre><code>#apt install mpd mpc</code></pre></div><p> Mpc is a command line user interface for MPD server.</p><p>By default Devuan installs mpd as a system service. We don&#039;t want this, so let&#039;s remove it from startup.<br />If mpd is running stop it first.</p><div class="codebox"><pre><code>#/etc/init.d/mpd stop</code></pre></div><p>We don&#039;t want MPD to be started as a system service. We want to run it from a regular user account. So we must disable it. Use this command:</p><div class="codebox"><pre><code>#update-rc.d mpd disable</code></pre></div><p>To build the user configuration, extract and copy the default config with command </p><div class="codebox"><pre><code>gunzip -c /usr/share/doc/mpd/examples/mpd.conf.gz</code></pre></div><p> to directory </p><div class="codebox"><pre><code>~/.config/mpd</code></pre></div><p> (make this dir first).</p><p> Edit the config file according to your needs. For example, my config looks like this:</p><div class="codebox"><pre class="vscroll"><code>music_directory     &quot;~/Music&quot;
playlist_directory  &quot;~/Playlists&quot;
db_file             &quot;~/.local/share/mpd/mpd.db&quot;
log_file            &quot;~/.local/share/mpd/mpd.log&quot;
pid_file            &quot;~/.local/share/mpd/mpd.pid&quot;
state_file          &quot;~/.local/share/mpd/mpd.state&quot;
sticker_file        &quot;~/.local/share/mpd/sticker.sql&quot;

bind_to_address     &quot;127.0.0.1&quot;
log_level           &quot;default&quot;
restore_paused      &quot;yes&quot;
metadata_to_use     &quot;artist,album,title,track,date&quot;
auto_update         &quot;yes&quot;

input {
        plugin &quot;curl&quot;
}

audio_output {
        type            &quot;alsa&quot;
        name            &quot;Headset&quot;
        mixer_type      &quot;software&quot;      
}

audio_output {
    type        &quot;fifo&quot;
    name        &quot;mpd_fifo&quot;
    path        &quot;/tmp/mpd.fifo&quot;
    format      &quot;44100:16:2&quot;
}</code></pre></div><p>Don&#039;t forget to create the needed directories (~/Playlists and ~/.local/share/mpd)</p><p>Run mpd. </p><div class="codebox"><pre><code>$ mpd</code></pre></div><p>If everything is ok, it directly detaches itself. (so it looks like it exits). It might complain that the db_file cannot be found, you can safely ignore this. </p><p>In order to build the database file, MPD must scan into the music_directory. A MPD client is required to request this task, for example with mpc the command is </p><div class="codebox"><pre><code>$ mpc update</code></pre></div><p>.</p><p>You most likely want to have mpd started automatically when logging into tty. To start MPD on login add the following to </p><div class="codebox"><pre><code>~/.profile</code></pre></div><div class="codebox"><pre><code># MPD daemon start (if no other user instance exists)
[ ! -s ~/.config/mpd/pid ] &amp;&amp; mpd</code></pre></div><p>That&#039;s it. Now you can enjoy your favorite music.</p><p>P.S.</p><p>In this simple set up i use command line user interface for MPD server. <a href="https://linux.die.net/man/1/mpc" rel="nofollow">Here</a> you can see the commands used in mpc. But there are more clients in the official Devuan repository (TUI and GUI). </p><p><a href="https://ibb.co/m4y7VG8" rel="nofollow"><span class="postimg"><img src="https://i.ibb.co/kXDFsx1/2020-01-12-204649-1920x1080-scrot.png" alt="2020-01-12-204649-1920x1080-scrot.png" /></span></a></p>]]></description>
			<author><![CDATA[dummy@example.com (Ogis1975)]]></author>
			<pubDate>Sun, 12 Jan 2020 18:47:48 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=19436#p19436</guid>
		</item>
	</channel>
</rss>
