Progress Bar in Ubuntu 10.04 and Math.Random()
Charlie Brej
plymouth at brej.org
Wed Jul 28 08:31:18 PDT 2010
On 28/07/10 15:32, Bruno Moreira Alves wrote:
> Hi everyone, been having some realy hard time with plymouth customizing
> here...
>
> I'm using Ubuntu 10.04 Lucid Lynx... I was trying out some themes, but
> realized that every theme that shows a progress bar doesn't properly
> work... the boot process finishes and the progress bar is still around
> 15%.... even the ubuntu-studio theme installed from ubuntu repositories
> show the same thing....
>
> why?
I'm not sure. You're not the first person to report this in Ubuntu and I
suspect the the boot progress file is not being saved correctly.
Remember, when you test a theme, this overwrites the progress file and
the next boot will not know what the progress is. So you will need to
reboot twice before the progress is displayed correctly.
Do you have "/var/lib/plymouth/boot-duration". What is in it?
> it works, but everytime is the same background, the random function, is
> using alway the same seed I suppose?
Thats right, you need to seed it. I was going to add a seed function,
but then I would also needed to add a time function to make a seed. I'll
fix this soon.
> randombg = Math.Int(Math.Random()* 6.9) + 1 ;
Random gives a number 0<=X<1 so it will never be 1, so you don't need
the 6.9 instead of 7. Also, counting from zero rules!
More information about the plymouth
mailing list