<?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>usefulfor.com/nothing &#187; X Windows</title>
	<atom:link href="http://usefulfor.com/nothing/category/x-windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://usefulfor.com/nothing</link>
	<description>If it doesn't fit anywhere else, it's in /nothing</description>
	<lastBuildDate>Wed, 10 Jun 2009 21:05:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>kde desktop background auto change</title>
		<link>http://usefulfor.com/nothing/2006/12/14/kde-desktop-background-auto-change/</link>
		<comments>http://usefulfor.com/nothing/2006/12/14/kde-desktop-background-auto-change/#comments</comments>
		<pubDate>Thu, 14 Dec 2006 11:21:26 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[X Windows]]></category>

		<guid isPermaLink="false">http://weblog.nomejortu.com/?p=10</guid>
		<description><![CDATA[Much in the way we did with xfce here is the way to implement de auto change feature in KDE.
This is an easy one. Although you can perform background auto change from KDE control center, it may be usefull to have a script to do the task. You can use this script to create a [...]]]></description>
			<content:encoded><![CDATA[<p>Much in the way we did with <a>xfce</a> here is the way to implement de <em>auto change</em> feature in <a href="http://www.kde.org/">KDE</a>.</p>
<p>This is an easy one. Although you can perform background auto change from KDE control center, it may be usefull to have a script to do the task. You can use this script to create a link in your desktop to change the background image when you want.</p>
<p>The KDE applications can be controlled by scripts via the <a href="http://developer.kde.org/documentation/other/dcop.html">DCOP</a> mechanism. From the <a href="http://en.wikipedia.org/wiki/DCOP">Wikipedia</a>:</p>
<blockquote><p>
DCOP, which stands for Desktop COmmunication Protocol, is a light-weight interprocess and software componentry communication system. The main point of this system is to allow applications to interoperate, and to share complex tasks. Essentially, DCOP is a &#8216;remote control&#8217; system, which allows an application or a script to enlist the help of other applications. It is built on top of the X Window System&#8217;s Inter-Client Exchange protocol.</p></blockquote>
<p><span id="more-14"></span><br />
Let&#8217;s begin with the script, here is the <a href="/nothing/files/2008/06/kde-desktop.sh">code</a>:</p>
<div class="hl-surround" ><div class="hl-main"><pre>#!/bin/bash
dcop kdesktop KBackgroundIface changeWallpaper</pre></div></div>
<p>Now, you have to create a list of backgrounds using KDE&#8217;s control center. First open <code>kcontrol</code>, browse to  <code>Appearance &amp; Themes &gt; Background</code> and select <code>Slide Show</code>. Click on <code>Settings</code></p>
<p class="aligncenter"><img src="http://usefulfor.com/nothing/files/2008/06/kdebackgroundlist.jpg" alt="KDE Slide Show Dialog" width="438" height="349" class="aligncenter size-full wp-image-60" /></p>
<p>Just create the list, and the script is ready to go.</p>
<img src="http://usefulfor.com/nothing/?ak_action=api_record_view&id=14&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://usefulfor.com/nothing/2006/12/14/kde-desktop-background-auto-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xmms song in mail&#8217;s signature</title>
		<link>http://usefulfor.com/nothing/2005/11/12/xmms-song-in-mails-signature/</link>
		<comments>http://usefulfor.com/nothing/2005/11/12/xmms-song-in-mails-signature/#comments</comments>
		<pubDate>Sat, 12 Nov 2005 11:28:27 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[X Windows]]></category>

		<guid isPermaLink="false">http://weblog.nomejortu.com/?p=5</guid>
		<description><![CDATA[We need three files for this:

signature.txt: you should point your mail client to this one
signature.tpl: here is the common text to display, something like &#8220;xmms is now playing:&#8220;
signature.sh: the script first copies the contents of the template file to the final signature file, and then adds the current song as a new line.


Download signature.sh:
#!/bin/sh
cat /home/etd/scripts/signature.tpl [...]]]></description>
			<content:encoded><![CDATA[<p>We need three files for this:</p>
<ul>
<li><strong>signature.txt:</strong> you should point your mail client to this one</li>
<li><strong>signature.tpl:</strong> here is the common text to display, something like &#8220;<em>xmms is now playing:</em>&#8220;</li>
<li><strong>signature.sh:</strong> the script first copies the contents of the template file to the final signature file, and then adds the current song as a new line.</li>
</ul>
<p><span id="more-10"></span><br />
Download <a href="/nothing/files/2008/06/signature.sh">signature.sh</a>:</p>
<div class="hl-surround" ><div class="hl-main"><pre>#!/bin/sh
cat /home/etd/scripts/signature.tpl &gt; /home/etd/scripts/signature.txt
echo $1 &gt;&gt; /home/etd/scripts/signature.txt</pre></div></div>
<p>you only need to call the script using the <strong>change song</strong> xmms builtin plugin.</p>
<img src="http://usefulfor.com/nothing/?ak_action=api_record_view&id=10&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://usefulfor.com/nothing/2005/11/12/xmms-song-in-mails-signature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>xfce desktop background auto change</title>
		<link>http://usefulfor.com/nothing/2005/09/19/xfce-desktop-background-auto-change/</link>
		<comments>http://usefulfor.com/nothing/2005/09/19/xfce-desktop-background-auto-change/#comments</comments>
		<pubDate>Mon, 19 Sep 2005 14:59:38 +0000</pubDate>
		<dc:creator>etd</dc:creator>
				<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[X Windows]]></category>

		<guid isPermaLink="false">http://www.nomejortu.com/weblog/?p=2</guid>
		<description><![CDATA[First of all check Xfce 4 Desktop Manager help. Click on the New list&#8230; button and create a list with all the backgrounds you want to rotate.
From this page:
To refresh the backdrop with a new random image from the list just run the xfdesktop command again, e.g. from a terminal or the run dialog, or [...]]]></description>
			<content:encoded><![CDATA[<p>First of all check <a href="http://www.loculus.nl/xfce/documentation/docs-4.2/xfdesktop.html#xfdesktop-background">Xfce 4 Desktop Manager help</a>. Click on the <strong>New list&#8230;</strong> button and create a list with all the backgrounds you want to rotate.</p>
<p>From this page:</p>
<blockquote><p>To refresh the backdrop with a new random image from the list just run the <strong>xfdesktop</strong> command again, e.g. from a terminal or the run dialog, or <strong>xfdesktop</strong> [-reload].</p></blockquote>
<p>What we have to do now is to create a shell script that runs <code>xfdesktop -reload</code> and to add a cron job to run it.<br />
<span id="more-8"></span><br />
Let&#8217;s begin with the script, here is the <a href="/nothing/files/2008/06/xfdesktop-reload.sh">code</a>:</p>
<div class="hl-surround" ><div class="hl-main"><pre>#!/bin/bash

#check if we are under xfce
for foo in  `ps aux | grep xfdesktop | grep -v grep | awk '{print $11}'`;
do
  if [ $foo == &quot;xfdesktop&quot; ];
  then
    #reload xfdesktop
    export DISPLAY=:0
    xfdesktop -reload
  fi;
done;</pre></div></div>
<p>Now we need to add a line in the crontab, run the script every 25 minutes:<br />
<code>*/25    *       *       *       *       /home/etd/scripts/xfdesktop-reload.sh</code></p>
<p>NOTE: If someone finds an easier way to check whether the user is running Xfce or not, please let me know.</p>
<img src="http://usefulfor.com/nothing/?ak_action=api_record_view&id=8&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://usefulfor.com/nothing/2005/09/19/xfce-desktop-background-auto-change/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
