Random Startup Screens

From OESF

Jump to: navigation, search

Below is a script I wrote to randomize the boot startup images.

 #!/bin/bash
 #
 # $RANDOM returns a different random integer at each invocation.
 # Nominal range: 0 - 32767 (signed 16-bit integer).
 #
 RANGE=`ls -l /home/root/boot_screens/ | grep -c bmp`
 #
 echo
 #
 number=$RANDOM
 let "number %= $RANGE"
 exec  sdisp "/home/root/boot_screens/Startup_screen"$number".bmp"
 echo
 #
 exit 0

I created the directory /home/root/boot_screens/ for all my startup images. The script gets called from qpe.sh like the normal startup image. Let me know if this helps or you need more details here :)

--written by: [stmpynode]

Personal tools