#!/bin/sh ## ## SCRIPT: mplayer_inXterm.sh ## ##+####### ## PURPOSE: ## This script runs the 'mplayer' command in an xterm window --- on a ## filename which is provided to this script as its only argument. ## ##+######### ## CALLED BY: ## This shell script is meant to be called from the Tk GUI 'wrapper' ## script --- 'audioClipChgVolumeConvertEtc_ffmpeg_FrontEnd.tk' --- when ## the user requests the 'mplayer' program to play an input or output audio file. ## ##+###### ## METHOD: ## We use the '-hold' and '-fg' and '-bg' parameters of the xterm command. ## ##+####################################################################### ## Started: 2014jun20 ## Changed: 2014 ##+######################################################################## ## FOR TESTING: (show statements as they execute) # set -x ##+###################################### ## Get the filename passed to this script. ##+###################################### FILENAME="$1" ## FOR TESTING: # FILENAME="$HOME/TESTfilesAUDIO/test_35sec_44100Hz_128kbs_mono_543KB.mp3" ##+##################################################################### ## Run 'mplayer' in an 'xterm' window. ##+##################################################################### ## Found the '-msgcolor -msgmodule -nolirc' parms suggested at ## http://crunchbang.org/forums/viewtopic.php?id=20178 ##+##################################################################### xterm -bg black -fg white -hold -geometry 90x20-10-10 -e \ mplayer -msgcolor -msgmodule -nolirc \ "$FILENAME" 2> /dev/null