In Ubuntu Linux, the background color does not need to be a static color. That means you can write a script to change it automatically each a period of time. In this script, you can see that the background color will be changed each 10 seconds. I have set parameters for colors to change the background color from dark to light each round. If you want to see effect immediately, you can set this value to 1/2 (haft second).

Step 1: Copy this codes to a new file named chbgcl.pl

#!/usr/bin/perl
my $path = "/desktop/gnome/background/primary_color";
my $R, $G, $B; # Red, Green, Blue colors
while ( 1 )
{
# scale up to the range 0-255, but cap it at 255
$R = ($R + 1) % 255;
$G = ($G + 1) % 255;
$B = ($B + 1) % 255;
# convert to hex and set color
$color = sprintf "%02X%02X%02X",$R,$G,$B;
system("gconftool-2 -t str --set $path '#$color'");
sleep 10;
}
done

Step 2: Run the script
perl chbgcl.pl

You can set other values to variables $R, $G, $B to have other effects. Please share your results with everybody here.

1 comments

  1. wiz // 7/26/07, 1:18 AM  

    Mine version done for years ago... A bit complicated but worth it (:

    Used with gradients, rotates only hue value of colors.