FS#15102 - [jack] change daemon script for promiscuous users

Attached to Project: Arch Linux
Opened by Allan McRae (Allan) - Sunday, 14 June 2009, 10:48 GMT
Last edited by Dan Griffiths (Ghost1227) - Monday, 08 March 2010, 07:59 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Tobias Kieslich (tobias)
Dan Griffiths (Ghost1227)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Running the jack server as root is not recommended and also users can not connect to it, so the rc.d script is not that useful.

One way around this is to set it up to run as a user "jackd" (or something...) and allow promiscuous connections. Something like this in /etc/rc.d/jackd:

case "$1" in
start)
stat_busy "Starting Jack-audio-connection-kit Daemon"
if [ -z "$PID" ]; then
su - jackd -c 'export JACK_PROMISCUOUS_SERVER="" && \
. /etc/conf.d/jack-audio-connection-kit && \
umask 0000 && \
/usr/bin/jackd $SERVER_PARAMS -d $DRIVER_PARAMS &> /dev/null &'
fi


The the user who wants to connect to that jack server needs to define "JACK_PROMISCUOUS_SERVER" in their environment and they can use it. Users starting their own jack server still works.
This task depends upon

Closed by  Dan Griffiths (Ghost1227)
Monday, 08 March 2010, 07:59 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Upstream no longer supports the JACK_PROMISCUOUS_SERVER option
Comment by Allan McRae (Allan) - Wednesday, 17 June 2009, 10:37 GMT
I was sent these files that suggest some other improvements to the jack scripts. It allows the "jackd" user to be defined in the conf file. Worth combining.

Also, it was noted that upstream tend to call this package "jack" so it may be worth renaming this.
Comment by Ray Rashif (schivmeister) - Friday, 19 June 2009, 11:28 GMT
Ahh thanks Allan, I was just about to post.

Anyway upstream actually doesn't have a consensus about naming (as long as it has jack as part of it). There used to be a FAQ entry on this, in which they said it didn't matter. So currently only the tarball is named jack-audio-connection-kit, along with the /usr/share/ dir. I suggested a rename purely because of consistency (since jack2 is coming into the picture soon), and also that we have no reason to not shorten the name length aside from the fact that you'll have to use $replaces and ammend all other related packages to depend on the new name. So it's up to you, tobias.

And please ignore the alsa-plugins part in there. The main thing is the pam file edit.
Comment by Ray Rashif (schivmeister) - Saturday, 06 March 2010, 15:45 GMT
Here's an updated, combined patch to celebrate the rename (and Bug Day of course!).

* updates the package itself
* changes a dependency (to provide previously-missing functionality)
* adds a dummy user to make promiscuous connections a la quassel
* creates the dummy with the init script to be safe from pre-existing accounts
* allows to define a real user instead and use personal app config
* server and driver parameters are combined into one var
* neutral server settings

Difference here is that the user doesn't define the promiscuous variable, but rather, anyone can start the daemon without editing the config. Not so sure if this is better or worse, but appears to work well. One needs to have pam_limits.so in /etc/pam.d/su for this to work properly (I might've forgotten to mention it in install scriptlet).

Loading...