I am trying to add something to my .fvwm2rc that would make every PAGE on every DESKTOP have a random image (a PNG image from /home//.fvwm/background/) set as the background. Currently though, I am having trouble just trying to simply set a random image as the background for ALL OF THE DESKTOPS (I am captilizing because I would like it if somebody told me how to clarify). I have found a perl script that does this, and I have been fooling around with it (although I dont know any perl) and this is what I have:
Module FvwmPerl --export PerlEval
# find all background pixmaps for a later use
PerlEval $a = $ENV{HOME} . "/.fvwm/background"; \
opendir DIR, $a; @b = grep { /PNG$/ } readdir(DIR); closedir DIR
# choose a random background to load on start-up
PerlEval cmd("AddToFunc \
InitFunction + I Exec exec fvwm-root $a/" . $b[int(random(@b))])
(original source:
It seems, like it should work, but it doesnt for some reason. I was also hoping though that somebody might be able to tell me what code I should put it in so that there is a random image for each PAGE on each DESK. Thanks!