Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
MPD on server with no logged on user or with different users
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
SpatnyNick
n00b
n00b


Joined: 09 Oct 2014
Posts: 2

PostPosted: Thu Oct 09, 2014 9:04 am    Post subject: MPD on server with no logged on user or with different users Reply with quote

Hi all
in the beginning I should mention that I am not advanced or media on linux...

My requirement is to have a MPD server - idea of media daemon is very nice - that I could control e.g. from mobile phone. The computer MPD runs on is a shared station in our living room, with repro where there may be no user currently logged on or there can be some user working. In both cases I would like to have the deamon playng (when a user is logged in that I would like to mix his and MPD's outputs...)

My scenario is MPD (running under user mpd) + PulseAudio. PA is set in a standard way as recommended in Gentoo Wiki and it's working in other applications. Client (currently ncmpc) is able to connect to MPD and start playing, but the sound is not going to sound card. I think that the reason is that the output is directed to dummy sink?

Code:
root@nas ~ # sudo -s -u mpd
mpd@nas /root $ pacmd list-sinks
1 sink(s) available.
  * index: 0
        name: <auto_null>
        driver: <module-null-sink.c>
...
...
        properties:
                device.description = "Dummy Output"
                device.class = "abstract"
                device.icon_name = "audio-card"


I am little bit confused ho to set it up and even if it's possible. Can I assign the correct sink (real sound card) to the user mpd independently of the real logged on user?

Thanks and a nice day to all
Bohuslav
Back to top
View user's profile Send private message
Ant P.
Advocate
Advocate


Joined: 18 Apr 2009
Posts: 2525
Location: UK

PostPosted: Thu Oct 09, 2014 9:28 pm    Post subject: Reply with quote

The simplest fix is running "gpasswd -a mpd audio" as root and restarting MPD.

That has the downside that it'll only work with one user at a time (unless your sound card has hardware mixing). Getting pulseaudio to support multiple users is "unsupported" according to them, and more complicated - someone else would have to explain it here.
_________________
runit-init howto | Overlay
Back to top
View user's profile Send private message
SpatnyNick
n00b
n00b


Joined: 09 Oct 2014
Posts: 2

PostPosted: Fri Oct 10, 2014 6:04 am    Post subject: Reply with quote

Hi,
after some further unsuccessful tries I decided to go to system-wide setup. You are right that it took me some time but it looks it's working exactly as desired.

There is 'pulse' user running in background that has PA started and connected to real audio device, and all users of the computer including mpd are his clients.

Thanks for your help

Bohuslav
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum