<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Netflow Developments &#187; space art</title>
	<atom:link href="http://blog.netflowdevelopments.com/tag/space-art/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.netflowdevelopments.com</link>
	<description>The latest and greatest happenings in the world of Science, Technology and everything else Geek</description>
	<lastBuildDate>Fri, 10 Feb 2012 09:22:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Creating a custom slideshow for your wallpaper in ubuntu</title>
		<link>http://blog.netflowdevelopments.com/2010/07/12/creating-a-custom-slideshow-for-your-wallpaper-in-ubuntu/</link>
		<comments>http://blog.netflowdevelopments.com/2010/07/12/creating-a-custom-slideshow-for-your-wallpaper-in-ubuntu/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 10:21:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[add]]></category>
		<category><![CDATA[auto]]></category>
		<category><![CDATA[background]]></category>
		<category><![CDATA[cosmos]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[slideshow]]></category>
		<category><![CDATA[space art]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[wallpaper]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=498</guid>
		<description><![CDATA[So it seems that I&#8217;ve had a similar experience to a lot of people changing their wallpapers in ubuntu.  You&#8217;re scrolling through a bunch and in the list you notice this one called cosmos that doesn&#8217;t quite looks like the rest.  &#8220;Hmmm, what&#8217;s this?&#8217; you think.  This looks like a bunch of images stacked on [...]]]></description>
			<content:encoded><![CDATA[<p>So it seems that I&#8217;ve had a similar experience to a lot of people changing their wallpapers in ubuntu.  You&#8217;re scrolling through a<img class="alignright" title="wallpaper" src="http://1.bp.blogspot.com/_njfTl4D4ZQU/Sz426eLDH8I/AAAAAAAAABI/OFixF5QPI9s/s320/sample1.png" alt="" width="320" height="270" /> bunch and in the list you notice this one called cosmos that doesn&#8217;t quite looks like the rest.  &#8220;Hmmm, what&#8217;s this?&#8217; you think.  This looks like a bunch of images stacked on top of each other.  Could it be?  And yes, it is, it&#8217;s a multi-image slideshow that can have as your background that rotates on a schedule that you choose.  I immediately sat down and started figuring out how this thing works and in the end it was pretty simple, time consuming to setup as you have to input a ton of values into an xml file but simple.  I&#8217;m not going to go into huge detail about how it works if you want to read more head over to <a href="http://www.linuxjournal.com/content/create-custom-transitioning-background-your-gnome-228-desktop" target="_blank">http://www.linuxjournal.com/content/create-custom-transitioning-background-your-gnome-228-desktop</a></p>
<p>So today I stumbled upon a motherload of amazing 3D space art at <a href="http://joejesus.deviantart.com">http://joejesus.deviantart.com</a> and I go completely gaga over space art.. My wallpapers are all sci-fi scenes, I just can&#8217;t get over how breath taking some of these are.  So I raided the guys stash and ended up with around 30-40 new pieces for my wallpaper slideshow and like hell was I going to enter all of these in by hand so off I went searching for a nice little script that would do it for me.  I mean come on, one of the reasons I&#8217;m a linux user because I gave up the notion that time consuming repetitive tasks were something that you had to do by hand and sure enough I found a wonderful gentlemen over at the ubuntu forums who coded up a beauty of a script that worked like a charm.  So make sure to head over to : <a href="http://ubuntuforums.org/showthread.php?p=9578962" target="_blank">http://ubuntuforums.org/showthread.php?p=9578962</a> and give the guy a big thank you hug for saving you hours of work, and read the instructions on how to use it.</p>
<p>Here&#8217;s the script, just copy and paste this into a file, chmod it to 755 and you&#8217;re off to the races:</p>
<blockquote>
<pre>#!/bin/sh
#This script creates xml files that can act as dynamic wallpapers for Gnome by referring to multiple wallpapers
#Coded by David J Krajnik
if [ "$*" = "" ]; then
  echo "This script creates xml files that can act as dynamic backgrounds for Gnome by referring to multiple wallpapers";
  echo "Usage: mkwlppr.sh target-file.xml [duration] pic1 pic2 [pic3 .. picN]";
else
  files=$*;
  #Grab the name of the target xml file
  xmlfile=`echo $files | cut -d " " -f 1`;
  #remove the first item from $files
  files=`echo $files | sed 's/^\&lt;[^ ]*\&gt;//'`;
  if [ "`echo $xmlfile | grep '\.xml$'`" = "" ]; then
    echo "Your target file must be an XML file";
  else
    inputIsValid="true";
    firstItem=`echo $files | cut -d " " -f 1`;
    duration="1795.0";#set the default duration
    if [ "`echo $firstItem | grep '^[0-9]\+\.[0-9]\+$'`" != "" ]; then
      echo "The duration must be an integer";
      files=`echo $files | sed 's/^\&lt;[^ ]*\&gt;//'`;
      inputIsValid="";
    elif [ "`echo $firstItem | grep '^[0-9]\+$'`" != "" ]; then
      #If the item is a number, then use it as the duration for each wallpaper image
      duration="`expr $firstItem - 5`.0";
      #remove the duration from the list of files
      files=`echo $files | sed 's/^\&lt;[^ ]*\&gt;//'`;
    fi
    if [ "$files" = "" ]; then
      echo "You must enter image files to associate with the XML file";
    else
      for file in $files
      do
        if [ ! -f $file ]; then
	  echo "\"$file\" does not exist";
	  inputIsValid="";
        elif [ "`echo $file | sed 's/^.*\.\(jpg\|jpeg\|bmp\|png\|gif\|tif\|tiff\|jif\|jfif\|jp2\|jpx\|j2k\|j2c\)$//'`" != "" ]; then
	  echo "\"$file\" is not an image file";
	  inputIsValid="";
	fi
      done
      if [ $inputIsValid ]; then
        currDir=`pwd`;
        echo "&lt;background&gt;" &gt;&gt; $xmlfile
        echo "  &lt;starttime&gt;\n    &lt;year&gt;2009&lt;/year&gt;\n    &lt;month&gt;08&lt;/month&gt;\n    &lt;day&gt;04&lt;/day&gt;" &gt;&gt; $xmlfile;
        echo "    &lt;hour&gt;00&lt;/hour&gt;\n    &lt;minute&gt;00&lt;/minute&gt;\n    &lt;second&gt;00&lt;/second&gt;\n  &lt;/starttime&gt;" &gt;&gt; $xmlfile;
        echo "  &lt;!-- This animation will start at midnight. --&gt;" &gt;&gt; $xmlfile;
        firstFile=`echo $files | cut -d " " -f 1`;#grab the first item
        if [ "`echo $firstFile | sed 's/\(.\).*/\1/'`" != "/" ]; then
          #If the first character in the filename is not '/', then it is a relative path and must have the current directory's path appended
          firstFile="$currDir/$firstFile";
        fi
        firstFile=`echo $firstFile | sed 's/[^/]\+\/\.\.\/\?//g'`;#Remove occurrences of ".." from the filepath
        files=`echo $files | sed 's/^\&lt;[^ ]*\&gt;//'`;#remove the first item
        prevFile=$firstFile;
        currFile="";
        #TODO add absolute path to the filenames
        #if $currFile =~ "^/.*" then the file needs to path appended
        echo "  &lt;static&gt;\n    &lt;duration&gt;$duration&lt;/duration&gt;\n    &lt;file&gt;$firstFile&lt;/file&gt;\n  &lt;/static&gt;" &gt;&gt; $xmlfile;
        for currFile in $files
        do
          if [ "`echo $currFile | sed 's/\(.\).*/\1/'`" != "/" ]; then
            #If the first character in the filename is not '/', then it is a relative path and must have the current directory's path appended
            currFile="$currDir/$currFile";
          fi
          currFile=`echo $currFile | sed 's/[^/]\+\/\.\.\/\?//g'`;#Remove occurrences of ".." from the filepath
          echo "  &lt;transition&gt;\n    &lt;duration&gt;5.0&lt;/duration&gt;\n    &lt;from&gt;$prevFile&lt;/from&gt;\n    &lt;to&gt;$currFile&lt;/to&gt;\n  &lt;/transition&gt;" &gt;&gt; $xmlfile;
          echo "  &lt;static&gt;\n    &lt;duration&gt;$duration&lt;/duration&gt;\n    &lt;file&gt;$currFile&lt;/file&gt;\n  &lt;/static&gt;" &gt;&gt; $xmlfile;
          prevFile=$currFile;
        done
        echo "  &lt;transition&gt;\n    &lt;duration&gt;5.0&lt;/duration&gt;\n    &lt;from&gt;$currFile&lt;/from&gt;\n    &lt;to&gt;$firstFile&lt;/to&gt;\n  &lt;/transition&gt;" &gt;&gt; $xmlfile;
        echo "&lt;/background&gt;" &gt;&gt; $xmlfile;
      fi
    fi
  fi
fi
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2010/07/12/creating-a-custom-slideshow-for-your-wallpaper-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

