diff -Nurd -x'*~' xorg-server-1.4.2.orig/debian/local/xvfb-run xorg-server-1.4.2/debian/local/xvfb-run
old
|
new
|
|
31 | 31 | |
32 | 32 | # Display a message, wrapping lines at the terminal width. |
33 | 33 | message () { |
34 | | echo "$PROGNAME: $*" | fmt -t -w ${COLUMNS:-$DEFCOLUMNS} |
| 34 | echo "$PROGNAME: $*" | fmt -w ${COLUMNS:-$DEFCOLUMNS} |
35 | 35 | } |
36 | 36 | |
37 | 37 | # Display an error message. |
… |
… |
|
69 | 69 | |
70 | 70 | # Find a free server number by looking at .X*-lock files in /tmp. |
71 | 71 | find_free_servernum() { |
72 | | # Sadly, the "local" keyword is not POSIX. Leave the next line commented in |
73 | | # the hope Debian Policy eventually changes to allow it in /bin/sh scripts |
74 | | # anyway. |
75 | | #local i |
| 72 | local i |
76 | 73 | |
77 | 74 | i=$SERVERNUM |
78 | 75 | while [ -f /tmp/.X$i-lock ]; do |
… |
… |
|
152 | 149 | error "temporary directory $XVFB_RUN_TMPDIR already exists" |
153 | 150 | exit 4 |
154 | 151 | fi |
155 | | AUTHFILE=$(tempfile -n "$XVFB_RUN_TMPDIR/Xauthority") |
| 152 | AUTHFILE="$XVFB_RUN_TMPDIR/Xauthority" |
| 153 | touch "$AUTHFILE" |
156 | 154 | fi |
157 | 155 | |
158 | 156 | # Start Xvfb. |
159 | | MCOOKIE=$(mcookie) |
| 157 | MCOOKIE=$(dd if=/dev/urandom bs=1024 count=1 2> /dev/null | md5) |
160 | 158 | XAUTHORITY=$AUTHFILE xauth source - << EOF >>"$ERRORFILE" 2>&1 |
161 | 159 | add :$SERVERNUM $XAUTHPROTO $MCOOKIE |
162 | 160 | EOF |