I would like to have a script that runs via puppy and shows a pdf file, then another, then a movie, then a pdf, etc.
How can I set up a script to run this continuously until I tell it to stop? i just barely know basic bash scripting, but I don't know how to tell it to run in a loop/continuously till I tell it to stop...
Suggestions? I plan on having a laptop hooked into a tv doing a presentation continuously till I tell it to stop...
Script for Continuous Running Presentation
/usr/bin/myplayer
Instead of leafpad and rxvt you could start your mediafiles with epdfview or other utilities.
You could run it from a console, and stop with CTRL-C.
Or run it from a "grafical utility":
/usr/bin/myplayercontrol
Please tell me if it does not work, I did not check the scripts.
Mark
Code: Select all
#!/bin/bash
#-- this is a endless loop --
while [ 1 ];do
echo "Hit CTRL-C to exit the loop!"
#-- run application 1 --
leafpad
#-- run application 2 --
rxvt
#-- add others here --
done
You could run it from a console, and stop with CTRL-C.
Or run it from a "grafical utility":
/usr/bin/myplayercontrol
Code: Select all
#!/bin/bash
#-- run the player as backgroundprocess --
myplayer &
#-- get the process ID of the player process --
pid=$!
#-- grafical interface --
xmessage -title "player" -buttons "stop" "
click on \"stop\" to stop the presentation!
"
#-- stop the player --
kill -9 $pid
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]
thanks, Mark, that should be the basics that get me going...once again, you rock.
One more question though: I realize that if I open something like a pdf viewer I will then want to close it. Things like mplayer aren't as big an issue as they will end once the movie ends, but how to I stop the pdf viewer? Something like 'killall'? Is that the best way?
One more question though: I realize that if I open something like a pdf viewer I will then want to close it. Things like mplayer aren't as big an issue as they will end once the movie ends, but how to I stop the pdf viewer? Something like 'killall'? Is that the best way?
maybe like this:
Mark
Code: Select all
epdfview /root/pdf1.pdf &
pid=$!
sleep 20
kill $pid
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]