Hi, Kim

the only way I got mpd working system wide in F17, was recursively
labelling all my mp3 directory "audio_home_t".

You can try mdp as a user, using something as:

music_directory              "/home/mp3"
playlist_directory             "/home/kim/.mpd/playlists"
db_file                            "/home/kim/.mpd/database"
log_file                           "/home/kim/.mpd/log"
pid_file                           "/home/kim/.mpd/pid"
state_file                        "/home/kim/.mpd/state"

.....

bind_to_address                 "0.0.0.0"  <---- this may help

and just starting mpd (this is how it runs in Mac OS for me).
It should work in linux this way if the selinux labels are wrong.
But maybe F19 has something different.

Anyway, is it working in F19 using /var/run/mpd?













On Thu, Jul 25, 2013 at 4:22 PM, Kim Bisgaard
<kim...@alleroedderne.adsl.dk>wrote:

> Hi Paulo,
>
> If I look at selinux labeling in F19 it looks like the attached picture.
> See "Part 2"
>
> I can see that selinux expects the pid and socket file to be in
> "/var/run/mpd"
>
> I have no audio_home_t, but mpd_data_t
>
> Here is my system wide config:
> music_directory         "/var/lib/mpd/music"
> playlist_directory      "/var/lib/mpd/playlists"
> db_file                 "/var/lib/mpd/database"
> pid_file                "/var/run/mpd/pid"
> user                    "mpd"
> bind_to_address         "192.168.0.5"
> bind_to_address         "/var/run/mpd/socket"
> port                    "6600"
> log_level               "verbose"
> metadata_to_use "artist,album,title,track,**name,genre,date,composer,**
> performer,disc"
> follow_outside_symlinks "yes"
> follow_inside_symlinks  "yes"
> zeroconf_enabled        "no"
> input {
>           plugin          "curl"
> }
> audio_output {
>           type            "pulse"
>           name            "My Pulse Output"
>           sink            "alsa_output.pci-0000_00_14.2.**analog-stereo"
> }
>
> Which unfortunately does still not work. I can get alsa output to work if
> I do not mind not beeing able to touch the volume. But Pulseaudio just
> gives: {{mpd: output: Failed to open "My Pulse Output" [pulse]: failed to
> connect: Connection terminated}}
>
> I do NOT think that you can help or is responsible - I just think that Mpd
> is somewhat difficult to configure correctly on Fedora (I had similar
> problems in F17 :-(  )
>
> Best regards,
> Kim
>
>
> Den 25-07-2013 16:01, Paulo Cavalcanti skrev:
>
>> mpd has a directory where, among other things, its database and pid are
>> stored.
>>
>> If mpd is run system wide as root, this is /var/lib/mpd, as you should
>> set in
>> /etc/mpd.conf:
>>
>> cascavel:~] ls -al /var/lib/mpd
>> total 12604
>> drwxr-xr-x.  5 mpd  mpd            4096 Jul 18 07:12 .
>> drwxrwxr-x. 78 root procgrafico    4096 Jul 14 22:37 ..
>> -rw-r--r--.  1 mpd  mpd         3350971 Jul 20 17:37 database
>> -rw-------.  1 mpd  mpd              16 Jul  5  2012 .esd_auth
>> -rw-r--r--.  1 root root        9508991 Jul 24 18:20 log
>> drwxr-xr-x.  2 mpd  mpd            4096 Jul 10 09:08 music
>> -rw-r--r--.  1 mpd  mpd               5 Jul 18 07:12 pid
>> drwxr-xr-x.  2 mpd  mpd            4096 Jul 10 09:08 playlists
>> drwx------.  2 mpd  mpd            4096 Feb  9 00:09 .pulse
>> -rw-------.  1 mpd  mpd             256 Jul  5  2012 .pulse-cookie
>> -rw-r--r--.  1 mpd  mpd            3258 Jul 20 17:42 state
>>
>>
>> If mpd is run for a single user this is generally ~/.mpd:
>>
>> [cascavel:~] ls -al ~/.mpd
>> total 8260
>> drwxrwxr-x.   4 roma roma    4096 Mar 11 08:45 .
>> drwxr-xr-x. 115 roma roma   12288 Jul 24 17:10 ..
>> drwxrwxr-x.   2 roma roma    4096 Sep  2  2012 .AppleDouble
>> -rw-rw-r--.   1 roma roma 3313663 Mar  7 09:00 database
>> -rw-rw-r--.   1 roma roma 5093395 Mar 11 17:30 log
>> -rw-r--r--.   1 roma roma   13727 Jul  7  2012 mpd.conf
>> -rw-rw-r--.   1 roma roma       5 Mar 11 08:45 pid
>> drwxrwxr-x.   2 roma roma    4096 Oct 14  2012 playlists
>> -rw-rw-r--.   1 roma roma    3917 Mar  7 09:32 state
>>
>> Therefore, there has never been a /var/run/mpd. To use the system wide
>> approach with selinux active, the files must be labelled "audio_home_t".
>>
>> Nonetheless, you have to edit /etc/mpd.conf and set your choices,
>> removing the pounds (#) at least until:
>>
>> #state_file                     "/var/lib/mpd/state"
>>
>> Otherwise, I doubt mpd will work...
>>
>>
>>
>> On Thu, Jul 25, 2013 at 8:14 AM, Kim Bisgaard
>> <kim...@alleroedderne.adsl.dk 
>> <mailto:kim+j2@alleroedderne.**adsl.dk<kim%2...@alleroedderne.adsl.dk>>>
>> wrote:
>>
>>     Hi Paulo,
>>
>>     I have tried to use it on F19. THANKS!!
>>
>>     I could not get it to start. It threw a very misleading error -
>>     "Failed to bind to 'localhost': No such file or directory", but the
>>     real reason was that the directory "/var/run/mpd" was not created.
>>
>>     This in it self has nothing to do with systemd as such, just because
>>     Fedora introduced the empty /var at the same time (tmpfs mounted
>> /var) .
>>
>>     Hope this clears it up?
>>
>>     Regards,
>>     Kim
>>
>>
>>     On 2013-07-25 12:25, Paulo Cavalcanti wrote:
>>
>>>     Hi,
>>>
>>>     the version for F17 uses systemd, ant the other for rhel6, does not.
>>>
>>>     What version do you mean?
>>>
>>>
>>>
>>>
>>>     On Tue, Jul 23, 2013 at 8:51 AM, Kim Bisgaard
>>>     <kim...@alleroedderne.adsl.dk
>>>     <mailto:kim+j2@alleroedderne.**adsl.dk<kim%2...@alleroedderne.adsl.dk>>>
>>> wrote:
>>>
>>>         Hi Paulo,
>>>
>>>         Could I persuade you to create the directory with the socket
>>>         file in the package? This prevents the package to work on
>>>         distributions with systemd.
>>>
>>>         The spec-file-fu is something like the following:
>>>         file mpd.tpmfilesd with this line:
>>>         d /var/run/mpd 0755 mpd audio -
>>>
>>>         Source10: mpd.tmpfilesd
>>>
>>>         %if %{with systemd}
>>>         #install -p -D -m 644 %{SOURCE10}
>>>         $RPM_BUILD_ROOT%{_tmpfilesdir}**/mpd.conf
>>>         install -p -D -m 644 %{SOURCE10}
>>>         $RPM_BUILD_ROOT/etc/tmpfiles.**d/mpd.conf
>>>         %endif
>>>
>>>         Regards,
>>>         Kim
>>>
>>>
>>>
>>>         On 2013-07-10 14:30, Paulo Cavalcanti wrote:
>>>
>>>>         Hi, Axel
>>>>
>>>>         I have two versions. One for Fedora, which uses mpd.service,
>>>>         and another for rhel6 with /etc/rc.d/init.d/mpd.
>>>>
>>>>         The fedora version is the same we had before, but the rhel6
>>>>         will allow
>>>>         an upgrade from the previous 0.16.7 we have at ATrpms.
>>>>
>>>>         Thanks.
>>>>
>>>>
>>>>         http://people.atrpms.net/~**pcavalcanti/srpms/mpd-0.17.4-**
>>>> 25.el6.src.rpm<http://people.atrpms.net/~pcavalcanti/srpms/mpd-0.17.4-25.el6.src.rpm>
>>>>         <http://people.atrpms.net/%**7Epcavalcanti/srpms/mpd-0.17.**
>>>> 4-25.el6.src.rpm<http://people.atrpms.net/%7Epcavalcanti/srpms/mpd-0.17.4-25.el6.src.rpm>
>>>> >
>>>>
>>>>
>>>>         http://people.atrpms.net/~**pcavalcanti/srpms/mpd-0.17.4-**
>>>> 27.fc17.src.rpm<http://people.atrpms.net/~pcavalcanti/srpms/mpd-0.17.4-27.fc17.src.rpm>
>>>>         <http://people.atrpms.net/%**7Epcavalcanti/srpms/mpd-0.17.**
>>>> 4-27.fc17.src.rpm<http://people.atrpms.net/%7Epcavalcanti/srpms/mpd-0.17.4-27.fc17.src.rpm>
>>>> >
>>>>
>>>>
>>>>
>>>>         --
>>>>         Paulo Roma Cavalcanti
>>>>         LCG - UFRJ
>>>>
>>>>
>>>>         ______________________________**_________________
>>>>         atrpms-devel mailing list
>>>>         atrpms-devel@atrpms.net  
>>>> <mailto:atrpms-devel@atrpms.**net<atrpms-devel@atrpms.net>
>>>> >
>>>>         
>>>> http://lists.atrpms.net/**mailman/listinfo/atrpms-devel<http://lists.atrpms.net/mailman/listinfo/atrpms-devel>
>>>>
>>>
>>>
>>>         ______________________________**_________________
>>>         atrpms-devel mailing list
>>>         atrpms-devel@atrpms.net 
>>> <mailto:atrpms-devel@atrpms.**net<atrpms-devel@atrpms.net>
>>> >
>>>         
>>> http://lists.atrpms.net/**mailman/listinfo/atrpms-devel<http://lists.atrpms.net/mailman/listinfo/atrpms-devel>
>>>
>>>
>>>
>>>
>>>     --
>>>     Paulo Roma Cavalcanti
>>>     DCC - UFRJ
>>>
>>>
>>>     ______________________________**_________________
>>>     atrpms-devel mailing list
>>>     atrpms-devel@atrpms.net  
>>> <mailto:atrpms-devel@atrpms.**net<atrpms-devel@atrpms.net>
>>> >
>>>     
>>> http://lists.atrpms.net/**mailman/listinfo/atrpms-devel<http://lists.atrpms.net/mailman/listinfo/atrpms-devel>
>>>
>>
>>
>>     ______________________________**_________________
>>     atrpms-devel mailing list
>>     atrpms-devel@atrpms.net 
>> <mailto:atrpms-devel@atrpms.**net<atrpms-devel@atrpms.net>
>> >
>>     
>> http://lists.atrpms.net/**mailman/listinfo/atrpms-devel<http://lists.atrpms.net/mailman/listinfo/atrpms-devel>
>>
>>
>>
>>
>> --
>> Paulo Roma Cavalcanti
>> DCC - UFRJ
>>
>>
>> ______________________________**_________________
>> atrpms-devel mailing list
>> atrpms-devel@atrpms.net
>> http://lists.atrpms.net/**mailman/listinfo/atrpms-devel<http://lists.atrpms.net/mailman/listinfo/atrpms-devel>
>>
>>
>
>
> ______________________________**_________________
> atrpms-devel mailing list
> atrpms-devel@atrpms.net
> http://lists.atrpms.net/**mailman/listinfo/atrpms-devel<http://lists.atrpms.net/mailman/listinfo/atrpms-devel>
>



-- 
Paulo Roma Cavalcanti
DCC - UFRJ
_______________________________________________
atrpms-devel mailing list
atrpms-devel@atrpms.net
http://lists.atrpms.net/mailman/listinfo/atrpms-devel

Reply via email to