On Thu, Jul 29, 2010 at 9:57 PM, Jordan Sissel <j...@semicomplete.com> wrote: > On Thu, Jul 29, 2010 at 10:16 AM, Daniel Kahn Gillmor > <d...@fifthhorseman.net> wrote: >> Cc'ing xdotool-users, as upstream might be interested here. >>
Patch comments inline - >>> --- t/ephemeral-x.STD 2010-07-29 15:33:59.000000000 +0000 >>> +++ t/ephemeral-x.sh 2010-07-29 15:35:17.000000000 +0000 >>> @@ -66,17 +66,17 @@ >>> exit 1 >>> fi >>> >>> -if ! which lsof > /dev/null 2>&1 ; then >>> - echo "Unable to find lsof. This is a required tool." >>> - cleanup >>> - exit 1 >>> -fi >>> +#if ! which lsof > /dev/null 2>&1 ; then >>> +# echo "Unable to find lsof. This is a required tool." >>> +# cleanup >>> +# exit 1 >>> +#fi >>> >>> while true; do >>> num=$(expr $num + 1) >>> xsocket=/tmp/.X11-unix/X$num >>> quiet || echo "Trying :$num" >>> - lsof $xsocket > /dev/null 2>&1 && continue >>> + test -S $xsocket > /dev/null 2>&1 && continue This change seems fine. >>> ( >>> if quiet ; then >>> exec > /dev/null >>> @@ -97,7 +97,7 @@ >>> >>> # See if the xserver got a hold of the display socket. >>> # If so, the server is up and healthy. >>> - if lsof -p $xpid | grep -qF $xsocket ; then >>> + if test -S $xsocket ; then This particular test can incorrectly determine that our X server is has the socket open. The next way to test X connectivity is probably using xdotool itself. I'll try 'xdotool getmouselocation' as an indicator that X is healthy and check that in if it works reliably. -Jordan -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org