I think the problem with whereis is that is may return multiple files
with the right name.  On my linux system it returns 4!  Not all are
executable though....

How about a hard coding a couple of locations and then falling back on
the path:

Code:
--------------------
    
  if [ -x /usr/local/bin/mplayer ] ; then
  app=/usr/local/bin/mplayer
  elif [ -x /usr/bin/mplayer ] ; then
  app=/usr/bin/mplayer
  else
  app=mplayer
  fi
  
--------------------


And to get an extra error message adding the following after the wait
statement:

Code:
--------------------
    
  echo $app Not Found or Completed >&2
  
--------------------


-- 
Triode
------------------------------------------------------------------------
Triode's Profile: http://forums.slimdevices.com/member.php?userid=17
View this thread: http://forums.slimdevices.com/showthread.php?t=22476

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to