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

Bug#500249: jackd: Add config file options for promiscuous server



Package: jackd
Version: 0.109.2-4
Severity: wishlist
Tags: patch

The following changes to the debian package files add support for
running jackd as a central server in such a way that user applications
can connect even though they were not run as the user running jackd.

This is an undocumented feature.  Pushing a manpage patch upstream
might be a good way to get a read as to whether they intend to keep
this feature supported.

While it should work when running jack under any user (as long as
groups and umasks are set correctly) currently if jackd is not run
as root, applications connect but hang.  Has something to do with
permissions of the jackd process itself in building a SHM back to the
client program.  Would be nice if someone could figure that out
and then combine pulseaudio's groups/user into a central "audiod"
user/group shared by jackd and pulseaudio.

(This is a patch against unpacked debs not against the source.)


diff -r -U2 jack_orig/etc/default/jackd jack_promisc/etc/default/jackd
--- jack_orig/etc/default/jackd 2008-09-17 09:49:40.000000000 -0400
+++ jack_promisc/etc/default/jackd      2008-09-26 11:03:06.000000000
-0400
@@ -2,6 +2,16 @@
 START_DAEMON=no

-# The jackd process will run under this user
+# The jackd process will run under this user and group
 USER=fred
+GROUP=fred
+
+# Setting JACK_PROMISCUOUS_SERVER (to anything) allows users other than $USER
+# to connect to the jackd server.  You must also set the $UMASK to
+# 007 (restrict to processes from $GROUP) or 000 (everything can connect)
+# You must also set JACK_PROMISCUOUS_SERVER in each client's environment
+#
+# Right now this only works when $USER is "root"
+#JACK_PROMISCUOUS_SERVER=""
+UMASK=077

 # Options to pass to jackd

diff -r -U2 jack_orig/etc/init.d/jackd jack_promisc/etc/init.d/jackd
--- jack_orig/etc/init.d/jackd  2008-09-17 09:49:40.000000000 -0400
+++ jack_promisc/etc/init.d/jackd       2008-09-26 10:58:34.000000000
-0400
@@ -31,4 +31,5 @@
 test -f /etc/default/jackd || exit 0
 . /etc/default/jackd
+export JACK_PROMISCUOUS_SERVER

 OPTIONS="$OPTIONS"
@@ -57,5 +58,5 @@
                fi
                log_begin_msg "Starting jackd audio server:" "jackd"
-               if start-stop-daemon -m -b -S -o -q -p $PIDFILE -x $DAEMON -u $USER -c $USER -a $DAEMON -- $OPTIONS; then
+               if start-stop-daemon -m -b -S -o -q -p $PIDFILE -x $DAEMON -u $USER -c $USER -g $GROUP -a $DAEMON -k $UMASK -- $OPTIONS;
then
                        log_end_msg 0
                else

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-rc9charon (PREEMPT)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages jackd depends on:
ii  libc6                         2.7-13     GNU C Library: Shared libraries
ii  libjack0                      0.109.2-4  JACK Audio Connection Kit (librari
ii  libreadline5                  5.2-3      GNU readline and history libraries
ii  libsndfile1                   1.0.17-4   Library for reading/writing audio

Versions of packages jackd recommends:
ii  libpam-modules                1.0.1-4    Pluggable Authentication Modules f
ii  qjackctl                      0.3.2-1    User interface for controlling the

Versions of packages jackd suggests:
ii  jack-tools                    0.0.2-5    various JACK tools: plumbing, play
ii  libjackasyn0                  0.11-2     The Asynchrounous JACK Library
ii  meterbridge                   0.9.2-6    A collection of Audio meters for t

-- no debconf information




Reply to: