Multiple ".pulse" directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ken,

Just so you know, you've jumped ahead to the solution (wanting multiple
.pulse directories) prematurely, rather than describing your problem and
seeking advice. I very highly suspect that this is not the correct
solution to your problem and I explain why below.

'Twas brillig, and Ken Mandelberg at 11/01/12 21:25 did gyre and gimble:
> We mount the same home directory by NFS on multiple machines. Some of
> the machines may even have multiple sessions by the same user.
> 
> Is there some way to tell pulseaudio to use different ~/.pulse
> directories perhaps indexed with some string contrived to be unique for
> the session?

If a user has multiple sessions *on the same machine* they should still
only have one PA daemon running. PA is a *per-user* daemon, not a
*per-session* one (the same is true of dbus these days too with a move
to a user bus, and the phasing out of a session bus). So on a single
machine, you only one one PA daemon per user.

If you have multiple machines mounted over NFS, where users may log in
to separate machines at the same time, PA already handles this
gracefully without any need to have a separate .pulse folder.

All runtime data is kept separate keyed on the individual machine's
unique identifier (this is typically the dbus machine-id
(/var/lib/dbus/machine-id or /etc/machine-id) but if that is not
present, we use the machines hostname) This is why all the files inside
~/.pulse have the weird prefix that is clearly an md5 hash.

We even go out of our way to ensure we put the PA sockets into a known
non-nfs folder (which is why the folder ~/.pulse/$MACHINEID-runtime is a
symlink to a folder in $TMPDIR - e.g. on my macine:
~/.pulse/6cb2a4b2bd6df042e57da8a4000001d4-runtime ->
/tmp/pulse-mI70E4MQYyJC/)

THe fact that the folder inside /tmp is also randomly named is to
prevent DoSing from other users (e.g. pre-creating the dir
/tmp/pulse-colin with permissions such that I could not access it). The
old esound daemon suffered from this kind of DoS.


The only files in ~/.pulse that are not machine specific are the conf
files: client.conf, daemon.conf and default.pa. We could easily enough
support machine specific versions of these if needed, but so far there
has not been a need.

So, all in all, you shouldn't have a problem. But I'm guessing because
you are writing here, you do have some kind of problem.... perhaps you
can give some more info now you know how things are meant to work?
Perhaps all your machines were cloned and thus have the same dbus
machine-id? If so just nuke that file on all machines, reboot them and
they should all get shiney new machine-ids.


Please note that we only started reading the /etc/machine-id very
recently... so if you use a shared /var/lib/ across all machines, please
let me know and I'll give you more info.

All the best

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/


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux