You are not logged in.

#1 2007-04-07 16:51:07

unixguru
Member
Registered: 2006-05-02
Posts: 85

mpd odd problem

I am using mpd, i followed the instructions from the wiki except that i have to choose my music directory as /home/mpd/music, if i choose ~/music it says /var/mpd/music folder not found. Which is the easiest way to manage a library which constantly changes?

Offline

#2 2007-04-07 20:42:20

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: mpd odd problem

I'm assuming you intend for each person to have their own music directory?  I'm not sure if that will work the way you're thinking, since MPD is a daemon and not run by the user who is logged in...it's always running in the background by root or whatever user you drop privileges to.  What I do personally, is create a centralized music directory that is sticky, so anybody on my machine can access all the music, but they can't delete or change the music that they didn't put there.  I use /home/shared/music, but it could go anywhere.  That way, if you want just your music, all you have to do is create a playlist for it, and off you go.  Hopefully that helps...

Offline

#3 2007-04-08 03:47:32

cheer
Member
From: Russia, St. Petersburg
Registered: 2006-08-02
Posts: 131

Re: mpd odd problem

You can see in the example file:

# Note: ~ is the home directory of user set in the "user" option

So simply select

user                            "mpd"

(and check that the home directory of the user 'mpd' is /home/mpd).

Offline

#4 2007-04-08 05:35:50

unixguru
Member
Registered: 2006-05-02
Posts: 85

Re: mpd odd problem

user is set to mpd but still the problem persists.

Offline

#5 2007-04-08 19:55:07

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: mpd odd problem

I think there's still some miscommunication here.  What is the reason you can't specify the absolute path as /home/mpd/music rather than using the ~/music ?  If the reason is that you want to "manage a library which constantly changes" meaning it will be in different places (or you'll have a different music library for each user), then like I said before, that isn't going to be possible.  Even if you get ~/music to properly resolve to /home/mpd/music, that is still the ONLY location mpd will pull music from since it drops priviledges to the mpd user and nobody else.  It will not change users depending on who is logged in, and thus the location of the music library will also not change.  If that doesn't make sense, then maybe I'm just not understanding what your end goal is.  It might also be helpful to post your configuration file on http://pastebin.archlinux.org/ and give us a link.

Offline

#6 2007-04-09 03:29:49

unixguru
Member
Registered: 2006-05-02
Posts: 85

Re: mpd odd problem

I am sorry for my poor communication skills, i will try to be more clear now. What i hope to achieve are these
1. Each user will have ~/music as his library directory. He will have to create symlink for all the music he wants in this directory.
2. Each user will have access only to his library.

I want to do this, this way because i have few thousand songs and my father listens only to sanskrit stotrams, my brother to some japanese stuff and me to Eminem. Creating playlists for each of these seems to be an elegant solution, but it would be nice if each user has a seperate library.

Last edited by unixguru (2007-04-09 03:30:36)

Offline

#7 2007-04-09 05:26:45

cheer
Member
From: Russia, St. Petersburg
Registered: 2006-08-02
Posts: 131

Re: mpd odd problem

You can put .mpdconf file in ~ for all users as stated in man mpd. Then you have to start daemon using your .mpdconf file

Offline

#8 2007-04-09 20:24:50

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: mpd odd problem

Ahhh...didn't remember that mpd did that.  I've never messed with using the user specific configuration files, but it does look like you should be able to define ~/.mpdconf and have it point to the library of just that individual's music.  You'll still have to make sure that the mpd user (or whomever privileges get dropped to) has access to read those files, but it should work as you want.

Offline

Board footer

Powered by FluxBB