Ubuntu Forums Archive Viewer

[HOWTO] Generate random JPG's from vidwhacker (xscreensaver module)

Archived thread 1155295 from Tutorials. Markdown source: Tutorials/thread_1155295_[HOWTO]_Generate_random_JPG's_from_vidwhacker_(xsc.md

Original URL About this archive
#1

I've replaced the Ubunutu/Gnome screensaver with the superior (IMHO) Xscreensaver, using this guide.

I like the VidWhacker module, and have it set to choose a random image from my ~/Pictures/ dir. I wanted to save some of the funky random images it produces, so I did this:


while true; do /usr/lib/xscreensaver/vidwhacker -stdout | convert - `date +%s`.jpg ; echo "Generated jpg"; done

And random images will be saved to your current directory endlessly, until you press CTRL-C.

You'll need ImageMagick installed (sudo apt-get imagemagick) for the convert utility.

Just wanted to share :)

#2

Approved, thank you for your tip contribution! :)

#3

this is an awesome script. did it take you a long time to make? and could it use the original image name?

#4

I believe i may have immproved the code. now it can be easily stoped. I ran in to that problem. I would run the program as a shell script, and it wouldn't always close on ctrl-c now it seem to no problem

while true; do /usr/lib/xscreensaver/vidwhacker -stdout | convert - `date +%s`.jpg ; echo "Generated jpg"; wait ; done