You can put the script in your .bash_profile to run when you first log in, even if the login is automatic.
To prevent the script from running with successive logins, you can have it check to see if it is already running, or restrict the script to run only when logged in to a particular console, etc.
For example:
Code:
if [ -z "$DISPLAY" ] && [ $(tty) == /dev/tty1 ]; then
flux
fi
In this case, a user is automatically logged in via tty1 upon boot up, and a fluxbox session is begun.
cheers,