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

/usr/bin/jclic was patched in previous bug #465080 to detect 
remote display and PulseAudio sound server, but the method 
can be better, please accept this patch:

1.- $aux varname should be $JAVA and should be declared before using it.

2.- $DISPLAY can be ::ffff:192.x.x.x:0.0 (new GDM versions works with 
    IPV6) and should split it with ":0"

3.- test can be done in the same if (not 2 different if)

4.- Use "pactl stat" to ping pulseaudio, in bug #573615 pulse developers
    don't create /tmp/$USER-pulse folders anymore.

5.- pactl and padsp are in pulseaudio-utils package, 
    can you add this to Suggests or Recomends??


Thanks for your work at Debian.
Greetings.


--- /usr/bin/jclic.orig 2010-04-04 23:23:29.000000000 +0200
+++ /usr/bin/jclic      2010-04-04 23:32:49.000000000 +0200
@@ -19,18 +19,21 @@
        fi
 fi
 
-REMOTE_DISPLAY=$(echo $DISPLAY| awk -F ":" '{print $1}')
-if [ "${REMOTE_DISPLAY}" != "" ]; then
-  if [ -x /usr/bin/padsp ]; then
-     padsp -s "$REMOTE_DISPLAY" -n JClic -m JClic-stream $aux -cp $CLASSPATH 
-jar /usr/share/java/jclic.jar "$@" &>/dev/null 
+export JAVA=${JAVA:=java}
+
+REMOTE_DISPLAY=$(echo $DISPLAY| awk -F ":0" '{print $1}')
+if [ "x${REMOTE_DISPLAY}" != "x" ] && [ -x /usr/bin/padsp ]; then
+     padsp -s "$REMOTE_DISPLAY" -n JClic -m JClic-stream $JAVA -cp $CLASSPATH 
-jar /usr/share/java/jclic.jar "$@" &>/dev/null 
      exit 0
-  fi
 fi
 
-export JAVA=${JAVA:=java}
 
 PULSE_AUDIO=""
-if [ -d /tmp/${USER}-pulse/ ]; then
+# pulseaudio create in /tmp a dir with
+# random name /tmp/pulse-xxxxxxxxxxxx
+# see Debian bug #573615
+# use pactl stat in silent mode to ping pulseaudio server
+if [ -x /usr/bin/pactl ] && pactl stat &>/dev/null ; then
        PULSE_AUDIO="padsp"
 fi
 






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

Kernel: Linux 2.6.32-3-686 (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages jclic depends on:
ii  openjdk-6-jre [java6-runtime 6b18~pre2-1 OpenJDK Java runtime, using Hotspo
ii  sun-java6-jre [java6-runtime 6.18-4      Sun Java(TM) Runtime Environment (

Versions of packages jclic recommends:
ii  iceweasel                  3.5.8-1       Web browser based on Firefox
ii  libmysql-java              5.1.10+dfsg-2 Java database (JDBC) driver for My

Versions of packages jclic suggests:
ii  ttf-liberation         1.05.2.20091019-4 Fonts with the same metrics as Tim
ii  ttf-mscorefonts-instal 3.2               Installer for Microsoft TrueType c

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to