#!/bin/bash
XVPORT=$(xvinfo|grep -A 2 Overlay|awk '/base/{print $3}') 
if [ "$XVPORT" ]; then
 echo XVPORT detected: $XVPORT
 cat <<EOF >~/.Xdefaults
kaxtv.xvport: $XVPORT
motv.xvport: $XVPORT
xawtv.xvport: $XVPORT 
EOF
 xrdb ~/.Xdefaults
else
 echo Error: no XVPORT detected!
fi
