jackaudio / jack1

jack1 codebase
Other
250 stars 71 forks source link

Jack doesn't work across users on OSX #52

Closed Qix- closed 7 years ago

Qix- commented 7 years ago

It appears as if jackd cannot be accessed if run as a daemon process on OSX (under sudo) by non-sudo users.

Any way of making this not so?

jdek commented 7 years ago

Change permissions on the socket?

Qix- commented 7 years ago

Shouldn't that be an automatic thing, though?

jdek commented 7 years ago

Why would it be? If you start it as root, jack wont infer that you meant to start it as another user.

Qix- commented 7 years ago

No but setting the file permissions (not ownership) can be an automatic thing.

jdek commented 7 years ago

Making it world readable/writable isn't a sane thing to do.

adiknoth commented 7 years ago

PROMISCUOUS_MODE has been discussed on the mailing list multiple times.

The default is per-user, and there's no intention to make it easy to run in a multi-user environment.

Qix- commented 7 years ago

But this makes JACK unusable on OSX...

jdek commented 7 years ago

@Qix- you have already found a solution to your problem. It shouldn't be too hard for you to add a chmod somewhere in a fork of jack in order to achieve your goal.

Qix- commented 7 years ago

@enoposix No, I haven't.

JACK does not work with newer versions of OS/X as an audio device since the new HAL architecture runs as a separate user when running the daemon. Since JACK doesn't support multiple users (as noted by @adiknoth), there is absolutely no way to pipe audio to the audio card.

Not that it really matters; #50 still prevents JACK from being used on OSX anyway.

adiknoth commented 7 years ago

I didn't say this. Jack communicates via shared memory, which is a file. You can chmod that file to allow access to another group or even everyone.

Since this mode is (was?) discouraged, it's not documented to great extend, but you can search the mailing list for JACK_PROMISCUOUS_SERVER. And grep the source, it's supposed to be an environment variable.

There's also a proxy driver in jackd2 that connects a per-user jackd to a global one running in promiscuous mode.

My memory fails me, but maybe we've deleted some of the code required to make this work. Either way, it's really just a chmod under the hood.

Qix- commented 5 years ago

it's really just a chmod under the hood.

Yes, correct. However it's a chmod that should be happening automatically since it degrades user experience when installing e.g. the HAL server I was trying to write. Requiring users do a sudo chmod is dangerous.