Package: jclic
Version: 0.2.1.0-1
Severity: normal
Tags: patch

The current /usr/bin/jclic script don't detect Pulseaudio in remote DISPLAY

Line 25:
padsp -s "$REMOTE_DISPLAY" -n JClic -m JClic-stream $aux -cp $CLASSPATH -jar 
/usr/share/java/jclic.jar "$@" &>/dev/null 

"$aux" var is not defined (should be java bin path)

I attach new jclic script with local and remote detection.

Note for bashism fix too (bug #581114)...

        "&>/dev/null" should be ">/dev/null 2>&1"

PulseAudio don't create in /tmp folders with usernames:

$ echo /tmp/*pulse*
/tmp/pulse-6pXMGHx5a21D /tmp/pulse-swXuZcruQlTD



Thanks for your work with JClic

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.39-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=es_ES.utf8, LC_CTYPE=es_ES.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages jclic depends on:
ii  default-jre [java6-runtime] 1:1.6-40     Standard Java or Java compatible R
ii  openjdk-6-jre [java6-runtim 6b18-1.8.7-5 OpenJDK Java runtime, using Hotspo
ii  sun-java6-jre [java6-runtim 6.26-1       Sun Java(TM) Runtime Environment (

Versions of packages jclic recommends:
ii  iceweasel                     5.0-3      Web browser based on Firefox
pn  libmysql-java                 <none>     (no description available)

Versions of packages jclic suggests:
ii  ttf-liberation                1.07.0-1   Fonts with the same metrics as Tim
#!/bin/sh

# jclicplayer wrapper script
# code for java detection based on tuxguitar code
# but adding detection of alternatives for jclic

if [ -z $JAVA_HOME ] ; then

	ALTERNATIVE=`ls -l /etc/alternatives/java|grep sun`
	if [ -z "$ALTERNATIVE" ]; then
		ALTERNATIVE=`ls -l /etc/alternatives/java|grep openjdk`
	fi
	
	if [ -z "$ALTERNATIVE" ]; then
        	t=/usr/lib/jvm/java-1.5.0-sun && test -d $t && JAVA_HOME=$t
        	t=/usr/lib/jvm/java-6-sun && test -d $t && JAVA_HOME=$t
	        t=/usr/lib/jvm/java-7-icedtea && test -d $t && JAVA_HOME=$t
        	JAVA=${JAVA_HOME}/jre/bin/java
	fi
fi

# detect pulseaudio with $DISPLAY and "pactl stat"
REMOTE_DISPLAY=$(echo $DISPLAY| awk -F ":" '{print $1}')
if [ "x${REMOTE_DISPLAY}" != "x" ]; then
	# remote PULSEAUDIO
	if [ -x /usr/bin/padsp ] && [ -x /usr/bin/pactl ] && pactl stat >/dev/null 2>&1; then
		PULSE_AUDIO="padsp -s $REMOTE_DISPLAY -n JClic -m JClic-stream"
	fi
else
	# local PULSEAUDIO
	if [ -x /usr/bin/padsp ] && [ -x /usr/bin/pactl ] && pactl stat >/dev/null 2>&1; then
		PULSE_AUDIO="padsp"
	fi
fi


export JAVA=${JAVA:=java}

exec $PULSE_AUDIO $JAVA -jar /usr/share/java/jclic.jar "$@" >/dev/null 2>&1

Reply via email to