It appears that ltsp-sound.sh is not well thought, as it bugs in certain conditions. Patch attached fixes these bugs. Problems fixed: - If no domain is set, the address loses it's first dot, which causes it to not work anymore - If the IP address used when connecting with nc is not set, warning is given. Functionality changed to check return value of nc instead, which is non-zero if no one is listening. --- old/ltsp-sound.sh 2005-03-01 18:17:33.000000000 +0200 +++ new/ltsp-sound.sh 2005-03-01 18:17:27.000000000 +0200 @@ -33,8 +33,11 @@ ################################################################################ DOMAIN=`dnsdomainname` -MYNAME=`echo $DISPLAY | cut -d: -f1 | sed s/\\\.${DOMAIN}//` - +if [ "${DOMAIN}" = "" ]; then + MYNAME=`echo $DISPLAY | cut -d: -f1` +else + MYNAME=`echo $DISPLAY | cut -d: -f1 | sed s/\\\.${DOMAIN}//` +fi if [ -n "${MYNAME}" -a "${MYNAME}" != "localhost" ]; then # # Usage: get_cfg PARM [DEFAULT] @@ -66,9 +69,8 @@ # terminal is listening # if [ "$REMOTESOUNDIP" -a -x "`which nc 2> /dev/null`" ]; then - NC=`/usr/bin/nc -v -w 1 -z $REMOTESOUNDIP $REMOTESOUNDPORT 2>&1 \ - | grep -v open$` - if [ "${NC}" ]; then + NC=`/usr/bin/nc -w 1 -z $REMOTESOUNDIP $REMOTESOUNDPORT >/dev/null 2>&1 ` + if [ $? -ne 0 ]; then # # netcat says the terminal is not listening, bail! # @@ -83,11 +85,9 @@ # don't use this hack for local X sessions, root, and only if # the pre-load libraries are found # - if [ "${REMOTESOUNDIP}" \ - -a -x "$LIBESDPATH" \ - -a -x "$LIBESDDSPPATH" ] + if [ "${REMOTESOUNDIP}" -a -x "$LIBESDPATH" -a -x "$LIBESDDSPPATH" ] then - export ESPEAKER=${REMOTESOUNDIP}:16001 + export ESPEAKER=${REMOTESOUNDIP}:${REMOTESOUNDPORT} export ESDDSP_MIXER=1 export LD_PRELOAD="$LIBESDPATH $LIBESDDSPPATH" /usr/bin/esdctl unlock
The nc fix posted here also should fix another bug. On my system, nc does not return "open" as ltsp-sound.sh expects, so ltsp-sound.sh always thinks the terminal is not listening. $ rpm -q nc nc-1.82-fc4.1 $ /usr/bin/nc -v -w 1 -z ws0017 16002 nc: connect to ws0017 port 16002 (tcp) failed: Connection refused $ /usr/bin/nc -v -w 1 -z ws0017 16001 Connection to ws0017 16001 port [tcp/*] succeeded!
Aki Tossavainen Do you still experience this issue with newer drivers ? Please check the status of your issue.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.