<?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>Christoffer Kjølbæk &#187; Howto</title>
	<atom:link href="http://ostehamster.dk/blog/index.php/tag/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://ostehamster.dk/blog</link>
	<description>I have a blog, therefore I am…</description>
	<lastBuildDate>Tue, 03 Jan 2012 22:37:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Danske tegn i WordPress permalinks</title>
		<link>http://ostehamster.dk/blog/index.php/2011/07/11/danske-tegn-i-wordpress-permalinks/</link>
		<comments>http://ostehamster.dk/blog/index.php/2011/07/11/danske-tegn-i-wordpress-permalinks/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 19:52:12 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=1014</guid>
		<description><![CDATA[Update 9-10-11: Nedenstående kan også fixe "problemet" i 3.2.1. Efter opgradering af WordPress fra version 2.9.? til 3.2.0, har mine permalinks ikke fungeret hvis de indeholdte danske tegn. F.eks. fik man bare en besked om at siden ikke var fundet hvis man gik ind på http://ostehamster.dk/blog/index.php/2011/04/10/løgsuppe-med-ostebrød/. I tidligere versioner af WordPress blev det modtagne request [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update 9-10-11:</strong> Nedenstående kan også fixe "problemet" i 3.2.1.</p>
<p>Efter opgradering af WordPress fra version 2.9.? til 3.2.0, har mine permalinks ikke fungeret hvis de indeholdte danske tegn. F.eks. fik man bare en besked om at siden ikke var fundet hvis man gik ind på <a href="http://ostehamster.dk/blog/index.php/2011/04/10/løgsuppe-med-ostebrød/">http://ostehamster.dk/blog/index.php/2011/04/10/løgsuppe-med-ostebrød/</a>.</p>
<p>I tidligere versioner af WordPress blev det modtagne request kørt igennem <a href="http://dk.php.net/rawurldecode">rawurldecode</a> i parse_request() i wp-includes/classes.php, hvilket er forsvundet i parse_request() i den nye wp-includes/class-wp.php, og derfor findes siden ikke.</p>
<p>Det er nemt at rettet, idet man bare skal indsætte</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$req_uri</span> <span style="color: #339933;">=</span> <span style="color: #990000;">rawurldecode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$req_uri</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>efter</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$req_uri</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$_SERVER</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'REQUEST_URI'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></div></div>

<p>i parse_request() i wp-includes/class-wp.php</p>
<p>Eller bruge denne <a href="http://ostehamster.dk/blog/danish_permalinks.patch">patch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2011/07/11/danske-tegn-i-wordpress-permalinks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Firefox 4 in Ubuntu 10.10</title>
		<link>http://ostehamster.dk/blog/index.php/2011/03/25/installing-firefox-4-in-ubuntu-10-10/</link>
		<comments>http://ostehamster.dk/blog/index.php/2011/03/25/installing-firefox-4-in-ubuntu-10-10/#comments</comments>
		<pubDate>Fri, 25 Mar 2011 21:08:28 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 10.10]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=997</guid>
		<description><![CDATA[Using the PPA repository "Mozilla - Ubuntu daily", it is easy to install Firefox 4 in Ubuntu 10.10. Set-up the repository sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa &#38;&#38; sudo apt-get update Install Firefox sudo apt-get install firefox-4.0 Thats it, launch it from Programs > Internet > Minefield 4.0 Web Browser]]></description>
			<content:encoded><![CDATA[<p>Using the PPA repository "Mozilla - Ubuntu daily", it is easy to install Firefox 4 in Ubuntu 10.10.</p>
<p>Set-up the repository</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">sudo add-apt-repository ppa:ubuntu-mozilla-daily/ppa &amp;&amp; sudo apt-get update</pre></div></div>

<p>Install Firefox</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">sudo apt-get install firefox-4.0</pre></div></div>

<p>Thats it, launch it from Programs > Internet > Minefield 4.0 Web Browser</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2011/03/25/installing-firefox-4-in-ubuntu-10-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash Smart Completion / Auto Completion</title>
		<link>http://ostehamster.dk/blog/index.php/2010/10/27/bash-smart-completion-auto-completion/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/10/27/bash-smart-completion-auto-completion/#comments</comments>
		<pubDate>Wed, 27 Oct 2010 20:01:57 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 10.10]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=985</guid>
		<description><![CDATA[After upgrading from Ubuntu 10.04 to 10.10, I lost the possibility to auto complete certain commands in bash. For instance, writing "apt-get in" pressing Tab would give "apt-get install". It turned out, that bash-completion was not installed, which is easily fixed sudo apt-get install bash-completion]]></description>
			<content:encoded><![CDATA[<p>After upgrading from Ubuntu 10.04 to 10.10, I lost the possibility to auto complete certain commands in bash. For instance, writing "apt-get in" pressing Tab would give "apt-get install". It turned out, that <em>bash-completion</em> was not installed, which is easily fixed</p>
<blockquote><p>sudo apt-get install bash-completion</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/10/27/bash-smart-completion-auto-completion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto resize a lot of images</title>
		<link>http://ostehamster.dk/blog/index.php/2010/10/07/howto-resize-a-lot-of-images/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/10/07/howto-resize-a-lot-of-images/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 20:36:16 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=972</guid>
		<description><![CDATA[If you have a lot of images and want them all resized, use mogrify from ImageMagick Say you want all images to be 1000 pixels wide, simply do mogrify -resize 1000 *.jpg If you want all images to be max 100x100 pixels, and keep the aspect ratio do mogrify -resize 100x100 *.jpg If you want [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a lot of images and want them all resized, use mogrify from ImageMagick</p>
<p>Say you want all images to be 1000 pixels wide, simply do</p>
<blockquote><p>mogrify -resize 1000 *.jpg</p></blockquote>
<p>If you want all images to be max 100x100 pixels, and keep the aspect ratio do</p>
<blockquote><p>mogrify -resize 100x100 *.jpg</p></blockquote>
<p>If you want to force the image to be 100x100 pixels do</p>
<blockquote><p>mogrify -resize 100x100! *.jpg</p></blockquote>
<p>Read more at <a href="http://www.imagemagick.org/script/mogrify.php">http://www.imagemagick.org/script/mogrify.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/10/07/howto-resize-a-lot-of-images/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using UUID for USB harddrives in fstab</title>
		<link>http://ostehamster.dk/blog/index.php/2010/08/14/using-uuid-for-usb-harddrives-in-fstab/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/08/14/using-uuid-for-usb-harddrives-in-fstab/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 12:47:24 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=965</guid>
		<description><![CDATA[If you use a number of USB hard drives attached to a server (or desktop), you will notice that they (can) come up with different device names after each reboot. Because of the different names, it is difficult to use the names in /etc/fstab. To avoid this problem, it is possible to use UUID instead, [...]]]></description>
			<content:encoded><![CDATA[<p>If you use a number of USB hard drives attached to a server (or desktop), you will notice that they (can) come up with different device names after each reboot. Because of the different names, it is difficult to use the names in /etc/fstab. To avoid this problem, it is possible to use UUID instead, which is an unique id number for each partition.</p>
<p>If you fstab line for the USB disk looks like</p>
<blockquote><p>/dev/sdc2	/nas/data	ext3    errors=remount-ro 0       1</p></blockquote>
<p>You should get the UUID of /dev/sdc2 by running</p>
<blockquote><p>blkid /dev/sdb2</p></blockquote>
<p>Which gives something like</p>
<blockquote><p>/dev/sdb2: LABEL="maxtor_b_data" UUID="b7a042b2-60c6-4116-8324-065a3d23520d" TYPE="ext3"</p></blockquote>
<p>Change the fstab line to</p>
<blockquote><p>UUID=b7a042b2-60c6-4116-8324-065a3d23520d	/nas/data	ext3    errors=remount-ro 0       1</p></blockquote>
<p>And you are ready to go :)</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/08/14/using-uuid-for-usb-harddrives-in-fstab/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP function to get current SVN ID</title>
		<link>http://ostehamster.dk/blog/index.php/2010/07/18/php-function-to-get-current-svn-id/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/07/18/php-function-to-get-current-svn-id/#comments</comments>
		<pubDate>Sun, 18 Jul 2010 12:16:40 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=960</guid>
		<description><![CDATA[Make a function like the below in you PHP file function get_rev&#40;&#41; &#123; return &#40;int&#41;substr&#40;substr&#40;'$Rev: 168 $', 6&#41;, 0, -2&#41;; &#125; And add the Revision keyword to the properties of the file svn propset svn:keywords Revision your_file.php "$Rev: 168 $" will then automatically be updated on every commit.]]></description>
			<content:encoded><![CDATA[<p>Make a function like the below in you PHP file</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> get_rev<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #009900;">&#40;</span>int<span style="color: #009900;">&#41;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'$Rev: 168 $'</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">6</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>And add the Revision keyword to the properties of the file</p>

<div class="wp_syntax"><div class="code"><pre class="pre" style="font-family:monospace;">svn propset svn:keywords Revision your_file.php</pre></div></div>

<p>"$Rev: 168 $" will then automatically be updated on every commit.</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/07/18/php-function-to-get-current-svn-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Evolution 2.30.1 for Ubuntu 10.04 64 bit</title>
		<link>http://ostehamster.dk/blog/index.php/2010/06/06/evolution-2-30-1-for-ubuntu-10-04-64-bit/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/06/06/evolution-2-30-1-for-ubuntu-10-04-64-bit/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 11:42:25 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 10.04]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=947</guid>
		<description><![CDATA[For some reason Ubuntu 10.04 is shipped with Evolution 2.28.3, which for me is quite unstable. Crashes with Segmentation Fault very often. However, Jacob Zimmermann has a PPA with Evolution 2.30.1: sudo add-apt-repository ppa:jacob/evo230 sudo apt-get update sudo apt-get dist-upgrade I hope this is more stable!]]></description>
			<content:encoded><![CDATA[<p>For some reason Ubuntu 10.04 is shipped with Evolution 2.28.3, which for me is quite unstable. Crashes with Segmentation Fault very often. However, <a href="https://launchpad.net/~jacob/+archive/evo230">Jacob Zimmermann has a PPA</a> with Evolution 2.30.1:</p>
<blockquote><p>sudo add-apt-repository ppa:jacob/evo230<br />
sudo apt-get update<br />
sudo apt-get dist-upgrade</p></blockquote>
<p>I hope this is more stable!</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/06/06/evolution-2-30-1-for-ubuntu-10-04-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing VirtualBox (non-free) in Ubuntu 10.04, Lucid Lynx</title>
		<link>http://ostehamster.dk/blog/index.php/2010/06/05/installing-virtualbox-non-free-in-ubuntu-10-04-lucid-lynx/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/06/05/installing-virtualbox-non-free-in-ubuntu-10-04-lucid-lynx/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 11:37:41 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 10.04]]></category>
		<category><![CDATA[VirtualBox]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=932</guid>
		<description><![CDATA[sudo -s "echo 'deb http://download.virtualbox.org/virtualbox/debian\ lucid non-free' >> /etc/apt/sources.list" wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- &#124; sudo apt-key add - sudo apt-get update sudo apt-get install virtualbox-3.2]]></description>
			<content:encoded><![CDATA[<pre>sudo -s "echo 'deb http://download.virtualbox.org/virtualbox/debian\
 lucid non-free' >> /etc/apt/sources.list"
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-3.2
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/06/05/installing-virtualbox-non-free-in-ubuntu-10-04-lucid-lynx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash in Ubuntu 10.04 64 bit</title>
		<link>http://ostehamster.dk/blog/index.php/2010/06/03/flash-in-ubuntu-10-04-64-bit/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/06/03/flash-in-ubuntu-10-04-64-bit/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 20:35:11 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[10.04]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 10.04]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=926</guid>
		<description><![CDATA[Installing Adobe Flash from the repository in Ubuntu 10.04 64 bit gives you the 32 bit version and runs it with nspluginwrapper. I have experienced several problems with this solution in Firefox, and is therefore using Adobes 64 bit Linux version. Uninstall the repository version of flash sudo apt-get remove flashplugin-installer nspluginwrapper Get the Adobes [...]]]></description>
			<content:encoded><![CDATA[<p>Installing Adobe Flash from the repository in Ubuntu 10.04 64 bit gives you the 32 bit version and runs it with <a href="http://freshmeat.net/projects/nspluginwrapper/">nspluginwrapper</a>. I have experienced several problems with this solution in Firefox, and is therefore using Adobes 64 bit Linux version.</p>
<p>Uninstall the repository version of flash</p>
<blockquote><p>sudo apt-get remove flashplugin-installer nspluginwrapper</p></blockquote>
<p>Get the Adobes Linux version from <a href="http://labs.adobe.com/downloads/flashplayer10_64bit.html">http://labs.adobe.com/downloads/flashplayer10_64bit.html</a> and install it:</p>
<blockquote><p>wget http://download.macromedia.com/pub/labs/flashplayer10/libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz<br />
tar -zxvf libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz<br />
sudo mv libflashplayer.so /usr/lib/mozilla/plugins/<br />
rm libflashplayer-10.0.45.2.linux-x86_64.so.tar.gz</p></blockquote>
<p>Restart Firefox</p>
<p><strong>Update: June 6th</strong><br />
I have switched back to the "Ubuntu" Flash, because I was unable to use pages from ipapercms.dk:</p>
<blockquote><p>sudo rm /usr/lib/mozilla/plugins/libflashplayer.so<br />
sudo apt-get install flashplugin-nonfree</p></blockquote>
<p>The flickering seems to disappear when all the fancy visual effects are disabled.</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/06/03/flash-in-ubuntu-10-04-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making &#8220;backtrace&#8221; in MySQL with &#8220;recursive&#8221; call</title>
		<link>http://ostehamster.dk/blog/index.php/2010/04/11/making-backtrace-in-mysql-with-recursive-call/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/04/11/making-backtrace-in-mysql-with-recursive-call/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 13:00:47 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=777</guid>
		<description><![CDATA[Having items mapped in a tree structure is often used in database design, using "child" and "parent" ids or "nodes" and "leaf nodes". Often when presenting data, it is nice to make a "backtrace" by showing all nodes from the leaf to the root of the tree. In this case I have a system with [...]]]></description>
			<content:encoded><![CDATA[<p>Having items mapped in a tree structure is often used in database design, using "child" and "parent" ids or "nodes" and "leaf nodes". Often when presenting data, it is nice to make a "backtrace" by showing all nodes from the leaf to the root of the tree.</p>
<p>In this case I have a system with a lot of users, each of which is mapped to a group. The groups are defined as a tree structure, but because of the roles of the system, the leaf node can never be more than three nodes away from the root. I need to show a list of, say all users not logged in the last 2 months, and the list should show in which groups the users is located.</p>
<p>I could find all users, get the group id from each users and with a recursive function in the application, find the parent group id of the group, get this group from the database, find the parent group id of the group, get this group from the database..... This would require a lot of database activity. It is also possible to make <a href="http://www.developersdex.com/gurus/articles/112.asp">nested sets</a> or <a href="http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html">stored procedures</a>, but if the depth of the three is relative low (and known), I believe the below is simpler.</p>
<p>The table of groups is defined as:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> <span style="color: #ff0000;">`groups`</span> <span style="color: #66cc66;">&#40;</span>
	<span style="color: #ff0000;">`gid`</span> INT <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span> <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span> <span style="color: #66cc66;">,</span>
	<span style="color: #ff0000;">`pgid`</span> INT <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #66cc66;">,</span>
	<span style="color: #ff0000;">`title`</span> VARCHAR<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">100</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> 
<span style="color: #66cc66;">&#41;</span> ENGINE <span style="color: #66cc66;">=</span> MYISAM ;</pre></div></div>

<p>With these groups:</p>
<pre>mysql> select * from groups;
+-----+------+---------+
| gid | pgid | title   |
+-----+------+---------+
|   1 |    0 | Level 1 |
|   2 |    1 | Level 2 |
|   3 |    2 | Level 3 |
|   4 |    3 | Level 4 |
|   5 |    4 | Level 5 |
+-----+------+---------+
5 rows in set (0.00 sec)
</pre>
<p>With the below query, it is possible to make the backtrace using joins. Line 6 will find the record holding the parent group of the selected group as the temporary record bt1. Line 7 will then use the parent group id from bt1 to find this group as bt2, and so on.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
</pre></td><td class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">SELECT</span> groups<span style="color: #66cc66;">.</span>gid<span style="color: #66cc66;">,</span> groups<span style="color: #66cc66;">.</span>title<span style="color: #66cc66;">,</span> 
	bt1<span style="color: #66cc66;">.</span>gid <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'gid-1'</span><span style="color: #66cc66;">,</span> bt1<span style="color: #66cc66;">.</span>title <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'title-1'</span><span style="color: #66cc66;">,</span> 
	bt2<span style="color: #66cc66;">.</span>gid <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'gid-2'</span><span style="color: #66cc66;">,</span> bt2<span style="color: #66cc66;">.</span>title <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'title-2'</span><span style="color: #66cc66;">,</span> 
	bt3<span style="color: #66cc66;">.</span>gid <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'gid-3'</span><span style="color: #66cc66;">,</span> bt3<span style="color: #66cc66;">.</span>title <span style="color: #993333; font-weight: bold;">AS</span> <span style="color: #ff0000;">'title-3'</span>
<span style="color: #993333; font-weight: bold;">FROM</span> groups
	<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> groups <span style="color: #993333; font-weight: bold;">AS</span> bt1 <span style="color: #993333; font-weight: bold;">ON</span> bt1<span style="color: #66cc66;">.</span>gid <span style="color: #66cc66;">=</span> groups<span style="color: #66cc66;">.</span>pgid
	<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> groups <span style="color: #993333; font-weight: bold;">AS</span> bt2 <span style="color: #993333; font-weight: bold;">ON</span> bt2<span style="color: #66cc66;">.</span>gid <span style="color: #66cc66;">=</span> bt1<span style="color: #66cc66;">.</span>pgid
	<span style="color: #993333; font-weight: bold;">LEFT</span> <span style="color: #993333; font-weight: bold;">JOIN</span> groups <span style="color: #993333; font-weight: bold;">AS</span> bt3 <span style="color: #993333; font-weight: bold;">ON</span> bt3<span style="color: #66cc66;">.</span>gid <span style="color: #66cc66;">=</span> bt2<span style="color: #66cc66;">.</span>pgid
<span style="color: #993333; font-weight: bold;">WHERE</span> groups<span style="color: #66cc66;">.</span>gid <span style="color: #993333; font-weight: bold;">IN</span> <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>The result is</p>
<pre>+-----+---------+-------+---------+-------+---------+-------+---------+
| gid | title   | gid-1 | title-1 | gid-2 | title-2 | gid-3 | title-3 |
+-----+---------+-------+---------+-------+---------+-------+---------+
|   1 | Level 1 |  NULL | NULL    |  NULL | NULL    |  NULL | NULL    |
|   2 | Level 2 |     1 | Level 1 |  NULL | NULL    |  NULL | NULL    |
|   3 | Level 3 |     2 | Level 2 |     1 | Level 1 |  NULL | NULL    |
|   4 | Level 4 |     3 | Level 3 |     2 | Level 2 |     1 | Level 1 |
|   5 | Level 5 |     4 | Level 4 |     3 | Level 3 |     2 | Level 2 |
+-----+---------+-------+---------+-------+---------+-------+---------+
5 rows in set (0.00 sec)</pre>
<p>This is not really a recursive call as the title says, but the result is the same, though much faster :)</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/04/11/making-backtrace-in-mysql-with-recursive-call/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Xilinx ISE/EDK 11.5 under Ubuntu 9.10</title>
		<link>http://ostehamster.dk/blog/index.php/2010/02/21/installing-xilinx-edk-11-4-under-ubuntu-9-10/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/02/21/installing-xilinx-edk-11-4-under-ubuntu-9-10/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 14:20:35 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[VHDL / FPGA]]></category>
		<category><![CDATA[FPGA]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[VHDL]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=695</guid>
		<description><![CDATA[This guide tell how-to install Xilinx ISE and EDK under Ubuntu 9.10, using a 30-days evaluation license acquired at http://www.xilinx.com/ise_eval/index.htm. Required tools The EDK needs make, which must be called gmake. The easiest way is to install build essential and make a symlink from make to gmake. Futhermore fxload is needed for firmware upload and [...]]]></description>
			<content:encoded><![CDATA[<p>This guide tell how-to install Xilinx ISE and EDK under Ubuntu 9.10, using a 30-days evaluation license acquired at <a href="http://www.xilinx.com/ise_eval/index.htm">http://www.xilinx.com/ise_eval/index.htm</a>.</p>
<p><strong>Required tools</strong><br />
The EDK needs make, which must be called gmake. The easiest way is to install build essential and make a symlink from make to gmake. Futhermore fxload is needed for firmware upload and motif for the GUI.</p>
<pre>sudo apt-get install fxload build-essential motif-clients
sudo ln -s /usr/bin/make /usr/bin/gmake</pre>
<p>If you have purchased a development board from Xilinx, use the included DVD:</p>
<blockquote><p>cd /media/cdrom<br />
sudo ./xsetup</p></blockquote>
<p>If not, follow the download link at the above URL, and download the ISE Design Suite: Full DVD, which is roughly 5.6 GB and untar it:</p>
<blockquote><p>mkdir ise<br />
cd ise<br />
tar -cvf Xilinx_11.1_ISE_DS_SFD.tar<br />
cd Xilinx_11.1_ISE_DS_SFD<br />
sudo ./xsetup</p></blockquote>
<p>You do not need to use <code>sudo</code>, but if all users on the system should use EDK, it will be installed in /opt/Xilinx/ using sudo. If <code>sudo</code> is not used, it will be installed in /home/<em>username</em>/.</p>
<p>The installation process is straight forward, and will guide you to setting up a license in the last step. If you choose to use the 30-day trial, a browser will open the Xilinx license system, which will generate the license, download it and install it.</p>
<p><strong>Start up scripts</strong></p>
<p>In order to start <code>xps</code> the environment variable $XILINX must hold the path to ISE. To start <code>xps</code> type</p>
<pre>export XILINX=/opt/Xilinx/11.1/ISE/ &#038;& /opt/Xilinx/11.1/EDK/bin/lin/xps</pre>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/02/21/installing-xilinx-edk-11-4-under-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Cleaning up /boot by removing unused kernels (Ubuntu)</title>
		<link>http://ostehamster.dk/blog/index.php/2010/02/21/cleaning-up-boot-by-removing-unused-kernels/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/02/21/cleaning-up-boot-by-removing-unused-kernels/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 14:12:59 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=697</guid>
		<description><![CDATA[At some point /boot will be full of old kernels (if /boot is a separate partition), which makes it impossible to make a dist-upgrade and it is therefore necessary to remove some old kernels. Start by finding you current kernel uname -r which will give something like 2.6.24-25-server Now, find all installed kernels aptitude search [...]]]></description>
			<content:encoded><![CDATA[<p>At some point /boot will be full of old kernels (if /boot is a separate partition), which makes it impossible to make a dist-upgrade and it is therefore necessary to remove some old kernels.</p>
<p>Start by finding you current kernel</p>
<pre>uname -r</pre>
<p>which will give something like</p>
<blockquote><p>2.6.24-25-server</p></blockquote>
<p>Now, find all installed kernels</p>
<pre>aptitude search linux|grep linux-image | grep "i   "</pre>
<p>which will give something like</p>
<blockquote><p>i   linux-image-2.6.24-12-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-14-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-15-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-16-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-17-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-18-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-19-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-21-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-22-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-23-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-24-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-2.6.24-25-server    - Linux kernel image for version 2.6.24 on x<br />
i   linux-image-server              - Linux kernel image on Server Equipment.</p></blockquote>
<p>Purge all of these, except the one found with <code>uname -r</code> and linux-image-server, which is a meta package</p>
<pre>sudo apt-get purge linux-image-2.6.24-14-server linux-image-2.6.24-15-server linux-image-2.6.24-16-server linux-image-2.6.24-17-server linux-image-2.6.24-18-server linux-image-2.6.24-19-server linux-image-2.6.24-21-server linux-image-2.6.24-22-server linux-image-2.6.24-23-server linux-image-2.6.24-24-server</pre>
<p>The above freed 250 MB from /boot and 550 MB from / at my system.</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/02/21/cleaning-up-boot-by-removing-unused-kernels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Krypter med DanIDs &#8220;Digital Signatur&#8221; i Evolution</title>
		<link>http://ostehamster.dk/blog/index.php/2010/01/31/krypter-med-danids-digital-signatur-i-evolution/</link>
		<comments>http://ostehamster.dk/blog/index.php/2010/01/31/krypter-med-danids-digital-signatur-i-evolution/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 20:17:49 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[DanID]]></category>
		<category><![CDATA[Digital Signatur]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=664</guid>
		<description><![CDATA[Er du bruger af Evolution og har behov for at sende en krypteret mail med DanIDs "Digital Signatur", skal du først have fat i kontaktpersonens certifikat. Dette finder du på DanIDs Certificeringscenter, såfremt personen har valgt at være listet her. Når du har fundet det rette certifikat klikke du på , hvorefter du kan gemme [...]]]></description>
			<content:encoded><![CDATA[<p>Er du bruger af Evolution og har behov for at sende en krypteret mail med DanIDs "Digital Signatur", skal du først have fat i kontaktpersonens certifikat. Dette finder du på <a href="https://www.certifikat.dk/export/sites/dk.certifikat.oc/da/soegning/">DanIDs Certificeringscenter</a>, såfremt personen har valgt at være listet her. Når du har fundet det rette certifikat klikke du på <img src="http://ostehamster.dk/blog/wp-content/uploads/2010/01/download.gif" alt="download" title="download" width="16" height="16" class="alignnone size-full wp-image-665" />, hvorefter du kan gemme en .cer fil.</p>
<p>I Evolution vælger du Rediger -> Indstillinger (eller Shift-Ctrl-S) -> Certifikater -> Kontaktpersoners certifikater -> Importer hvorefter du får mulighed for at importere den hentede .cer fil.</p>
<p>Du skal naturligvis have din egen private signaturfil i Evolution.</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2010/01/31/krypter-med-danids-digital-signatur-i-evolution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto program the Avnet / Xilinx Spartan-3A Evaluation Kit from Ubuntu 9.10</title>
		<link>http://ostehamster.dk/blog/index.php/2009/12/31/howto-program-the-avnet-xilinx-spartan-3a-evaluation-kit-from-ubuntu-9-10/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/12/31/howto-program-the-avnet-xilinx-spartan-3a-evaluation-kit-from-ubuntu-9-10/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 12:26:34 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[VHDL / FPGA]]></category>
		<category><![CDATA[FPGA]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>
		<category><![CDATA[VHDL]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=596</guid>
		<description><![CDATA[The Avnet / Xilinx Spartan-3A Evaluation Kit is a $49 FPGA kit from Avnet, with a XC3S400A Spartan-3A FPGA, and a number of simple peripherals: Xilinx XC3S400A-4FTG256C Spartan-3A FPGA Four LEDs Four CapSense™ switches I2C temperature sensor Two 6-pin expansion headers 20 x 2, 0.1-inch user I/O header 32 Mb Spansion® MirrorBit® NOR GL Parallel [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.em.avnet.com/spartan3a-evl">Avnet / Xilinx Spartan-3A Evaluation Kit is a $49 FPGA kit</a> from Avnet, with a XC3S400A Spartan-3A FPGA, and a number of simple peripherals:</p>
<ul>
<li>Xilinx XC3S400A-4FTG256C Spartan-3A FPGA</li>
<li>Four LEDs</li>
<li>Four CapSense™ switches</li>
<li>I2C temperature sensor</li>
<li>Two 6-pin expansion headers</li>
<li>20 x 2, 0.1-inch user I/O header</li>
<li>32 Mb Spansion® MirrorBit® NOR GL Parallel Flash</li>
<li>128 Mb Spansion MirrorBit SPI FL Serial Flash</li>
<li>USB-UART bridge</li>
<li>I2C port</li>
<li>SPI and BPI configuration</li>
<li>Xilinx JTAG interface</li>
<li>FPGA configuration via PSoC®</li>
</ul>
<p>The flash is not updated through a JTAG, but through the USB interface. On Windows the AVprog is used, <a href="http://ostehamster.dk/blog/index.php/2009/07/14/using-avnet-avprog-for-xilinx%C2%AE-spartan%C2%AE-3a-evaluation-kit-under-linux/">which can run in Wine</a> and therefore usable on Linux. It is however easier to use the tool called <a href="http://fpgalibre.sourceforge.net/ingles.html#tp82">ASTriAEKiPro 1.2.1</a>.<br />
<span id="more-596"></span><br />
Download a newest .deb file from <a href="http://sourceforge.net/projects/fpgalibre/files/ASTriAEKiPro/">http://sourceforge.net/projects/fpgalibre/files/ASTriAEKiPro/</a> and install it with:<br />
<code>sudo dpkg -i astriaekipro_1.2.1-2_i386.deb</code></p>
<p><strong>Using ASTriAEKiPro</strong><br />
Get a bit file for the kit, either from the CD in the package or from the Avnet Design Resource Center, go to the <a href="http://www.em.avnet.com/spartan3a-evl">Avnet Spartan-3A page</a> and click on "Support files and downloads", login and get the "Default Serial Flash Factory Image" file.</p>
<p>To write to the SPI flash use:<br />
<code>astriaekipro -w Spartan3AEval_FPGA_Firmware_V10.bit</code></p>
<p>To verify:<br />
<code>astriaekipro -y Spartan3AEval_FPGA_Firmware_V10.bit</code></p>
<p>ASTriAEKiPro can furthermore be used as a terminal, which makes it possible to use the USB as serial interface for a MicroBlace etc.:<br />
<code>astriaekipro -t</code></p>
<p>Which will give you something like:</p>
<pre>*******************************************************************
*                    _____                                        *
*                   /     \                                       *
*                  /____   \____                                  *
*                 / \===\   \==/                                  *
*                /___\===\___\/  AVNET                            *
*                     \======/   ENGINEERING                      *
*                      \====/    SERVICES                         *
*                                                                 *
*******************************************************************
*              Spartan 3A Eval Demo V1.0 5/2008                   *
*******************************************************************
* Current Device Status:                                          *
*                                                                 *
*   EF1:  DEACTIVATED                                             *
*   EF2:  DEACTIVATED                                             *
*   EF3:  DEACTIVATED                                             *
*   EF4:  Connected To FPGA System Reset                          *
*   TMP:   29.1250 C                                              *
*   U22:  S29GL032N DETECTED                                      *
*******************************************************************
Type <help> for command options. 

ADS></help></pre>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/12/31/howto-program-the-avnet-xilinx-spartan-3a-evaluation-kit-from-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Installing Xilinx ISE WebPack 11.1 under Ubuntu 9.10</title>
		<link>http://ostehamster.dk/blog/index.php/2009/12/31/installing-xilinx-ise-webpack-11-1-under-ubuntu-9-10/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/12/31/installing-xilinx-ise-webpack-11-1-under-ubuntu-9-10/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 11:08:50 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[VHDL / FPGA]]></category>
		<category><![CDATA[FPGA]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mad]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>
		<category><![CDATA[VHDL]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=555</guid>
		<description><![CDATA[This is a short how to install Xilinx ISE Webpack 11.1 / 11.3 under Ubuntu 9.10. Start by downloading the installation files from "Xilinx Download". The file is 2.67 GB, and Xilinx requires you to have a free account in order to download the file. Untar the file tar -xf Xilinx_11.1_WebPack_SFD.tar and install sudo mkdir [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short how to install Xilinx ISE Webpack 11.1 / 11.3 under Ubuntu 9.10. Start by downloading the installation files from "<a href="http://www.xilinx.com/support/download/index.htm">Xilinx Download</a>". The file is 2.67 GB, and Xilinx requires you to have a free account in order to download the file.<br />
<span id="more-555"></span><br />
Untar the file<br />
<code>tar -xf Xilinx_11.1_WebPack_SFD.tar</code></p>
<p>and install<br />
<code>sudo mkdir /home/Xilinx/<br />
sudo chmod 777 /home/Xilinx/<br />
cd Xilinx_11.1_WebPack_SFD<br />
./xsetup</code></p>
<p>Set the installation path to /home/Xilinx/, and follow the installation process.</p>
<p>When the installation is done, you will be asked for a license. Select "Start ISE WebPack" and click next and follow the instructions on the website. When the license is installed, close the browser window and the Xilinx License Configuration Manager.</p>
<p>The installer will ask for installation of updates. This is advisable, but it is imo easier to download the update files from Xilinx homepage. Go to download and "<a href="https://xilinx.entitlenow.com/cocoon/across/general/home.html?tab=DownloadUpdates&#038;product=&#038;licenseType=&#038;legacyVersion=#">Software Updates</a>".</p>
<p>Untar the file<br />
<code>tar -xf Xilinx_11.4_ISE_DS_lin.tar</code></p>
<p>and install<br />
<code>cd Xilinx_11.4_ISE_DS_lin<br />
./xsetup</code></p>
<p>You are now ready to go, by running<br />
<code>/home/Xilinx/11.1/ISE/bin/lin/ise</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/12/31/installing-xilinx-ise-webpack-11-1-under-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Danske karakterer under Debian Lenny på en NSLU2</title>
		<link>http://ostehamster.dk/blog/index.php/2009/11/21/%c3%a6%c3%b8a-under-debian-lenny-pa-en-nslu2/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/11/21/%c3%a6%c3%b8a-under-debian-lenny-pa-en-nslu2/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 20:03:20 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[NSLU2]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/index.php/2009/11/21/%c3%a6%c3%b8a-under-debian-lenny-pa-en-nslu2/</guid>
		<description><![CDATA[Jeg har haft gevaldige problemer med rsync på min NSLU2 kørende Debian Lenny, idet alle filer der indeholdt æ, ø eller å blive ødelagt. Jeg fandt ud af at det heller ikke var muligt at skrive æ, ø eller å i en terminal, hvilket blev løst ved først at installere locales-all: sudo apt-get install locales-all [...]]]></description>
			<content:encoded><![CDATA[<p>Jeg har haft gevaldige problemer med rsync på min NSLU2 kørende Debian Lenny, idet alle filer der indeholdt æ, ø eller å blive ødelagt. Jeg fandt ud af at det heller ikke var muligt at skrive æ, ø eller å i en terminal, hvilket blev løst ved først at installere <code>locales-all</code>:<br />
<code>sudo apt-get install locales-all</code></p>
<p>Hvorefter jeg ændrede <code>/etc/default/locale</code> til at indeholde <code>LANG="da_DK.UTF-8"</code>.</p>
<p>Alt virker nu glimrende.</p>
<p>(Husk at logge af og på!)</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/11/21/%c3%a6%c3%b8a-under-debian-lenny-pa-en-nslu2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search and replace in MySQL</title>
		<link>http://ostehamster.dk/blog/index.php/2009/11/08/search-and-replace-in-mysql/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/11/08/search-and-replace-in-mysql/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 14:51:42 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=521</guid>
		<description><![CDATA[Howto replace foo with bar in the column col_name of all records of table table_name, where col_name has foo in it. UPDATE table_name SET col_name = (REPLACE (col_name, 'foo', 'bar')) WHERE col_name LIKE '%foo%';]]></description>
			<content:encoded><![CDATA[<p>Howto replace <em>foo</em> with <em>bar</em> in the column <em>col_name</em> of all records of table <em>table_name</em>, where <em>col_name</em> has <em>foo</em> in it.</p>
<p><code>UPDATE table_name<br />
SET col_name = (REPLACE (col_name, 'foo', 'bar'))<br />
WHERE col_name LIKE '%foo%';</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/11/08/search-and-replace-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Adobe Reader 9.2 in Ubuntu 9.10</title>
		<link>http://ostehamster.dk/blog/index.php/2009/11/03/installing-adobe-reader-9-2-in-ubuntu-9-10/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/11/03/installing-adobe-reader-9-2-in-ubuntu-9-10/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 09:24:31 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=486</guid>
		<description><![CDATA[To install Adobe Reader 9.2 in Ubuntu 9.10, you have to enable the Canonical Partner Repository. Go to System -> Administration -> Software Sources Select Third-Party Software and and check the checkbox for http://archive.canonical.com/ubuntu partner. Close and accept to reload. It is now possible to install "acroread" by sudo apt-get install acroread Or from System [...]]]></description>
			<content:encoded><![CDATA[<p>To install Adobe Reader 9.2 in Ubuntu 9.10, you have to enable the Canonical Partner Repository. Go to System -> Administration -> Software Sources</p>
<p>Select Third-Party Software and and check the checkbox for <code>http://archive.canonical.com/ubuntu partner</code>.<br />
Close and accept to reload.</p>
<p>It is now possible to install "acroread" by<br />
<code>sudo apt-get install acroread</code></p>
<p>Or from System -> Administration -> Synaptic Package Manager, but for some reason it is not found in Ubuntu Software Center?</p>
<p><strong>Update: 2009-11-03 @ 00:56</strong><br />
According to <a href="https://wiki.ubuntu.com/SoftwareCenter">https://wiki.ubuntu.com/SoftwareCenter</a> version 3 of the SoftwareCenter will offer "commercial software for sale". But according to <a href="http://www.ghacks.net/2009/10/30/the-new-ubuntu-software-center/">http://www.ghacks.net/2009/10/30/the-new-ubuntu-software-center/</a> and <a href="http://blogs.techrepublic.com.com/opensource/?p=1031">http://blogs.techrepublic.com.com/opensource/?p=1031</a> it should be possible to install "commercial/non-free software" in version 3.</p>
<p>In Ubuntu 10.4 the Software Center should replace "Synaptic, Software Sources, Gdebi, and possibly the Update Manager" according to <a href="http://en.wikipedia.org/wiki/Ubuntu_Software_Center">http://en.wikipedia.org/wiki/Ubuntu_Software_Center</a>, so version 3 should be out at that time - I hope :)</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/11/03/installing-adobe-reader-9-2-in-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Howto use Eclipse with PHP and SVN in Ubuntu 9.10</title>
		<link>http://ostehamster.dk/blog/index.php/2009/11/01/howto-use-eclipse-with-php-and-svn-in-ubuntu-9-10/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/11/01/howto-use-eclipse-with-php-and-svn-in-ubuntu-9-10/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 15:58:18 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Karmic Koala]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=473</guid>
		<description><![CDATA[This little guide will show how to set up Eclipse for developing PHP sites using PHP Development Tools Project and Subversion. Install Eclipse Galileo from repository: sudo apt-get install eclipse A number of dependencies are required inside Eclipse, which has to be added. Start Eclipse from the menu, and select Help > Install new software... [...]]]></description>
			<content:encoded><![CDATA[<p>This little guide will show how to set up Eclipse for developing PHP sites using <a href="http://www.eclipse.org/pdt/">PHP Development Tools Project</a> and Subversion.</p>
<p>Install Eclipse Galileo from repository:</p>
<blockquote><p>sudo apt-get install eclipse</p></blockquote>
<p>A number of dependencies are required inside Eclipse, which has to be added. Start Eclipse from the menu, and select Help > Install new software... The below list of update sites has to be added, which is done be typing the URL in "Work with", click Add and then type the name in the name field followed by Ok. Do this for the below update sites (name followed by URL):</p>
<p>EMF, <code>http://download.eclipse.org/modeling/emf/updates/releases/</code><br />
MyLyn, <code>http://download.eclipse.org/tools/mylyn/update/e3.4/</code><br />
GEF, <code>http://download.eclipse.org/tools/gef/updates/releases/</code><br />
DLTK, <code>http://download.eclipse.org/releases/galileo/</code><br />
Webtool, <code>http://download.eclipse.org/webtools/updates/</code></p>
<p><strong>PDT</strong><br />
Add <code>http://download.eclipse.org/tools/pdt/updates/2.0/</code> with name PDT. Open "PDT SDK 2.1.2" and select "PHP Development Tools (PDT) Runtime Feature", click Next twice, accept the license and click Finish.</p>
<p><strong>Subclipse</strong><br />
SVN integration (or one of them) in Eclipse is called <a href="http://subclipse.tigris.org/">Subclipse</a> and is installed through update sites as well.  Select Help > Install new software... and add <code>http://subclipse.tigris.org/update_1.6.x</code> into the "Work with" field and click Add type "Subclipse" in name and click Ok. Select all three options and click Next, Next, accept License and click Finish.</p>
<p><strong>Checking out a project</strong><br />
Select File -> New -> Other in the new window select SVN -> Checkout Projects from SVN and click Next.</p>
<p>Select "Create a new repository location", click Next. Type SVN repository in URL, click Next. Type username and password if required. Select the part of the repository containing the project, click Finish.</p>
<p>If the repository not already holds project settings for Eclipse, select "Check out as a project configured using the New Project Wizard" and click Finish. In the New Project Wizard select PHP -> PHP Project and click Next. Give the project a name and you are ready to go - have fun! :)</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/11/01/howto-use-eclipse-with-php-and-svn-in-ubuntu-9-10/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Re-install / upgrade to Ubuntu 9.10 and keep encrypted data from previous version</title>
		<link>http://ostehamster.dk/blog/index.php/2009/11/01/re-install-upgrade-to-ubuntu-9-10-and-keep-encrypted-data-from-previous-version/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/11/01/re-install-upgrade-to-ubuntu-9-10-and-keep-encrypted-data-from-previous-version/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 12:19:06 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Karmic Koala]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Paranoia]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=223</guid>
		<description><![CDATA[When Ubuntu first started with encrypted hard drive support, I made a LVM system inside the encrypted system. I do not like to upgrade Ubuntu from one version to another, and I do not want to copy all my data for each installation. My LVM system therefore have root, swap and home, so that home [...]]]></description>
			<content:encoded><![CDATA[<p>When Ubuntu first started with encrypted hard drive support, I made a LVM system inside the encrypted system. I do not like to upgrade Ubuntu from one version to another, and I do not want to copy all my data for each installation. My LVM system therefore have root, swap and home, so that home can survive the re-installation.</p>
<p>Unfortunately, the installer (the alternative one) do not recognise the encrypted hard drive, and is therefore not able to use it. This little guide helps you to reuse your LVM layout - and your data!</p>
<p><strong>NB: Use this guide at your own risk!</strong><br />
<span id="more-223"></span></p>
<p>Follow the installation until "Set up network", then press ctrl-alt F2 to start a console and run<br />
<code><br />
modprobe dm-crypt<br />
cryptsetup luksOpen /dev/sda5 sda5_crypt<br />
</code></p>
<p>Replace /dev/sda5 with your encrypted partition. You will now be prompted for your passphrase for the encrypted partition, after which you run<br />
<code><br />
vgscan<br />
vgchange -ay<br />
</code><br />
in order to activate the lvm volumes.</p>
<p>Press ctrl-alt f1 to get back to the installer. When asked for partition method select Manual, and your encrypted LVM volumes are now on the list. You still need to set mount points etc., and remember NOT to mark them for formatting. Continue the installation.</p>
<p>Boot into rescue with your LVM root volume as /</p>
<p>Find the unique id for this "disk" from:<br />
<code>ls -l /dev/disk/by-uuid</code></p>
<p>Insert a line like</p>
<blockquote><p>sda5_crypt /dev/disk/by-uuid/df05112c-65bf-44a2-b6d1-a740c3444b53 none luks</p></blockquote>
<p>into /etc/crypttab. Remember to use the uuid found above together with what ever name you have given the device. sda5_crypt will give a device called /dev/mapper/sda5_crypt</p>
<p>To avoid manually typing the uuid, it is possible just to do:<br />
<code>ls -l /dev/disk/by-uuid >> /etc/crypttab<br />
nano - /etc/crypttab</code></p>
<p>This will copy the entire content of "ls -l /dev/disk/by-uuid" into the bottom of /etc/crypttab, and open the file for editing with nano.</p>
<p>Run <code>update-initramfs -u</code>, reboot and you are ready to go!</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/11/01/re-install-upgrade-to-ubuntu-9-10-and-keep-encrypted-data-from-previous-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto backup NetworkManager settings</title>
		<link>http://ostehamster.dk/blog/index.php/2009/06/05/howto-backup-networkmanager-settings/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/06/05/howto-backup-networkmanager-settings/#comments</comments>
		<pubDate>Fri, 05 Jun 2009 14:47:47 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Howto]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=315</guid>
		<description><![CDATA[Backup with: tar -zcvf nm.tgz ~/.gconf/system/networking/ ~/.gnome2/keyrings/login.keyring Caution: This will also backup your keyring! Restore with: sudo /etc/init.d/NetworkManager stop pkill nm-applet gconftool-2 --shutdown cd ~/ tar -zxvf nm.tgz sudo /etc/init.d/NetworkManager start gconftool-2 --shutdown Caution: This will overwrite your keyring! Press Alt &#038; F2 to start "Run program" and enter "nm-applet"]]></description>
			<content:encoded><![CDATA[<p>Backup with:</p>
<blockquote><p>tar -zcvf nm.tgz ~/.gconf/system/networking/ ~/.gnome2/keyrings/login.keyring</p></blockquote>
<p><strong>Caution: This will also backup your keyring!</strong></p>
<p>Restore with:</p>
<blockquote><p>sudo /etc/init.d/NetworkManager stop<br />
pkill nm-applet<br />
gconftool-2 --shutdown<br />
cd ~/<br />
tar -zxvf nm.tgz<br />
sudo /etc/init.d/NetworkManager start<br />
gconftool-2 --shutdown
</p></blockquote>
<p><strong>Caution: This will overwrite your keyring!</strong></p>
<p>Press Alt &#038; F2 to start "Run program" and enter "nm-applet"</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/06/05/howto-backup-networkmanager-settings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual sub-domains on localhost for development</title>
		<link>http://ostehamster.dk/blog/index.php/2009/05/08/virtual-sub-domains-on-localhost-for-development/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/05/08/virtual-sub-domains-on-localhost-for-development/#comments</comments>
		<pubDate>Fri, 08 May 2009 20:56:22 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Ubuntu 9.10]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=294</guid>
		<description><![CDATA[Using Apache and mod_vhost_alias, it is possible to have one configuration file for all you development home-pages. But notice before you start, that $_SERVER["DOCUMENT_ROOT"] will NOT work with this hack! First step is to enable mod_vhost_alias: sudo a2enmod vhost_alias Next you have to make a config file for apache. I only use this setup, and [...]]]></description>
			<content:encoded><![CDATA[<p>Using Apache and <a href="http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html">mod_vhost_alias</a>, it is possible to have one configuration file for all you development home-pages. But notice before you start, that $_SERVER["DOCUMENT_ROOT"] will NOT work with this hack!<br />
<span id="more-294"></span><br />
First step is to enable mod_vhost_alias:</p>
<blockquote><p>sudo a2enmod vhost_alias</p></blockquote>
<p>Next you have to make a config file for apache. I only use this setup, and have no other virtual hosts, so I just uses the default config file:</p>
<blockquote><p>sudo gedit /etc/apache2/sites-enabled/000-default</p></blockquote>
<p>and make it something like:</p>
<blockquote><p>&lt;VirtualHost *:80&gt;<br />
&nbsp;&nbsp;&nbsp;ServerName localhost<br />
&nbsp;&nbsp;&nbsp;ServerAlias *.localhost</p>
<p>&nbsp;&nbsp;&nbsp;VirtualDocumentRoot /var/www/htdocs/%1/</p>
<p>&nbsp;&nbsp;&nbsp;&lt;directory /var/www/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AllowOverride AuthConfig Options FileInfo Limit<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Options MultiViews SymlinksIfOwnerMatch<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Order allow,deny<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Allow from all<br />
&nbsp;&nbsp;&nbsp;&lt;/Directory&gt;  </p>
<p>&nbsp;&nbsp;&nbsp;ErrorLog /var/log/apache2/error.log<br />
&nbsp;&nbsp;&nbsp;LogLevel warn<br />
&lt;/virtualhost&gt;</p></blockquote>
<p>The important part is that there is not DocumentRoot, but instead the line:</p>
<blockquote><p>VirtualDocumentRoot /var/www/htdocs/%1/</p></blockquote>
<p><strong>%1</strong> means "the first part" of the domain, so if the domain is <em>customer1.localhost</em> the document root will be /var/www/htdocs/customer1/. There is different settings for this, which can be seen in the <a href="http://httpd.apache.org/docs/2.2/mod/mod_vhost_alias.html#interpol">Apache doc</a>.</p>
<p>Remember to restart apache:</p>
<blockquote><p>sudo /etc/init.d/apache2 restart</p></blockquote>
<p>Now you just have to create all the directories in /var/www/htdocs/ as you like, and add the corresponding sub-domains in the host file:</p>
<blockquote><p>sudo gedit /etc/hosts</p></blockquote>
<p> and add the sub-domains</p>
<blockquote><p>127.0.1.1 customer1.localhost<br />
127.0.1.1 customer2.localhost<br />
127.0.1.1 customer3.localhost</p></blockquote>
<p>Have fun :)</p>
<p><strong>Update: index page</strong><br />
Creating the directory /var/www/htdocs/localhost/ with the below code in index.php, it is possible to make an index page of all pages.</p>
<blockquote><p>
&lt;?<br />
$dir_handle = @opendir("../");</p>
<p>while ($file = readdir($dir_handle)) {<br />
	if($file!="." &#038;& $file!=".." &#038;& $file!="localhost") echo "&lt;a href='http://$file.localhost'&gt;http://$file.localhost&lt;br /&gt;";<br />
}</p>
<p>closedir($dir_handle);</p>
<p>?&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/05/08/virtual-sub-domains-on-localhost-for-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use Nokia E65 as GPRS modem in Ubuntu 8.04</title>
		<link>http://ostehamster.dk/blog/index.php/2009/04/19/use-nokia-e65-as-gprs-modem-in-ubuntu-804/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/04/19/use-nokia-e65-as-gprs-modem-in-ubuntu-804/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 14:31:57 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=291</guid>
		<description><![CDATA[A short description about how to use a Nokia E65 as a GPRS modem in Ubuntu 8.04. Install the needed software packages: sudo apt-get install bluez bluez-utils wvdial Enable bluetooth on your phone, scan for it and copy the address for your phone. hcitool scan The next step is to find the channel for the [...]]]></description>
			<content:encoded><![CDATA[<p>A short description about how to use a Nokia E65 as a GPRS modem in Ubuntu 8.04.<span id="more-291"></span></p>
<p>Install the needed software packages:</p>
<blockquote><p>sudo apt-get install bluez bluez-utils wvdial</p></blockquote>
<p>Enable bluetooth on your phone, scan for it and copy the address for your phone.</p>
<blockquote><p>hcitool scan</p></blockquote>
<p>The next step is to find the channel for the phone's dialup service. Run</p>
<blockquote><p>sdptool browse xx:xx:xx:xx:xx:xx</p></blockquote>
<p>where xx:xx:xx:xx:xx:xx is the address found in the previous step. Look for "Service Name: Dial-Up Networking", and note the channel number.</p>
<p>The phone now has to be bound as a rfcomm device, which is configured in /etc/bluetooth/rfcomm.conf. Add </p>
<blockquote><p>rfcomm4 { bind yes; device  xx:xx:xx:xx:xx:xx; channel 2; comment "Serial Port"; } </p></blockquote>
<p> to the file with the numbers found above.</p>
<p>Now make a configuration file for wvdial</p>
<blockquote><p>sudo gedit /etc/wvdial.conf</p></blockquote>
<p>with this content:</p>
<blockquote><p>[Dialer Defaults]<br />
Modem = /dev/rfcomm4<br />
Baud = 115200<br />
Init1 = ATZ<br />
Init2 = ATQ0 V1 E1 S0=0 &#038;C1 &#038;D2 +FCLASS=0<br />
Init3 = ATM0<br />
Init5 = AT+CGDCONT=1,"IP","internet"<br />
ISDN = 0<br />
Modem Type = Analog Modem<br />
Phone = *99***1#<br />
Username = foo<br />
Password = bar</p></blockquote>
<p>Thats it. I use the commands below to start the connection. First shut down wlan0, which should not be necessary, but sometimes DNS won't work if wlan0 is searching for access points. I restart bluetooth in order to make sure the phone is bound, and finally, I run wvdial to start the connection.</p>
<blockquote><p>sudo ifconfig wlan0 down<br />
sudo /etc/init.d/bluetooth restart<br />
sudo wvdial</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/04/19/use-nokia-e65-as-gprs-modem-in-ubuntu-804/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Split LVM volume into two, Ubuntu Ibex 8.10</title>
		<link>http://ostehamster.dk/blog/index.php/2009/01/31/split-lvm-volume-into-two-ubuntu-ibex-810/</link>
		<comments>http://ostehamster.dk/blog/index.php/2009/01/31/split-lvm-volume-into-two-ubuntu-ibex-810/#comments</comments>
		<pubDate>Sat, 31 Jan 2009 01:14:48 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[Ibex]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[LVM]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/?p=216</guid>
		<description><![CDATA[This worked for me, but use the "how to-guide" at your own risk!!!! I can not be held responsible for any data loss - take backup!!! A standard Ubuntu installation with encrypted hard drive will give you a boot partition and a LVM partition with two logical volumes. If your computer name is “Ubuntu”, the [...]]]></description>
			<content:encoded><![CDATA[<p><strong>This worked for me, but use the "how to-guide" at your own risk!!!! I can not be held responsible for any data loss - take backup!!!</strong></p>
<p>A standard Ubuntu installation with encrypted hard drive will give you a boot partition and a LVM partition with two logical volumes. If your computer name is “Ubuntu”, the volume group will typically be called Ubuntu, with two volumes: root and swap.</p>
<p>In order to make a logical volume for /home and for /, do the following:<span id="more-216"></span></p>
<p>Start by booting onto the alternative version of the Ubuntu cd - the one without LiveCD - and select rescue. The system will automatically find you encrypted and ask for the password. When starting the terminal, you will have to mount a partition - select your boot partition, on my computer /dev/sda1</p>
<p>Make all volume groups active:</p>
<blockquote><p>sudo lvm vgchange -a y</p></blockquote>
<p>Run disk check on the volume:</p>
<blockquote><p>sudo e2fsck -f /dev/mapper/ubuntu-root</p></blockquote>
<p>Resize the file system to 10G</p>
<blockquote><p>sudo resize2fs -f /dev/mapper/ubuntu-root 10G</p></blockquote>
<p>Wait... make some coffee... maybe even bake a cake, there is time enough :)</p>
<p>Resize the volume to 10G</p>
<blockquote><p>sudo lvreduce -L10G /dev/mapper/ubuntu-root 10G</p></blockquote>
<p><strong>Important: you have to shrink the file system before the logical volume!</strong></p>
<p>Display how much free space the LVM group has, the first number is free "extents" and the second is in GB, MB etc.</p>
<blockquote><p>sudo vgdisplay | grep Free</p></blockquote>
<p>Create the new volume, -l specify the size in extens, -L in GB, MB etc.</p>
<blockquote><p>sudo lvcreate -l 50 -n home ubuntu</p></blockquote>
<p>Make the file system</p>
<blockquote><p>sudo mke2fs -j /dev/ubuntu/home</p></blockquote>
<blockquote><p>sudo vol_id /dev/mapper/ubuntu-home | grep ID_FS_UUID=</p></blockquote>
<p> will give the UUID for the "device", which can be used in /etc/fstab like:</p>
<blockquote><p># /dev/mapper/ubuntu-home<br />
UUID=37563b54-50e5-486c-8796-2df55598fb63 /home           ext3    relatime        0       2</p></blockquote>
<p>Of cause you will have to move all data from /home to the new volume, before mounting it at home!</p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2009/01/31/split-lvm-volume-into-two-ubuntu-ibex-810/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trac from SVN on Ubuntu 8.04 Hardy</title>
		<link>http://ostehamster.dk/blog/index.php/2008/04/23/trac-from-svn-on-ubuntu-804-hardy/</link>
		<comments>http://ostehamster.dk/blog/index.php/2008/04/23/trac-from-svn-on-ubuntu-804-hardy/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 07:23:40 +0000</pubDate>
		<dc:creator>Christoffer Kjølbæk</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Hardy]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Howto]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[Trac]]></category>

		<guid isPermaLink="false">http://ostehamster.dk/blog/index.php/2008/04/23/trac-from-svn-on-ubuntu-804-hardy/</guid>
		<description><![CDATA[svn co https://svn.edgewall.org/repos/trac/trunk trac sudo apt-get install python-setuptools sudo apt-get install python-subversion subversion python-pysqlite2 python-clearsilver sudo python2.5 ./setup.py install sudo mkdir /var/lib/svn/NAME sudo trac-admin /var/lib/trac/NAME initenv sudo trac-admin /var/lib/trac/NAME permission add USERNAME TRAC_ADMIN sudo chown -R www-data /var/lib/trac/ sudo chown -R www-data /var/lib/svn/ Use the admin tool on the webpage to setup rights. Apache2 setup: [...]]]></description>
			<content:encoded><![CDATA[<p><code><br />
svn co https://svn.edgewall.org/repos/trac/trunk trac<br />
sudo apt-get install python-setuptools<br />
sudo apt-get install python-subversion subversion python-pysqlite2 python-clearsilver<br />
sudo python2.5 ./setup.py install<br />
</code></p>
<p><code><br />
sudo mkdir /var/lib/svn/NAME<br />
sudo trac-admin /var/lib/trac/NAME initenv<br />
sudo trac-admin /var/lib/trac/NAME permission add USERNAME TRAC_ADMIN<br />
sudo chown -R www-data /var/lib/trac/<br />
sudo chown -R www-data /var/lib/svn/<br />
</code></p>
<p>Use the admin tool on the webpage to setup rights.</p>
<p>Apache2 setup:<br />
<code><br />
 # Trac support<br />
&lt;location /trac&gt;<br />
   AuthType Basic<br />
   AuthName "Trac"<br />
   AuthUserFile /etc/apache2/dav_svn.passwd<br />
   Require valid-user</p>
<p>   SetHandler mod_python<br />
   PythonHandler trac.web.modpython_frontend<br />
   PythonOption TracEnvParentDir /var/lib/trac<br />
   PythonOption TracUriRoot "/trac"<br />
&lt;/location&gt;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://ostehamster.dk/blog/index.php/2008/04/23/trac-from-svn-on-ubuntu-804-hardy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

