<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Harsh but fair</title>
	<atom:link href="http://raetsel.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://raetsel.wordpress.com</link>
	<description>Open source chicanery and the battle with my inner geek</description>
	<lastBuildDate>Sat, 21 Jan 2012 14:53:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='raetsel.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Harsh but fair</title>
		<link>http://raetsel.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://raetsel.wordpress.com/osd.xml" title="Harsh but fair" />
	<atom:link rel='hub' href='http://raetsel.wordpress.com/?pushpress=hub'/>
		<item>
		<title>2010 in review</title>
		<link>http://raetsel.wordpress.com/2011/01/02/2010-in-review/</link>
		<comments>http://raetsel.wordpress.com/2011/01/02/2010-in-review/#comments</comments>
		<pubDate>Sun, 02 Jan 2011 12:04:07 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Reviews]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=90</guid>
		<description><![CDATA[The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here&#8217;s a high level summary of its overall blog health: The Blog-Health-o-Meter™ reads Fresher than ever. Crunchy numbers About 3 million people visit the Taj Mahal every year. This blog was viewed about 29,000 times in 2010. If it were [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=90&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[
<p>The stats helper monkeys at WordPress.com mulled over how this blog did in 2010, and here&#8217;s a high level summary of its overall blog health:</p>
<p align="center"><img style="border:1px solid #ddd;background:#f5f5f5;padding:20px;" src="http://s0.wp.com/i/annual-recap/meter-healthy3.gif" width="250" height="183" alt="Healthy blog!"></p>
<p align="center">The <em>Blog-Health-o-Meter™</em> reads Fresher than ever.</p>
<h2>Crunchy numbers</h2>
<p>			<a href="http://raetsel.files.wordpress.com/2007/08/telnet.jpeg"><img src="http://raetsel.files.wordpress.com/2007/08/telnet.jpeg?w=288" alt="Featured image" style="max-height:230px;float:right;border:1px solid #ddd;background:#fff;margin:0 0 1em 1em;padding:6px;" /></a></p>
<p>About 3 million people visit the Taj Mahal every year.  This blog was viewed about <strong>29,000</strong> times in 2010.  If it were the Taj Mahal, it would take about 4 days for that many people to see it.</p>
<p>
<p>In 2010, there were <strong>2</strong> new posts, growing the total archive of this blog to 61 posts.</p>
<p>The busiest day of the year was March 9th with <strong>150</strong> views. The most popular post that day was <a style="color:#08c;" href="http://raetsel.wordpress.com/2008/02/15/snmpd-filling-up-varlogmessages/">Snmpd filling up /var/log/messages</a>.</p>
<p></p>
<h2>Where did they come from?</h2>
<p>The top referring sites in 2010 were <strong>experts-exchange.com</strong>, <strong>google.com</strong>, <strong>ifreestores.com</strong>, <strong>linuxquestions.org</strong>, and <strong>forosdelweb.com</strong>.</p>
<p>Some visitors came searching, mostly for <strong>cisco anyconnect mac</strong>, <strong>rsync exclude file</strong>, <strong>snmpd logging</strong>, <strong>telnet escape</strong>, and <strong>kde dbus-send save session</strong>.</p>
<div style="clear:both;"></div>
<h2>Attractions in 2010</h2>
<p>These are the posts and pages that got the most views in 2010.</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">1</div>
<p>					<a style="margin-right:10px;" href="http://raetsel.wordpress.com/2008/02/15/snmpd-filling-up-varlogmessages/">Snmpd filling up /var/log/messages</a> <span style="color:#999;font-size:8pt;">February 2008</span><br />27 comments											</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">2</div>
<p>					<a style="margin-right:10px;" href="http://raetsel.wordpress.com/2009/08/29/mac-os-x-snow-leopard-cisco-anytime-vpn/">Mac OS X Snow Leopard &amp; Cisco AnyConnect VPN</a> <span style="color:#999;font-size:8pt;">August 2009</span><br />16 comments											</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">3</div>
<p>					<a style="margin-right:10px;" href="http://raetsel.wordpress.com/2008/04/25/kde4-save-current-session-dbus-to-the-rescue/">KDE4 Save Current Session &#8211; DBUS to the Rescue</a> <span style="color:#999;font-size:8pt;">April 2008</span><br />11 comments											</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">4</div>
<p>					<a style="margin-right:10px;" href="http://raetsel.wordpress.com/2007/08/12/escape-from-telnet/">Escape from Telnet</a> <span style="color:#999;font-size:8pt;">August 2007</span><br />2 comments											</p>
<div style="clear:left;float:left;font-size:24pt;line-height:1em;margin:-5px 10px 20px 0;">5</div>
<p>					<a style="margin-right:10px;" href="http://raetsel.wordpress.com/2008/05/15/using-exclude-files-in-rsync-watch-those-spaces/">Using Exclude Files in rsync &#8211; watch those spaces!</a> <span style="color:#999;font-size:8pt;">May 2008</span><br />3 comments											</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/90/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/90/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/90/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=90&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2011/01/02/2010-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>

		<media:content url="http://s0.wp.com/i/annual-recap/meter-healthy3.gif" medium="image">
			<media:title type="html">Healthy blog!</media:title>
		</media:content>

		<media:content url="http://raetsel.files.wordpress.com/2007/08/telnet.jpeg?w=288" medium="image">
			<media:title type="html">Featured image</media:title>
		</media:content>
	</item>
		<item>
		<title>Embedded codes in the echo command \c etc</title>
		<link>http://raetsel.wordpress.com/2010/07/26/embedded-codes-in-echo-command/</link>
		<comments>http://raetsel.wordpress.com/2010/07/26/embedded-codes-in-echo-command/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 13:32:00 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=83</guid>
		<description><![CDATA[Following on from a post a long time ago about migrating from HP-UX to RHEL I have found another "gotcha" in relation to the use of the echo command.
<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=83&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following on from <a href="http://raetsel.wordpress.com/2007/10/30/be-careful-what-you-wish-for-it-may-come-true/">a post a long time ago</a> about migrating from HP-UX to RHEL I have found another &#8220;gotcha&#8221; in relation to the use of the echo command.</p>
<p>In HP-UX you can use terminal codes like \c for continue on same line and \n for new line etc.</p>
<p>In RHEL by default these codes are not interpreted. To get them to be interpreted you need to use &#8220;echo -e&#8221;</p>
<p>Here is a before and after</p>
<div id="_mcePaste">echo &#8220;Here is\t some\b \n\nembedded code&#8221;</div>
<div id="_mcePaste"><em>Here is\t some\b \n\nembedded code</em></div>
<div>echo -e &#8220;Here is\t some\b \n\nembedded code&#8221;</div>
<div id="_mcePaste"><em>Here is  som</em></div>
<div id="_mcePaste"><em>embedded code</em></div>
<div>If you are only use \c codes you could consider removing them and just using echo -n to suppress the new line but I think echo -e is more flexible</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=83&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2010/07/26/embedded-codes-in-echo-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>
	</item>
		<item>
		<title>Script Naming for run-parts for /etc/cron.daily</title>
		<link>http://raetsel.wordpress.com/2010/01/19/script-naming-for-run-parts-for-etccron-daily/</link>
		<comments>http://raetsel.wordpress.com/2010/01/19/script-naming-for-run-parts-for-etccron-daily/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 09:00:50 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=79</guid>
		<description><![CDATA[I recently added in a new script to the directory /etc/cron.daily so it would be run once a day along with the other scripts in there but for some reason it wasn&#8217;t being run. After much messing about I discovered it was the because the name of the script had a . in it. Specifically [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=79&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently added in a new script to the directory /etc/cron.daily so it would be run once a day along with the other scripts in there but for some reason it wasn&#8217;t being run. After much messing about I discovered it was the because the name of the script had a . in it.</p>
<p>Specifically the script was called get_xferlog.sh as is common with shell scripts. I changed this to be just get_xferlog and that is now working ok.</p>
<p>The files in /etc/cron.daily are executed as part of an entry in /etc/crontab:-</p>
<p>25 6    * * *   root    test -x /usr/sbin/anacron || ( cd / &amp;&amp; run-parts -v /etc/cron.daily )</p>
<p>So it uses the default settings of run-parts to execute all scripts in the directory /etc/cron.daily and the man page for run-parts says.</p>
<blockquote><p>If neither the &#8211;lsbsysinit option nor the &#8211;regex option is given then the names must consist entirely of upper and lower case  letters,  digits, underscores, and hyphens.</p></blockquote>
<p>If you want to check what run parts will do you can use the &#8211;test flag which just lists the scripts that will be executed without actually executing them. Thus</p>
<p>run-parts -v &#8211;test /etc/cron.daily</p>
<p>This proved very handy in debugging the issue I was having without having to wait a day between tests for the cron job to run.</p>
<p>I should add that the above applies to Ubuntu based servers,  Red Hat servers using run-parts don&#8217;t seem to care about a dot in the filename</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/79/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/79/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/79/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=79&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2010/01/19/script-naming-for-run-parts-for-etccron-daily/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>
	</item>
		<item>
		<title>Mac OS X Snow Leopard &amp; Cisco AnyConnect VPN</title>
		<link>http://raetsel.wordpress.com/2009/08/29/mac-os-x-snow-leopard-cisco-anytime-vpn/</link>
		<comments>http://raetsel.wordpress.com/2009/08/29/mac-os-x-snow-leopard-cisco-anytime-vpn/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 14:26:29 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Max OS/X]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Cisco]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=74</guid>
		<description><![CDATA[I&#8217;ve just upgraded to Mac OS X version 10.6 Snow Leopard. The results are impressive with increases in speed and reduction in memory usage. However to connect to work I use Cisco AnyConnect VPN and that wouldn&#8217;t run, it just instantly quit. I uninstalled it using the uninstaller in the Application folder and  then connected [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=74&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just upgraded to Mac OS X version 10.6 Snow Leopard. The results are impressive with increases in speed and reduction in memory usage.</p>
<p>However to connect to work I use Cisco AnyConnect VPN and that wouldn&#8217;t run, it just instantly quit.</p>
<p>I uninstalled it using the uninstaller in the Application folder and  then connected to our web portal at work via Safari and downloaded the AnyConnect installer. This installed fine and I can now run the local application like I used to.</p>
<p>The version of AnyConnect we run on is 2.3.0185</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=74&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2009/08/29/mac-os-x-snow-leopard-cisco-anytime-vpn/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>
	</item>
		<item>
		<title>Some Logic</title>
		<link>http://raetsel.wordpress.com/2009/05/01/some-logic/</link>
		<comments>http://raetsel.wordpress.com/2009/05/01/some-logic/#comments</comments>
		<pubDate>Fri, 01 May 2009 13:32:10 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=67</guid>
		<description><![CDATA[Recently on #logic via twitter Pete Lewis asked:- a &#124;&#124; b -&#62; !(!a &#124;&#124; !b)) ? #logic makes my brain hurt I  did a quick truth table on paper and said yes but turns out I was wrong as I had  looked at the wrong columns. Doh! Here&#8217;s the truth table and you can see [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=67&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently on #logic via twitter Pete Lewis asked:-</p>
<p>a || b -&gt; !(!a || !b)) ? #logic makes my brain hurt</p>
<p>I  did a quick truth table on paper and said yes but turns out I was wrong as I had  looked at the wrong columns. Doh! Here&#8217;s the truth table and you can see for yourself</p>
<p> </p>
<table border="0" cellspacing="0" rules="NONE">
<col width="79"></col>
<col width="79"></col>
<col width="79"></col>
<col width="79"></col>
<col width="79"></col>
<col width="79"></col>
<col width="79"></col>
<tbody>
<tr>
<td width="79" height="15" align="CENTER">A</td>
<td width="79" align="CENTER">B</td>
<td width="79" align="CENTER">A || B</td>
<td width="79" align="CENTER">!A</td>
<td width="79" align="CENTER">!B</td>
<td width="79" align="CENTER">(!A || !B)</td>
<td width="79" align="CENTER">!(!A || !B)</td>
</tr>
<tr>
<td height="15" align="CENTER">FALSE</td>
<td align="CENTER">FALSE</td>
<td align="CENTER">FALSE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">FALSE</td>
</tr>
<tr>
<td height="15" align="CENTER">FALSE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">FALSE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">FALSE</td>
</tr>
<tr>
<td height="15" align="CENTER">TRUE</td>
<td align="CENTER">FALSE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">FALSE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">FALSE</td>
</tr>
<tr>
<td height="15" align="CENTER">TRUE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">TRUE</td>
<td align="CENTER">FALSE</td>
<td align="CENTER">FALSE</td>
<td align="CENTER">FALSE</td>
<td align="CENTER">TRUE</td>
</tr>
</tbody>
</table>
<p>The colums A || B and !(!A || !B) are not equivalent.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/67/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/67/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/67/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=67&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2009/05/01/some-logic/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>
	</item>
		<item>
		<title>Using Exclude Files in rsync &#8211; watch those spaces!</title>
		<link>http://raetsel.wordpress.com/2008/05/15/using-exclude-files-in-rsync-watch-those-spaces/</link>
		<comments>http://raetsel.wordpress.com/2008/05/15/using-exclude-files-in-rsync-watch-those-spaces/#comments</comments>
		<pubDate>Thu, 15 May 2008 09:02:34 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=64</guid>
		<description><![CDATA[Summary When using filter or exclude files ensure each entry has no spaces at the end of it or it will not match correctly e.g. - Music/ - downloads/ and not - Music/[space] - downloads/[space] Use two -v options on the command line to get output about what was skipped or included and why. Use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=64&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Summary</strong></p>
<p>When using filter or exclude files ensure each entry has no spaces at the end of it or it will not match correctly e.g.</p>
<p><code>- Music/<br />
- downloads/</code></p>
<p>and not</p>
<p><code>- Music/[space]<br />
- downloads/[space]</code></p>
<p>Use two -v options on the command line to get output about what was skipped or included and why.</p>
<p>Use the -n option to simulate what rsync will do without actually copying any files.</p>
<p><strong>Detail</strong></p>
<p>I&#8217;ve recently started using <a href="http://samba.anu.edu.au/rsync/documentation.html">rsync</a> to copy files to an online backup server (<a href="http://rsync.net">rsync.net</a> &#8211; the name is co-incidental).</p>
<p>Initially I started by using exclude options on the command line for the big directories that I didn&#8217;t want uploaded, things like my Music files etc. The command line ended up something like:-</p>
<p><code>rsync -n -v  -a -z --exclude=Music/ --exclude=downloads/ --exclude=".*" --exclude=macky/ --exclude=XBMC/ -r /home/simon/ blah@rsync.net:blahblah</code></p>
<p>I decided it would make more sense to use an exclude file or filter file rather than an ever expanding command line so the I changed the command to be</p>
<p><code>rsync  -v  -a -z --filter='merge /home/simon/rsync_exclude'  /home/simon/ blah@rsync.net:blahblah</code></p>
<p>I then created the file <code>/home/simon/rsync_exclude</code> by cutting and pasting from the old command line and editing the file to put one entry per line with the &#8211; sign in front to indicate it should not be included:-</p>
<p><code>- downloads/<br />
- Music/<br />
- macky/<br />
- XBMC/<br />
- ktorrent/<br />
- /.*</code></p>
<p>However when I ran the rsync command with the filter file it started to copy up all my Music etc. after much fiddling and use of the very helpful -n option to just simulate what happening and -v -v to show what was being selected I discovered the problem.</p>
<p>In spliting the lines in my exclude file I had left a space at the end of each line and rsync was doing a literal match and so looking for  something that matched &#8220;Music/[space]&#8221; and not finding anything.</p>
<p>So make sure any filter or exclude files don&#8217;t have any spaces at the end of the line.</p>
<p>The -n option for rsync is very useful it just simulates what rsync would do if you ran it for real. Also if you run rsync with -v -v  ( yes two -v options ) you get detailed output about what is skipped etc.</p>
<p><code>rsync -n -v -v blah blah<br />
building file list ...<br />
[sender] hiding directory .Skype because of pattern /.*<br />
[sender] hiding directory .kchmviewer because of pattern /.*<br />
[sender] hiding directory .gnupg because of pattern /.*<br />
[sender] hiding file .gtk-bookmarks because of pattern /.*<br />
[sender] hiding file .profile because of pattern /.*<br />
[sender] hiding file .dmrc because of pattern /.*<br />
.......<br />
</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/raetsel.wordpress.com/64/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/raetsel.wordpress.com/64/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=64&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2008/05/15/using-exclude-files-in-rsync-watch-those-spaces/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>
	</item>
		<item>
		<title>Kubuntu Hardy Heron Upgrade</title>
		<link>http://raetsel.wordpress.com/2008/04/28/kubuntu-hardy-heron-upgrade/</link>
		<comments>http://raetsel.wordpress.com/2008/04/28/kubuntu-hardy-heron-upgrade/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 16:11:17 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[kde4]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=62</guid>
		<description><![CDATA[My experiences with upgrading to Kubuntu KDE4 Hardy Heron<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=62&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>On Friday afternoon I upgraded my desktop PC to the KDE4 version <a href="http://kubuntu.com" target="_blank">Kubuntu Hardy Heron</a> from the KDE 3.5 version of Gutsy Gibbon</p>
<p>Overall I have to say the process was very smooth and by far the most trouble free upgrade I have done. There were one or two funnies and these are outlined below.</p>
<p>Note: I decided to upgrade by downloading the alternate CD images and doing a <a href="https://help.ubuntu.com/community/HardyUpgrades/Kubuntu" target="_blank">cdromupgrade</a> rather than doing an upgrade over the &#8216;net. I did this as I thought the Kubuntu sites might be a bit busy still, it being only one day after Hardy was released.</p>
<p>Overall the process took just 40 minutes including one false start.</p>
<p><strong>Allow upgrades from the network hung</strong></p>
<p>One of the options at the start of the CD ROM upgrade is to allow the system to connect to the &#8216;net to get the latest downloads. I decided to allow this figuring there wouldn&#8217;t be many updates to get. However maybe it was because the site was busy but the upgrade just seemed to hang. So after 10 minutes I cancelled and restarted it and chose not to get the upgrades from the net.</p>
<p>This restart initially hung with an error saying it could not get the lock file:</p>
<blockquote><p>/var/lib/apt/lists/lock</p></blockquote>
<p>This was because the aborted upgrade had left the lock file behind. I deleted this file with</p>
<blockquote><p>sudo rm /var/lib/apt/lists/lock</p></blockquote>
<p>The upgrade process then started itself automatically without me having to go back out.</p>
<p><strong>Remove the CD before rebooting</strong></p>
<p>At the end of the upgrade the systems says it is going to reboot once you press OK. However I didn&#8217;t notice any warning to remove the CD before doing this. As my system is set to boot from CD ROM first the result was my system started the live CD on reboot and asked me to select a language.</p>
<p>I ejected the CD and rebooted my machine and all was fine.</p>
<p><strong>KDE4 Not Installed when upgrading from KDE 3.5</strong></p>
<p>After the upgrade was complete and the login screen came up I checked the available sessions and only KDE was listed. There was no option for KDE4 so I thought maybe it will automatically login to KDE4 and there is no KDE3.5 option.</p>
<p>However when I logged in all I saw was the KDE 3.5.9 desktop ( upgraded from 3.5.8 ).</p>
<p>Thinking about this, it kind of makes sense. Although I was using the KDE4 CD the system is an upgrade and since I&#8217;ve never had KDE4 on this machine before it just upgraded what was there.</p>
<p>I was able to easily solve the problem by using adept to install the package kubuntu-kde4-desktop, from the command line the same can be achieved with.</p>
<blockquote><p>sudo apt-get install kubuntu-kde4-desktop</p></blockquote>
<p>The upgrade took about 10 minutes and interestingly used the alternate CD ( which I had re-instered after the reboot ). I was fully expecting to to start pulling down the package from the &#8216;net but it didn&#8217;t.</p>
<p>This just leaves me with the lingering doubt that I&#8217;m not going to get updates for KDE4 over the &#8216;net. I need to check my sources.list to see if there is anything else I should be adding in there to get the KDE4 updates.</p>
<p>The installation of kubuntu-kde4-desktop asked me what login manager I wanted to use, KDM or KDE4-KDM. I chose the KDE4-KDM version.</p>
<p>Once the kubuntu-kde4-desktop package was installed I logged out and back in again and under the options for sessions I had KDE and KDE4.</p>
<p>Choosing KDE4 did exactly what it says on the tin.</p>
<p><strong>No Sound</strong></p>
<p>In both KDE 3.5.9 and KDE4 initially I had no sound at all. After a couple of dead ends with installing the pulse audio server the problem turned out to be the channel to my speakers was muted in <a href="http://docs.kde.org/kde3/en/kdemultimedia/kmix/index.html" target="_blank">kmix</a>.</p>
<p>I had to choose Kmix from the Multimedia menu and then click on the speaker icon that appeared in the status bar and choose &#8220;mixer&#8221; to bring up the full mixer panel. For some reason there were two &#8220;Front&#8221; channels showing and one of them was muted. Un-muting this gave me my sound back. (Click the pic below to <a href="http://www.urbandictionary.com/define.php?term=Embiggen" target="_blank">embiggen</a>)</p>
<p><a href="http://raetsel.files.wordpress.com/2008/04/kubuntugrade5.png"><img class="aligncenter size-medium wp-image-63" src="http://raetsel.files.wordpress.com/2008/04/kubuntugrade5.png?w=300&#038;h=176" alt="The second Front channel was initially muted" width="300" height="176" /></a></p>
<p><strong>No Sound in Firefox for Realplayer plugin</strong></p>
<p>Although sound was now working in KDE4 in general in <a href="http://http://developer.mozilla.org/en/docs/Main_Page" target="_blank">Firefox</a> the <a href="http://www.bbc.co.uk/radio/aod/" target="_self">BBC Radio Player</a> was going through the motions of playing but not producing any sound using <a href="http://realplayer.com" target="_blank">Realplayer</a>. This turned out to be the fact that the plugins directory had changed for firefox3 and I had to copy in the relevant plugins from /usr/lib/mozilla/plugins to /usr/lib/firefox-3.0b5/plugins</p>
<blockquote><p>sudo cp /usr/lib/mozilla/plugins/nphelix* /usr/lib/firefox-3.0b5/plugins</p></blockquote>
<p><strong>NB: </strong>This is a bit of a sloppy way of doing this I should really use softlinks to the orginal plugin files rather than making a copy. Also it should be possible to set this up in your home directory .mozilla directory rather than the global /usr/lib</p>
<p><strong>Virtual Box </strong></p>
<p>I use <a href="http://www.virtualbox.org/" target="_self">VirtualBox</a> to run an XP virtual machine for connecting to the VPN and work. When I fired this up after the upgrade I got an error message about the VirtualBox kernel drivers not being loaded. The new version of the main Linux kernel was the reason.</p>
<p>Cleverly the error message told you exactly what to do, run &#8220;/etc/init.d/vbdrv setup&#8221; as root so for Kubuntu this just meant:-</p>
<blockquote><p>sudo /etc/init.d/vbdrv setup</p></blockquote>
<p>I really like VirtualBox and much prefer it to VMWare server. The way it handled this error message just confirms it&#8217;s the best choice for me for running a VM.</p>
<p><strong>Hotkeys not loaded by KDE Autostart</strong></p>
<p>The hotkeys application I use to set up <a href="http://raetsel.wordpress.com/2008/04/12/internet-hotkeys/" target="_self">my multimedia keys</a> was not loaded when I logged in to KDE4. This was because the Autostart directory for KDE4 is in a different place to KDE3.5</p>
<p>In KDE3.5 is it ~/.Kde/Autostart but for KDE4 it is ~/.kde4/Autostart</p>
<p>So all I had to do was recreate my soft links:</p>
<blockquote><p>cd ~/.kde4/Autostart</p>
<p>ln -s /usr/bin/hotkeys  hotkeys</p></blockquote>
<p>I am not sure if .kde4 is the official directory for KDE4 files or if this has been set up by Kubuntu because they are allowing you to run both KDE3.5 and KDE4</p>
<p><strong>Skype Not Working</strong></p>
<p>This is the only issue I have yet to resolve. After the upgrade <a href="http://skype.com" target="_blank">Skype</a> was completely uninstalled. I tried installing it from apt-get but this gave an error saying there was no valid install candidate.</p>
<p>I still had the .deb package I had downloaded from the Skype website so I just re-installed this using dpkg -i</p>
<p>This gave me Skype back on the menu and it ran ok but whenever I try to make a call it just fails.</p>
<p>I suspect this might be something to do with the sound system and the fact in fixing my lack of volume I installed the <a href="http://www.pulseaudio.org/wiki/AboutPulseAudio">pulse audio server</a>.</p>
<p>I will try un-installing pulse audio and see if it makes any difference. Though I would like to use pulse audio to see what it is like and what all the fuss is about.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/raetsel.wordpress.com/62/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/raetsel.wordpress.com/62/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/62/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/62/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/62/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=62&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2008/04/28/kubuntu-hardy-heron-upgrade/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>

		<media:content url="http://raetsel.files.wordpress.com/2008/04/kubuntugrade5.png?w=300" medium="image">
			<media:title type="html">The second Front channel was initially muted</media:title>
		</media:content>
	</item>
		<item>
		<title>KDE4 Save Current Session &#8211; DBUS to the Rescue</title>
		<link>http://raetsel.wordpress.com/2008/04/25/kde4-save-current-session-dbus-to-the-rescue/</link>
		<comments>http://raetsel.wordpress.com/2008/04/25/kde4-save-current-session-dbus-to-the-rescue/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 21:08:15 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Kubuntu]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[dbus]]></category>
		<category><![CDATA[hardy]]></category>
		<category><![CDATA[kde4]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=61</guid>
		<description><![CDATA[How to manually save a session in KDE 4 using the dbus-send command. A useful workaround until there is a proper Save Session button in KDE4. I used kdbus and qdbusviewer to work out what I needed to send.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=61&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Executive Summary</strong></p>
<p>To cut to the chase, if you want to save your current sessions in <a href="http://www.kde.org/announcements/4.0/" target="_blank">KDE4</a> run the following command from a command line ( or put it in a script that you can call from a desktop shortcut ):</p>
<blockquote><p><code>dbus-send --dest=org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession</code></p></blockquote>
<p><strong>The Details</strong></p>
<p>Now for how I got here in the first place:</p>
<p>I&#8217;ve just upgraded to <a href="http://kubuntu.com">Kubuntu Hardy Heron</a> and decided to give KDE4 a go. I&#8217;ll be posting about the upgrade process and KDE4 in general over the coming days but one thing that has kept me &#8220;amused&#8221; today is the lack of a &#8220;Save Current Session&#8221; button in KDE4</p>
<p>Rather than have the desktop returned to how it was when I last logged out ( &#8220;Restore Previous Session&#8221; under KControl ) I like to return to a standard set of applications so I use the &#8220;Restore Manually Saved Session&#8221; option under KDE 3.5.</p>
<p>In KDE4 KControl there are the same options for the session manager. The snag is that there is no button anywhere to actually save the session when you want to. Thus choosing this option effectively logs you back in to a blank session. This has been reported as a <a href="http://bugs.kde.org/show_bug.cgi?id=155516">bug in KDE</a> but does not seem to be making any progress.</p>
<p>Flushed with my <a href="http://raetsel.wordpress.com/2008/04/25/internet-hotkeys-amarok-dcop-playpause/">success with dcop recently </a>I was hoping I could use it with the ksmserver object ( the session manager ) but in KDE4 dcop is not used and the <a href="http://www.freedesktop.org/wiki/Software/dbus">dbus interface</a> is used instead which is a bit more complicated to use.</p>
<p>There is a tool you can install called <a href="http://dkukawka.blogspot.com/2008/01/fixed-kdbus.html">kdbus</a> that does a similar job to kdcop but I found a much better tool called<a href="http://techbase.kde.org/index.php?title=Development/Tutorials/D-Bus/Introduction#Namespaces_and_Addresses"> qdbusviewer along with a useful overview of KDE and dbus</a> here.</p>
<p>To use qdbusviewer you need to install the package qt4-dev-tools then run qdbusviewer from a command line:-</p>
<blockquote><p>sudo apt-get install qt4-dev-tools</p>
<p>qdbusviewer</p></blockquote>
<p>You can use qdbusviewer to browser what objects are available and execute methods on them just like kdcop and kdbus ( but kdbus is rather slower )</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/raetsel.wordpress.com/61/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/raetsel.wordpress.com/61/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=61&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2008/04/25/kde4-save-current-session-dbus-to-the-rescue/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>
	</item>
		<item>
		<title>Internet Hotkeys &#8211; Amarok dcop play/pause</title>
		<link>http://raetsel.wordpress.com/2008/04/25/internet-hotkeys-amarok-dcop-playpause/</link>
		<comments>http://raetsel.wordpress.com/2008/04/25/internet-hotkeys-amarok-dcop-playpause/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 20:36:46 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[amarok]]></category>
		<category><![CDATA[dcop]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=60</guid>
		<description><![CDATA[Well the solution to getting my Play/Pause button to actually work as a play/pause toggle was pretty easy. Amarok supports a playPause() method that is registered to the dcop server so in my hotkeys.conf file the command for the Play button became dcop amarok player playPause dcop is the command line based client to talk [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=60&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well the solution to getting my Play/Pause button to actually work as a play/pause toggle was pretty easy.</p>
<p>Amarok supports a playPause() method that is registered to the <a href="http://developer.kde.org/documentation/other/dcop.html">dcop</a> server so in my hotkeys.conf file the command for the Play button became</p>
<blockquote><p>dcop amarok player playPause</p></blockquote>
<p>dcop is the command line based client to talk to the dcop server, amarok is of course the application I want to talk to.</p>
<p>player is the section of the <a href="http://amarok.kde.org/">amarok</a> services and playPause is the function/method I want to call.</p>
<p>To find this out I used <a href="http://wiki.kde.org/tiki-index.php?page=Tips%20and%20Tricks&amp;pagenum=8">kdcop</a> the graphical interface and explored what it offered under the amarok application.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/raetsel.wordpress.com/60/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/raetsel.wordpress.com/60/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=60&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2008/04/25/internet-hotkeys-amarok-dcop-playpause/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>
	</item>
		<item>
		<title>Internet Hotkeys</title>
		<link>http://raetsel.wordpress.com/2008/04/12/internet-hotkeys/</link>
		<comments>http://raetsel.wordpress.com/2008/04/12/internet-hotkeys/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 11:33:06 +0000</pubDate>
		<dc:creator>raetsel</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://raetsel.wordpress.com/?p=59</guid>
		<description><![CDATA[My keyboard is a Logitech Internet Pro and it has 7 keys at the top for special functions that I&#8217;ve never really made use of in Kubuntu, but now I&#8217;ve got them all functioning using the handy application &#8220;hotkeys&#8221;. Here&#8217;s what I did to get them working: First the actual keys are labelled Media ,Play/Pause,Mute,Vol [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=59&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>My keyboard is a  <a href="http://www.dooyoo.co.uk/keyboards/logitech-internet-pro-keyboard-black/">Logitech Internet Pro</a> and it has 7 keys at the top for special functions that I&#8217;ve never really made use of in <a href="http://kubuntu.com">Kubuntu,</a> but now I&#8217;ve got them all functioning using the handy application <a href="http://linux.com.hk/penguin/man/1/hotkeys.html">&#8220;hotkeys&#8221;.</a></p>
<p>Here&#8217;s what I did to get them working:</p>
<p>First the actual keys are labelled</p>
<p>Media ,Play/Pause,Mute,Vol +,Vol -,Favorites,Email,WWW</p>
<p>I tried to use KDE keyboard variants to get them working but this didn&#8217;t really work that well so I installed the application hotkeys:-</p>
<blockquote><p>sudo apt-get install hotkeys</p></blockquote>
<p>The hotkeys application intercepts keys and processes actions according to a couple of configuration files.</p>
<p>The first config file is the definition of the keycodes that are generated by your keyboard and what  hotkeys command name to map them to. There is one definition file for each type of keyboard that hotkeys supports. To see the list of supported keyboards run the command</p>
<blockquote><p>hotkeys -l</p></blockquote>
<p>This actually reads the contents of various .def files from the config directory ( /usr/share/hotkeys in Kubuntu)</p>
<p>The second config file defines what action or programs are run when the various keys are pressed. By default in Kubuntu this is installed as /etc/hotkeys.conf. The best way to customise this is to create a directory in your homedir called .hotkeys and copy /etc/hotkeys.conf into there.</p>
<blockquote><p>mkdir ~/.hotkeys</p>
<p>cp /etc/hotkeys.conf ~/.hotkeys/hotkeys.conf</p></blockquote>
<p>The hotkeys.conf file consists of simple key/value pairs and you can edit it to launch the applications you require. The setting for Kbd defines what keyboard definition file is loaded when you run hotkeys.</p>
<p>Here is the final version of my hotkeys.conf ( note that Kbd is set to logitech-internet-pro which is not a standard definition, it&#8217;s one I created myself. More of which anon.)</p>
<blockquote><p>############################################################<br />
# Global configuration for hotkeys                         #<br />
############################################################</p>
<p># These are the default values.<br />
# A line starting with # is a comment.</p>
<p>### Specify the default keyboard  (without the .def extension) so you<br />
### don&#8217;t need to specify -t every time</p>
<p>#using my own definition based on itouch<br />
Kbd=logitech-internet-pro</p>
<p>Play=amarok &#8211;pause</p>
<p>WebBrowser=firefox<br />
Email=firefox gmail.com<br />
Favorites=dolphin</p>
<p># osd_font=-arphic-ar pl kaitim big5-bold-i-normal&#8211;0-250-0-0-c-0-*-*<br />
### For the color, you can either use the strings in /etc/X11/rgb.txt,<br />
### or use the RGB syntax #RRGGBB, e.g. ##A086FF<br />
# osd_color=LawnGreen<br />
# osd_timeout=3<br />
### osd_position is either &#8216;top&#8217; or &#8216;bottom&#8217;<br />
# osd_position=bottom<br />
# osd_offset=25</p></blockquote>
<p>The syntax is pretty obvious, when the WebBrowser key is pressed the command firefox is executed. To test the config just run the command</p>
<blockquote><p>hotkeys</p></blockquote>
<p>You&#8217;ll see a splash screen appear briefly and the application is now running. Press a key and you see an on screen display in green telling you what is happening and the relevant action will be executed.</p>
<p>You&#8217;ll notice I haven&#8217;t mapped anything for mute, volume etc. these all work with the defaults.</p>
<p>To get hotkeys to always be loaded when I am running KDE I added a link to the hotkeys executable to the .kde/Autostart directory:-</p>
<blockquote><p>cd ~/.kde/Autostart</p>
<p>ln -s /usr/bin/hotkeys hotkeys</p></blockquote>
<p>The Play/Pause keys executes &#8220;amarok &#8211;pause&#8221; , unfortunately from the command line this is not a toggle thus I can press the &#8220;Play/Pause&#8221; key and it will pause amarok but a second press won&#8217;t restart it. The command for that is &#8220;amarok &#8211;play&#8221; so I have mapped this to my Media key at the moment.</p>
<p>The &#8220;Media&#8221; key is not a standard hotkeys command name but the keyboard definition files allow you define commands to executed directly in there. The &#8220;key&#8221; (pun intended) to the keyboard definition files are the keycodes your keyboard generates.</p>
<p>I started with the itouch.def file and found it worked for most of they keys. Using the excellent application <a href="http://www.xfree86.org/current/xev.1.html">&#8220;xev&#8221;</a> I was able to discover what keycodes my keyboard was generating and create my own variant called logitech-internet-pro.def the contents are reproduced below.  I shall have to see if there is anywhere appropriate I can upload the file to make it available for others.</p>
<blockquote><p>&lt;?xml version=&#8221;1.0&#8243;?&gt;</p>
<p>&lt;definition&gt;</p>
<p>&lt;config model=&#8221;Logitech Internet Pro&#8221;&gt;</p>
<p>&lt;Play         keycode=&#8221;162&#8243;/&gt;</p>
<p>&lt;VolUp        keycode=&#8221;176&#8243; adj=&#8221;2&#8243;/&gt;<br />
&lt;VolDown      keycode=&#8221;174&#8243; adj=&#8221;2&#8243;/&gt;<br />
&lt;Mute         keycode=&#8221;160&#8243;/&gt;</p>
<p>&lt;WebBrowser   keycode=&#8221;178&#8243;/&gt;<br />
&lt;Email        keycode=&#8221;236&#8243;/&gt;<br />
&lt;Favorites    keycode=&#8221;230&#8243;/&gt;</p>
<p>&lt;!&#8211; Feel free to customize this &#8211; the media key &#8211;&gt;</p>
<p>&lt;userdef keycode=&#8221;237&#8243; command=&#8221;amarok -p&#8221;&gt;Amarok&lt;/userdef&gt;</p>
<p>&lt;/config&gt;</p>
<p>&lt;contributor&gt;<br />
&lt;name&gt;Simon Stanford&lt;/name&gt;<br />
&lt;email&gt;sjs atraetsel dot co dot uk&lt;/email&gt;<br />
&lt;/contributor&gt;</p></blockquote>
<p>My next task is to see if I can get the Play/Pause button to actually act as a toggle and for this I think I am going to need to use <a href="http://developer.kde.org/documentation/other/dcop.html">dcop</a> to interrogate the state of <a href="http://amarok.kde.org/">amarok</a> and/or pass it the appropriate command.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/raetsel.wordpress.com/59/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/raetsel.wordpress.com/59/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/raetsel.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/raetsel.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/raetsel.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/raetsel.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/raetsel.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/raetsel.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/raetsel.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/raetsel.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/raetsel.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/raetsel.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/raetsel.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/raetsel.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/raetsel.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/raetsel.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=raetsel.wordpress.com&amp;blog=319087&amp;post=59&amp;subd=raetsel&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://raetsel.wordpress.com/2008/04/12/internet-hotkeys/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/764ac249edd4255229fb98593477db68?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">raetsel</media:title>
		</media:content>
	</item>
	</channel>
</rss>
