[pulseaudio-discuss] systemd socket activation support
Tanu Kaskinen
tanu.kaskinen at linux.intel.com
Sun Oct 26 10:41:04 PDT 2014
Sorry for somewhat slow reply...
On Mon, 2014-10-20 at 12:02 +0100, Colin Guthrie wrote:
> Tanu Kaskinen wrote on 19/10/14 18:10:
> > We support non-systemd systems too, so I think the page should be named
> > something else than just general "Running", given that the contents are
> > only about systemd. Or alternatively add similar documentation for
> > non-systemd systems too.
>
> I think the latter might be a good plan. I can do that if you think
> that's the best of the two options.
Yes, covering all systems is better, if you have the time and motivation
to do that.
> > Also, I don't think "the preferred method of
> > launching and running PulseAudio is via systemd" is an accurate
> > statement. I'm sure it's your preferred method, but you can't generalize
> > that to everyone :)
>
> :) Yeah I'm probably biased. That said, the patch in it's current state
> will automatically enable this due to AC_ARG_ENABLE() if the devel libs
> are found. If we keep it working that way, then I'd argue it does become
> the "preferred way", but happy to change it to default off if you think
> that's the better option (and it might very well be for v6 if it goes in
> in time)?
When systemd is in use, then yes, using systemd to start pulseaudio is
preferred. My point, which I didn't state very clearly, was that if the
user runs pulseaudio on a system that doesn't use systemd, then saying
that "systemd is the preferred method of starting pulseaudio" doesn't
achieve anything else than make us look like we think that everyone
should use systemd.
> > I didn't really review the code, but I was very interested in how you
> > solved the problem of figuring out how to map the socket activation fd
> > to a given module-protocol-native-unix instance, so I took a quick look
> > on that. Looks like a very nice solution.
>
> Yeah, I'll be honest, I did actually do something similar to the other
> patch first by having a kind of "adopt" method, but after fiddling
> around a bit, I moved it more inline.
>
> The beneift of this approach is that you can have multiple
> "ListenStream=nnn" lines in the systemd unit, provided you have a
> corresponding "load-module module-protocol-native-unix socket=nnn" line
> in PA. When socket= is missing it defaults to
> $XDG_RUNTIME_DIR/pulse/native which is what is currently specified in
> the user unit (%t == $XDG_RUNTIME_DIR).
>
> I didn't do the TCP bits, but I suspect the same approach can be used
> there (rather than the _adopt methods) to get much the same results.
>
> I can look to do that if you think this approach is more sensible overall?
I don't understand this question. What approach are you talking about
that might be more sensible? The approach that you implemented seems
very sensible to me, better than the approach used in the previous
patches.
--
Tanu
More information about the pulseaudio-discuss
mailing list