View previous topic :: View next topic |
Author |
Message |
SpatnyNick n00b
Joined: 09 Oct 2014 Posts: 11
|
Posted: Thu Oct 09, 2014 9:04 am Post subject: MPD on server with no logged on user or with different users |
|
|
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 |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Oct 09, 2014 9:28 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
SpatnyNick n00b
Joined: 09 Oct 2014 Posts: 11
|
Posted: Fri Oct 10, 2014 6:04 am Post subject: |
|
|
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 |
|
|
|