I wrote a silly shell script once that does something similar: pick a random picture from a folder and set it as the wallpaper.
If you just replace picture with movie, and run mplayer instead of bsetbg or whatever, you could pretty much do the same for your need.
This is the script that I wrote:
Code:
#!/usr/bin/bash
#randwall.sh: Randomly sets wallpaper each time it’s run
#Count how many images are there in my folder..
WCOUNT=`ls -1 ~/pictures/recent/* | wc -l`;
#Generate a random number within that range..
num=$[ ( $RANDOM % $WCOUNT ) + 1 ];
#Pick up that particular image..
MYPIC=`ls ~/pictures/recent/* |sed -n ‘ ‘$num’p ‘`;
#and set it as the wallpaper!
bsetbg $MYPIC;
So fiddle around with it until it does what you need. e.g you can run it inside a
while [ 1 ] loop so that it picks the next random movie once the first one is done, etc. Check out tldp's bash guides for more tips.
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html