desktopearth on linux script
this is a perl scrip that downloads the most recent on demand image and sets the background to it. I know that exec is insecure but I figure it's secure enough inside the box.
Copy this code and paste it in your HTML
#!/usr/bin/perl
my $ua = LWP:: UserAgent -> new ;
$ua -> timeout ( 10 ) ;
$ua -> env_proxy ;
my $response = $ua -> get ( 'http://codefromthe70s.org/bin/desktopearthgen.exe?width=1920&height=1200&height=1200&bars=1¢er=1&clouds=1&utc=' . time ) ;
open ( current
, ">/home/dcooley/.fluxbox/backgrounds/current.png" ) || die ( "Could not open file\n " ) ;
if ( $response -> is_success ) {
print current
( $response -> content ) ; } else {
die $response -> status_line ; }
exec '/usr/bin/fbsetbg /home/dcooley/.fluxbox/backgrounds/current.png' ;
URL: codefromthe70s.org
Report this snippet
Comments
Subscribe to comments