0

Im new with linux so when when im facing this problem my first choice is to search it on google, but in these couple days still got no results. when im run this script on new instalation it will return "default: command not found". if im running this script on his machine it will run fine and playing all the videos with scrolling text.

here's the code:

#!/bin/bash

source /etc/atv.conf
export DISPLAY=:0

sleep 5

default $default &

while true; do

  sleep 1
  now=$(date +"%T")

  while read line
  do
    set -- "$line"
    IFS="#";
    declare -a array=($*)

    if [ ${array[0]} == $now ]; then
      duration=${array[1]}
      filename=${array[2]}
      filetype=${array[3]}

      default $filetype $filename $duration &

    fi
  done < $playlist

done

This script is to run video file with exist playlist using mplayer on ubuntu dekstop 12.04 LTS

What does the default at "default $default &" line refer to? for the $default is on the file.conf

$default=screen

for atv.conf

#ATV CONFIGURATION

#host
host=/home/atv

#media
media=CGK

#ATV Server
server=192.168.50.37

#Aeromedia Server
aeromedia=192.168.50.16

#Program matv_tv,matv,tv
program=matv_tv

#default tv|screen
default=screen

#if screen
default_file=$host/$media/tvp/22_Screen_Saver.mpg

#chn TV Channel
chn=38

#hw audio hardware 0,1,2,...
hw=2

#Media Folder
playlist=/home/atv/$media/$media.playlist
media_tvp=$host/$media/tvp
media_sb=$host/$media/sb
media_tvc=$host/$media/tvc
media_ds=$host/$media/ds
media_default=$host/default_screen

#TVC
res_tvc=1024x768
geo_tvc=0+0

#TVP
res_tvp=1024x598
geo_tvp=0+0

#Scrolling Banner
res_sb=1024x140
geo_sb=0+630

#TV
res_tv=1024x768
geo_tv=0+0

#Running Text
txt_geo=590
txt_size=26
  • 1
    What is the error? Or what are you expecting to happen? What happens instead? – Aleks-Daniel Jakimenko-A. Aug 23 '13 at 17:21
  • Kind of just curious but did you make the script or did you get it from somewhere else? And what does `/etc/file.conf` contain? – konsolebox Aug 23 '13 at 17:24
  • 1
    Actually I think `default` could have been referring to a function inside the script but it's not there. Was this script originally a part of another larger script? – konsolebox Aug 23 '13 at 17:50
  • Can be a screen command?. – user1502952 Aug 23 '13 at 18:18
  • Check if `which default` returns anything. It's not a standard external program or `{ba,}sh` built-in command. (It's a `csh` built-in, but that doesn't seem relevant here.) – chepner Aug 23 '13 at 19:21
  • `default` is referring to a function defined in another part of the script, or another command. – lurker Aug 24 '13 at 01:27
  • this script was created by previous co-worker to display advertising videos, lost contact with him so now im stuck with his script, on startup run "/usr/bin/atv", config file at "/etc/atv.conf", videos and playlist is at "/home/atv/VID" im not sure if there is another part of script that related to this, so far the only thing i know is that this script will run mplayer for videos and tickr for scrolling text. – Bagoesajah Aug 25 '13 at 03:14

0 Answers0