View | Details | Raw Unified
Collapse All | Expand All

(-)xdtv_record.sh.in.orig (-3 / +6 lines)
 Lines 765-771    Link Here 
765
XLINE=\$(ps axuwww | grep -e "[/\s]X .* \?-auth" | head -1)
765
XLINE=\$(ps axuwww | grep -e "[/\s]X .* \?-auth" | head -1)
766
766
767
AUTHORITYFILE=\$(echo \$XLINE | awk '/-auth/ { match( \$0, /.*-auth ([^ ]+).*/, pippo); print pippo[1]; }')
767
AUTHORITYFILE=\$(echo \$XLINE | awk '/-auth/ { match( \$0, /.*-auth ([^ ]+).*/, pippo); print pippo[1]; }')
768
export DISPLAY=\$(echo \$XLINE | sed 's#.* \(:[0-9]\+\(\.\?[0-9]\+\)\?\).*#\1#' )
768
DISPLAY=\$(echo \$XLINE | sed 's#.* \(:[0-9]\+\(\.\?[0-9]\+\)\?\).*#\1#' )
769
[ -n "\$DISPLAY" ] || DISPLAY=:0.0
770
export DISPLAY
769
771
770
# If we launched X via a startx command, probably we have XAUTHORITY fixed
772
# If we launched X via a startx command, probably we have XAUTHORITY fixed
771
# in our home directory, so we use the \$XAUTHORITY value.
773
# in our home directory, so we use the \$XAUTHORITY value.
 Lines 775-781    Link Here 
775
fi
777
fi
776
778
777
# Then we add the key found to our keyring
779
# Then we add the key found to our keyring
778
xauth -f \${AUTHORITYFILE:-\$HOME/.Xauthority} list | awk -v DISPLAY=\${DISPLAY:-:0} '{ print DISPLAY" "\$2" "\$3; }' | xargs xauth add
780
xauth -f \${AUTHORITYFILE:-\$HOME/.Xauthority} list | head -n1 | awk -v DISPLAY=\${DISPLAY:-:0.0} '{ print DISPLAY" "\$2" "\$3; }' | xargs xauth add
779
781
780
cd $avi_dir
782
cd $avi_dir
781
783
 Lines 790-796    Link Here 
790
cat >> $file <<_END_
792
cat >> $file <<_END_
791
echo "Will kill all running xdtv !"
793
echo "Will kill all running xdtv !"
792
killall xdtv 2>/dev/null
794
killall xdtv 2>/dev/null
793
xdtv $parameters -e "setstation $channel_number; record" &
795
amixer set Capture 50% >/dev/null 2>&1
796
xdtv $parameters -e "setstation $channel_number; fullscreen; record" &
794
sleep $record_time
797
sleep $record_time
795
xdtv_cmd "record; quit"
798
xdtv_cmd "record; quit"
796
sleep 1
799
sleep 1