<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://forum.xfce.org/extern.php?action=feed&amp;tid=3335&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Xfce Forums / Changing wallpaper from bash script]]></title>
		<link>http://forum.xfce.org/viewtopic.php?id=3335</link>
		<description><![CDATA[The most recent posts in Changing wallpaper from bash script.]]></description>
		<lastBuildDate>Tue, 24 Apr 2007 18:56:16 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: Changing wallpaper from bash script]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=13969#p13969</link>
			<description><![CDATA[<div class="quotebox"><cite>TomE wrote:</cite><blockquote><div><p>You could have xfdesktop use a link to your desktop image and just change the file it liks to and do a xfdesktop reload. If memory seves thats what my bash script in the link tread does.</p></div></blockquote></div><p>That works once you have configured the wallpaper to a certain (known) picture. You change the picture and restart xfdesktop. But my script has to change your previous configuration from any wallpaper picture you had configured to the new one (once this is done, just restarting will work).</p><p>My script works, but it&#039;s stupid not to have a simpler way to change XFCE&#039;s wallpaper.</p>]]></description>
			<author><![CDATA[dummy@example.com (ozroc)]]></author>
			<pubDate>Tue, 24 Apr 2007 18:56:16 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=13969#p13969</guid>
		</item>
		<item>
			<title><![CDATA[Re: Changing wallpaper from bash script]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=13930#p13930</link>
			<description><![CDATA[<p>I can reproduce ozroc&#039;s observation that an &#039;xfdesktop --reload&#039; does in fact <strong>not</strong> reload the background image after an edit of ~/.config/xfce4/mcs_settings/desktop.xml. Strange, until I realised that my own experience with xfdesktop was restricted to use it <em>to go to the next picture in a list of backdrops</em>. I have consult the man-file which says for the -reload option:</p><div class="quotebox"><blockquote><div><p>Causes&#160; an&#160; already-running&#160; instance of xfdesktop to reload all<br />its settings, including loading a new random backdrop if using a<br />backdrop list.</p></div></blockquote></div><p>So, my understanding i that you can use the xfdesktop -reload, but only if you define your backdrop as a &#039;random&#039; picture from a list (also defined in desktop.xml I believe; just go to desktop settings and create one). You could ofcourse create a one-file list... Note that for the list to work, it should start with a comment lint, I let it start with </p><div class="codebox"><pre><code>echo &quot;# xfce backdrop list&quot; &gt; $list  # Head of list for XFCE to recognize it</code></pre></div><p>where $list is the name of the list file...</p><p>I can dig out the complete script if you are interested (may even be posted here a long time ago). And before you ask: it is not possible afaik to get from xfdesktop (or one of the config files) what the name is of the currently displayed picture.</p>]]></description>
			<author><![CDATA[dummy@example.com (Pindakoe)]]></author>
			<pubDate>Sat, 21 Apr 2007 07:32:35 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=13930#p13930</guid>
		</item>
		<item>
			<title><![CDATA[Re: Changing wallpaper from bash script]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=13922#p13922</link>
			<description><![CDATA[<p>You could have xfdesktop use a link to your desktop image and just change the file it liks to and do a xfdesktop reload. If memory seves thats what my bash script in the link tread does.</p>]]></description>
			<author><![CDATA[dummy@example.com (TomE)]]></author>
			<pubDate>Thu, 19 Apr 2007 21:59:52 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=13922#p13922</guid>
		</item>
		<item>
			<title><![CDATA[Re: Changing wallpaper from bash script]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=13920#p13920</link>
			<description><![CDATA[<div class="quotebox"><cite>TomE wrote:</cite><blockquote><div><p>No need to kill mcs-manager, use xfdesktop --reload</p><div class="codebox"><pre><code>    CHANGE=&quot;$(cat ~/.config/xfce4/mcs_settings/desktop.xml | grep path_0_0 | cut -d\&quot; -f 6 | sed &#039;s/\//\\\//g&#039;)&quot;
    WITH=&quot;the_new_image_path&quot;
    cat ~/.config/xfce4/mcs_settings/desktop.xml | sed &#039;s/&#039;$CHANGE&#039;/&#039;$WITH&#039;/g&#039; &gt; desk2
    mv desk2 ~/.config/xfce4/mcs_settings/desktop.xml
        xfdesktop --reload</code></pre></div><p>should work</p><p>Have a look <a href="http://forum.xfce.org/index.php?topic=2746" rel="nofollow">here</a> as well</p></div></blockquote></div><p>Thank you, but...<br />No, I tried this but didn&#039;t work.&#160; :oops:<br />It ignores the changes, and if I restart mcs-amanager after editing that file it overwrites my changes with the old configuration.</p>]]></description>
			<author><![CDATA[dummy@example.com (ozroc)]]></author>
			<pubDate>Thu, 19 Apr 2007 18:55:07 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=13920#p13920</guid>
		</item>
		<item>
			<title><![CDATA[Re: Changing wallpaper from bash script]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=13915#p13915</link>
			<description><![CDATA[<p>No need to kill mcs-manager, use xfdesktop --reload</p><div class="codebox"><pre><code>    CHANGE=&quot;$(cat ~/.config/xfce4/mcs_settings/desktop.xml | grep path_0_0 | cut -d\&quot; -f 6 | sed &#039;s/\//\\\//g&#039;)&quot;
    WITH=&quot;the_new_image_path&quot;
    cat ~/.config/xfce4/mcs_settings/desktop.xml | sed &#039;s/&#039;$CHANGE&#039;/&#039;$WITH&#039;/g&#039; &gt; desk2
    mv desk2 ~/.config/xfce4/mcs_settings/desktop.xml
        xfdesktop --reload</code></pre></div><p>should work</p><p>Have a look <a href="http://forum.xfce.org/index.php?topic=2746" rel="nofollow">here</a> as well</p>]]></description>
			<author><![CDATA[dummy@example.com (TomE)]]></author>
			<pubDate>Thu, 19 Apr 2007 11:09:56 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=13915#p13915</guid>
		</item>
		<item>
			<title><![CDATA[Changing wallpaper from bash script]]></title>
			<link>http://forum.xfce.org/viewtopic.php?pid=13912#p13912</link>
			<description><![CDATA[<p>Hello<br />I&#039;ve been trying to change xfce&#039;s wallpaper from a bash script. <br />It&#039;s for a small program we&#039;re working on that makes a wallpaper from NASA&#039;s Astronomy picture of the day (and some other &quot;picture of the day&quot; sites).<br />I couldn&#039;t find a simple command for this like for other desktop environments, so had to do this:</p><div class="codebox"><pre><code>    killall xfce-mcs-manager
    wait
    CHANGE=&quot;$(cat ~/.config/xfce4/mcs_settings/desktop.xml | grep path_0_0 | cut -d\&quot; -f 6 | sed &#039;s/\//\\\//g&#039;)&quot;
    WITH=&quot;the_new_image_path&quot;
    cat ~/.config/xfce4/mcs_settings/desktop.xml | sed &#039;s/&#039;$CHANGE&#039;/&#039;$WITH&#039;/g&#039; &gt; desk2
    mv desk2 ~/.config/xfce4/mcs_settings/desktop.xml
    xfce-mcs-manager</code></pre></div><p>I mean, I have to kill mcs-manager, grep desktop.xml looking for the actual wallpaper and change it&#039;s path with the new one and finally restart mcs-manager.</p><p>Isn&#039;t there a cleaner way for doing this? :?<br />Any ideas?</p><br /><p>If anyone&#039;s interested in the &quot;Picture Of the Day Wallpaper Generator&quot;, can visit <a href="http://ozrocberg.blogspot.com" rel="nofollow">http://ozrocberg.blogspot.com</a>. For the moment the news are in Spanish but will be in English for the first release.</p>]]></description>
			<author><![CDATA[dummy@example.com (ozroc)]]></author>
			<pubDate>Thu, 19 Apr 2007 08:34:26 +0000</pubDate>
			<guid>http://forum.xfce.org/viewtopic.php?pid=13912#p13912</guid>
		</item>
	</channel>
</rss>
