[pulseaudio-discuss] ubuntu usb "desktop-server" with single user and constant audio feed from mpd

Colin Guthrie gmane at colin.guthr.ie
Mon Sep 19 02:13:58 PDT 2011


'Twas brillig, and Martin Hamant at 19/09/11 09:38 did gyre and gimble:
> Le 16/09/2011 13:35, Colin Guthrie a écrit :
>> As a secondary solution for you now, what I'd recommend is the following:
>>
>>   1. Add your user to the "audio" group. THis means you'll always have
>> the right to use the audio devices on your system even when not logged
>> in. This comes with some drawbacks (like gdm user not being able to
>> access the device when you've got it open with mpd) but in a single
>> (real) user system, this isn't too bad.
>>
>>   2. Run mpd as you, not as an "mpd" user.
>>
>>
>> With this setup things should (mostly) work OK for you.
>>
>>
>> The alternative is to use system wide mode but then you won't get the
>> benefits of e.g. SHM and module loading etc. etc. without doing quite a
>> few tweaks.

> Thank you Colin for answering that fast.
> "run mpd as you" implies to not run mpd as a system wide service but
> with "manual" start.
> Or I would have to modify system wide /etc/mpd.conf with my user: that
> would work but would be a little inconsistent...

I'm not personally super familiar with mpd config but I believe this is
how other users have configured things yes.

> In another hand, the user isn't doing anything else that playing audio
> files thru mpd, and recording with another app: liquidsoap which runs as
> 'liquidsoap' user, which is in the pulse-access group..... system sounds
> are disabled.

Well the pulse-access group is only relevant for a system-wide PA
configuration. If you use a system-wide PA, then just add all the users
who want access to audio to the pulse-access group (including mpd user)
and you should be set.

It's generally not our recommended setup due to the following reasons:
 1. It prevents client-server usage of SHM memory to avoid copying audio
data around. This results in reduced overhead.
 2. Due to security reasons, module loading is disabled. This can
complicate things such as bluetooth and network device discovery.
 3. If there are multiple users, they can spy on each other's audio.

> The question is: do I need on the fly module loading in that context ?

If this is all the systemd does (play mpd and record via liquidsoap) and
you don't really ever login to the machine and use it as e.g. a desktop,
then I'd personally setup a single user add it ot the audio group and
use it for both mpd and liquidsoap and let it run it's own PA server.

However if you do genuinely login to the machine and use it via e.g. X11
or similar, then I'd just set things up as your user.

Hope this helps.

Col


-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


More information about the pulseaudio-discuss mailing list