Location: PHPKode > scripts > Web montage > web-montage/rndwallpaper.php
#!/usr/bin/php
<?php
error_reporting(0);
require_once('class.webmontage.php');

$ss = new webmontage;
$ss->gpages = 2;
$ss->cvswidth = 1600;
$ss->cvsheight = 1200;
$ss->dictionary = "lists/wallpaper.lst";
$ss->gsize = 6;
$ss->cvsbordergif = "borders/borderwp.gif";
//$ss->keeppic = true;			//decide if you want to keep retrieved pictures
/*
	simple commandline for a single desktop change by dcop (KDE)

$ss->cmdline='dcop kdesktop KBackgroundIface setWallpaper 1 "%image%" 6';
$ss->wallpaper();
*/

/*
	changing 8 desktops at once power to the people :-)
*/
$desktop=1;
while($desktop < 9){
	
	$ss->cvsname = '/tmp/canvas'.$desktop.'.jpg';
	$ss->cmdline='dcop kdesktop KBackgroundIface setWallpaper '.$desktop.' "%image%" 6';

	$ss->wallpaper();

	$desktop++;
}
exit;

?>
Return current item: Web montage