PDA

View Full Version : [SOLVED] need nautilus script for "run in terminal"



xzero1
January 12th, 2010, 06:36 PM
I would like to write a nautilus script that runs in a terminal so that its output can be seen. Any ideas?

kaibob
January 13th, 2010, 01:44 AM
I would like to write a nautilus script that runs in a terminal so that its output can be seen. Any ideas?
See post 9 in the following thread. It contains a nautilus script that runs in gnome-terminal:

http://ubuntuforums.org/showthread.php?t=1376386

xzero1
January 13th, 2010, 08:41 PM
That method does not return control to "host" script. Still thanks to your help I have found a way.:)

Scripts for playing all video ".ts" files fullscreen in the current directory with output:


calling script (playallTS):


#!/bin/bash
gnome-terminal -x tsPlayList.sh

called script (tsPlayList.sh):


#!/bin/bash

trap 'pkill -ALRM mplayer;exit 1' INT

for myfile in *.ts
do
stop=`mplayer -fs $myfile | grep -c "End of file"`
if [ $stop = "0" ]
then
break
fi
done