diff -uNr xawdecode/xdtv_record.sh.in xawdecode-new/xdtv_record.sh.in --- xawdecode/xdtv_record.sh.in 2007-03-02 15:02:17 +0300 +++ xawdecode-new/xdtv_record.sh.in 2007-05-19 23:20:30 +0400 @@ -768,7 +768,9 @@ XLINE=\$(ps axuwww | grep -e "[/\s]X[org]* .* \?-auth" | head -1) AUTHORITYFILE=\$(echo \$XLINE | awk '/-auth/ { match( \$0, /.*-auth ([^ ]+).*/, pippo); print pippo[1]; }') -export DISPLAY=\$(echo \$XLINE | sed 's#.* \(:[0-9]\+\(\.\?[0-9]\+\)\?\).*#\1#' ) +DISPLAY=\$(echo \$XLINE | sed 's#.* \(:[0-9]\+\(\.\?[0-9]\+\)\?\).*#\1#' ) +[ -n "\$DISPLAY" ] || DISPLAY=:0.0 +export DISPLAY # If we launched X via a startx command, probably we have XAUTHORITY fixed # in our home directory, so we use the \$XAUTHORITY value. @@ -778,7 +780,7 @@ fi # Then we add the key found to our keyring -xauth -f \${AUTHORITYFILE:-\$HOME/.Xauthority} list | awk -v DISPLAY=\${DISPLAY:-:0} '{ print DISPLAY" "\$2" "\$3; }' | xargs xauth add +xauth -f \${AUTHORITYFILE:-\$HOME/.Xauthority} list | head -n1 | awk -v DISPLAY=\${DISPLAY:-:0.0} '{ print DISPLAY" "\$2" "\$3; }' | xargs xauth add cd $avi_dir @@ -793,7 +795,8 @@ cat >> $file <<_END_ echo "Will kill all running xdtv !" killall xdtv 2>/dev/null -xdtv $parameters -e "setstation $channel_number; record" & +amixer set Capture 50% >/dev/null 2>&1 +xdtv $parameters -e "setstation $channel_number; fullscreen; record" & sleep $record_time xdtv_cmd "record; quit" sleep 1