This should be more fool-proof (the previous one would often pick the wrong process):
P=`pgrep gnome-screensav`; gnome-screensaver-command --activate; while sleep 30; do ps lx | awk '{ if ($4=='$P') print}' >> saver.log; gnome-screensaver-command --activate; gnome-screensaver-command --cycle; done
You will have to sort the results with: sort -k 12 saver.log > random-savers.txt
This should be more fool-proof (the previous one would often pick the wrong process):
P=`pgrep gnome-screensav`; gnome-screensav er-command --activate; while sleep 30; do ps lx | awk '{ if ($4=='$P') print}' >> saver.log; gnome-screensav er-command --activate; gnome-screensav er-command --cycle; done
You will have to sort the results with: sort -k 12 saver.log > random-savers.txt