#!/bin/bash MEDIA_TYPE=$1 FILE_NAME=$2 XINE=/usr/local/bin/xine # Find the name of the disc case "${MEDIA_TYPE}" in DVD) DISC_NAME=`basename "$FILE_NAME" .dvd` ;; CD) DISC_NAME=`basename "$FILE_NAME" .cd` ;; VCD) DISC_NAME=`basename "$FILE_NAME" .vcd` ;; esac DISC_NAME=`echo "$DISC_NAME" | sed "s/_/ /g"` # Prompt the user to insert the disc xterm -xrm "xterm*allowSendEvents: true" -bg NavyBlue -fg White +sb -fs 48 -fn 12x24 -geometry 40x7+600+300 -e prompt "Please insert ${MEDIA_TYPE}:" "${DISC_NAME}" # Play the disc case "${MEDIA_TYPE}" in DVD) $XINE --no-splash --auto-play=fhq --auto-scan dvd ;; CD) $XINE --no-splash --auto-play=fhq /mnt/cd ;; VCD) $XINE --no-splash --auto-play=fhq --auto-scan vcd ;; esac