diff -Nurd -x'*~' xorg-server-1.4.2.orig/debian/local/xvfb-run xorg-server-1.4.2/debian/local/xvfb-run --- xorg-server-1.4.2.orig/debian/local/xvfb-run 2012-01-20 18:02:35.000000000 -0500 +++ xorg-server-1.4.2/debian/local/xvfb-run 2012-01-20 18:03:01.000000000 -0500 @@ -31,7 +31,7 @@ # Display a message, wrapping lines at the terminal width. message () { - echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} + echo "$PROGNAME: $*" | fmt -w ${COLUMNS:-$DEFCOLUMNS} } # Display an error message. @@ -69,10 +69,7 @@ # Find a free server number by looking at .X*-lock files in /tmp. find_free_servernum() { - # Sadly, the "local" keyword is not POSIX. Leave the next line commented in - # the hope Debian Policy eventually changes to allow it in /bin/sh scripts - # anyway. - #local i + local i i=$SERVERNUM while [ -f /tmp/.X$i-lock ]; do @@ -152,11 +149,12 @@ error "temporary directory $XVFB_RUN_TMPDIR already exists" exit 4 fi - AUTHFILE=$(tempfile -n "$XVFB_RUN_TMPDIR/Xauthority") + AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority" + touch "$AUTHFILE" fi # Start Xvfb. -MCOOKIE=$(mcookie) +MCOOKIE=$(dd if=/dev/urandom bs=1024 count=1 2> /dev/null | md5) XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1 add :$SERVERNUM $XAUTHPROTO $MCOOKIE EOF