<?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>The Java Hacker - Peter Jaric's Blog</title>
	<atom:link href="http://javahacker.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://javahacker.com</link>
	<description>My name is Peter Jaric and I am a programmer. Here I will try to share what I happen to know.</description>
	<lastBuildDate>Thu, 13 May 2010 19:15:39 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>&#8220;Connection problem or invalid MMI code&#8221; on Android phone</title>
		<link>http://javahacker.com/?p=367</link>
		<comments>http://javahacker.com/?p=367#comments</comments>
		<pubDate>Mon, 19 Apr 2010 11:48:04 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=367</guid>
		<description><![CDATA[We have got a new cell phone operator at work and one of their features is that if you prefix a number with the code *150# the call will be charged to a separate bill that will be sent to the employee and not to the employer. This is quite common in Sweden and is [...]]]></description>
			<content:encoded><![CDATA[<p>We have got a <a href="http://www.ventelo.se/">new cell phone operator</a> at work and one of their features is that if you prefix a number with the code *150# the call will be charged to a separate bill that will be sent to the employee and not to the employer. This is quite common in Sweden and is of course a good thing, but <a href="http://code.google.com/p/android/issues/detail?id=2226">it doesn&#8217;t work on Android (pre 2.1)</a>. I use an HTC Tattoo and get this message when calling for example *150#0123456789:</p>
<blockquote><p>Connection problem or invalid MMI code</p></blockquote>
<p>In the thread I linked to above, there is a workaround: put a plus sign (+) before the first digit, like so: *+150#0123456789. This gets rid of the error message and allows the call to go through. The number that is called according to the phone has no plus in it: *150#0123456789</p>
<p>Let&#8217;s hope this works. Otherwise I might get a call from my boss later on :)</p>
<p><strong>Update:</strong><br />
I mailed Ventelo&#8217;s (the operator) support and received this positive answer (translated by me):</p>
<blockquote><p>Yes, using *+150# will work as well.</p></blockquote>
<p>Good news, in other words!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D367&amp;linkname=%26%238220%3BConnection%20problem%20or%20invalid%20MMI%20code%26%238221%3B%20on%20Android%20phone"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=367</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Aardvark and answers that do not answer the question</title>
		<link>http://javahacker.com/?p=360</link>
		<comments>http://javahacker.com/?p=360#comments</comments>
		<pubDate>Tue, 23 Feb 2010 10:47:02 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Thoughts]]></category>
		<category><![CDATA[aardvark]]></category>
		<category><![CDATA[google]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=360</guid>
		<description><![CDATA[Recently Google announced that they have acquired Aardvark, a service that finds the right person to answer any question you might have. I&#8217;ve used it frequently for a little while, and while I think it is a very cool idea and answering questions is quite addictive, I think there is a problem with the quality [...]]]></description>
			<content:encoded><![CDATA[<p>Recently <a href="http://googleblog.blogspot.com/2010/02/google-acquires-aardvark.html">Google announced</a> that they have acquired <a href="http://vark.com/s/81y9">Aardvark</a>, a service that finds the right person to answer any question you might have. I&#8217;ve used it frequently for a little while, and while I think it is a very cool idea and answering questions is quite addictive, I think there is a problem with the quality of the answers to my questions.</p>
<p>It is very common to get answers from people who really do not know the correct answer, but use Google to find something related to the question. I understand that, because it is very tempting to try to answer as many questions as possible, but it isn&#8217;t very helpful in the end, because there might be someone more qualified to answer out there.</p>
<p>To raise the quality of answers to my questions I will try to include something in my questions to make casual answerers avoid them. I am thinking of a good phrasing to not sound too arrogant but at the same time fulfill my goal. I think I&#8217;ll try something along the lines of &#8220;Please only answer if you really do know the answer to this specific question! I have already googled for answers myself. Thanks!!!&#8221;</p>
<p>I wonder if that will work or if I from now on will get no answers at all :)</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D360&amp;linkname=Aardvark%20and%20answers%20that%20do%20not%20answer%20the%20question"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=360</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Matching combined results in jQuery &#8211; ordered correctly</title>
		<link>http://javahacker.com/?p=342</link>
		<comments>http://javahacker.com/?p=342#comments</comments>
		<pubDate>Tue, 24 Nov 2009 13:08:42 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jQuery]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=342</guid>
		<description><![CDATA[Today I used the &#8220;selector1, selector2, selectorN&#8221; selector in jQuery and was confused that, in some cases, when looping over the results I got them in the order of the selectors and not in the order of the elements in the page. I had expected it to work as an OR operator. My code looked [...]]]></description>
			<content:encoded><![CDATA[<p>Today I used the <a href="http://docs.jquery.com/Selectors/multiple#selector1selector2selectorN">&#8220;selector1, selector2, selectorN&#8221; selector</a> in jQuery and was confused that, in some cases, when looping over the results I got them in the order of the selectors and not in the order of the elements in the page. I had expected it to work as an OR operator. My code looked like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> headers <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'h1,h2,h3'</span><span style="color: #339933;">,</span> context<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
headers.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>First my function was called for all h1s, then for all h2s, etc, regardless of their ordering in the page. Some googling finally led me to this solution: first find all headers and then <a href="http://docs.jquery.com/Traversing/filter#expr">filter</a> out the ones I need. My first try looked like this:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> headers <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':header'</span><span style="color: #339933;">,</span> context<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'h1,h2,h3'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
headers.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>It didn&#8217;t work, unfortunately. There was no difference. After some reading I finally produced this less elegant but working solution:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> headers <span style="color: #339933;">=</span> $<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">':header'</span><span style="color: #339933;">,</span> context<span style="color: #009900;">&#41;</span>.<span style="color: #660066;">filter</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">return</span> $<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">this</span><span style="color: #009900;">&#41;</span>.<span style="color: #000066; font-weight: bold;">is</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'h1,h2,h3'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
headers.<span style="color: #660066;">each</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>index<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> ... <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This gave the desired result. The &#8220;:headers&#8221; selector was very useful for me this particular time, obviously. It needs to be replaced for the particular set of elements one is looking for of course, and if worst comes to worst, maybe &#8216;*&#8217; is the only solution, even though it probably will have a bad effect on performance.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D342&amp;linkname=Matching%20combined%20results%20in%20jQuery%20%26%238211%3B%20ordered%20correctly"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=342</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New InfoGlue Forum</title>
		<link>http://javahacker.com/?p=335</link>
		<comments>http://javahacker.com/?p=335#comments</comments>
		<pubDate>Wed, 11 Nov 2009 10:22:31 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[infoglue]]></category>
		<category><![CDATA[UU]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=335</guid>
		<description><![CDATA[I have been working with the CMS InfoGlue for a while now and one thing that has been seriously lacking is a large community. To help beginning to build the foundation of a community, I have been pushing for a central official InfoGlue forum  and finally we have got it together.
Please visit the forum [...]]]></description>
			<content:encoded><![CDATA[<p>I have been working with the CMS <a href="http://www.infoglue.org">InfoGlue</a> for a while now and one thing that has been seriously lacking is a large community. To help beginning to build the foundation of a community, I have been pushing for a central official InfoGlue forum  and finally we have got it together.</p>
<p>Please visit <a href="http://www.infoglue.org/forum">the forum</a> for a look at the result. There are very few posts at the moment, but hopefully InfoGlue users will be finding their way there soon!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D335&amp;linkname=New%20InfoGlue%20Forum"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=335</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>EnBil.nu</title>
		<link>http://javahacker.com/?p=330</link>
		<comments>http://javahacker.com/?p=330#comments</comments>
		<pubDate>Tue, 10 Nov 2009 09:51:48 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Friends]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=330</guid>
		<description><![CDATA[My friend Jonatan and his friend Robert released their new site EnBil.nu yesterday! It aggregates most of Sweden&#8217;s car rental sites into one easy-to-use site. With their own words (in Swedish):
Vår förhoppning är att EnBil.nu ska vara den bästa sajten för att söka efter hyrbilar i Sverige, och vi vågar faktiskt påstå att så redan [...]]]></description>
			<content:encoded><![CDATA[<p>My friend Jonatan and his friend Robert released their new site <a href="http://EnBil.nu">EnBil.nu</a> yesterday! It aggregates most of Sweden&#8217;s car rental sites into one easy-to-use site. With their own words (in Swedish):</p>
<blockquote><p>Vår förhoppning är att EnBil.nu ska vara den bästa sajten för att söka efter hyrbilar i Sverige, och vi vågar faktiskt påstå att så redan är fallet. För att göra en sökning anger man datum, tid och en uppskattning av antal mil man kommer köra. EnBil.nu söker sedan hos ett flertal olika biluthyrare, och presenterar resultatet, ordnat efter pris som även inkluderar milkostnader. Än så länge söker vi efter hyrbilar på Statoil, OKQ8 och Europcar.</p></blockquote>
<p>I wish Jonatan and Robert good luck with the new site and I will use it the next time I will be renting a car, that&#8217;s for sure!</p>
<p>Edit: Updated the URL of EnBil.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D330&amp;linkname=EnBil.nu"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=330</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up CrunchBang Linux on an Acer Aspire One with SSD</title>
		<link>http://javahacker.com/?p=309</link>
		<comments>http://javahacker.com/?p=309#comments</comments>
		<pubDate>Mon, 04 May 2009 07:56:11 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[aa1]]></category>
		<category><![CDATA[aspire one]]></category>
		<category><![CDATA[crunchbang]]></category>
		<category><![CDATA[netbook]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=309</guid>
		<description><![CDATA[I have had an Acer Aspire One netbook (AA1) for a while and recently I decided to throw out the bundled Linpus OS and install a more flexible Linux. Linpus has served me quite well, but it has some shortcomings that many other popular distributions do not share.
After some research I decided to try CrunchBang [...]]]></description>
			<content:encoded><![CDATA[<p>I have had an Acer Aspire One netbook (AA1) for a while and recently I decided to throw out the bundled <a href="http://www.linpus.com/">Linpus</a> OS and install a more flexible Linux. Linpus has served me quite well, but it has some shortcomings that many other popular distributions do not share.</p>
<p>After some research I decided to try <a href="http://crunchbanglinux.org">CrunchBang Linux</a>, a Ubuntu based distro that has good reviews over at the <a href="http://www.aspireoneuser.com/forum">Aspire One User forum</a>. Correctly, I must say. It is running on my AA1 and it is so much better than Linpus was.</p>
<p>There is an <a href="http://crunchbanglinux.org/wiki/howto/aspireone">installation guide for CrunchBang on the AA1</a> that I followed, but it&#8217;s for the hard drive version and I have an AA1 with a SSD which requires special consideration. I made a number of other changes too, and I thought I should share them. So this is my brief instruction on setting up CrunchBang on the AA1:</p>
<h2>Instructions</h2>
<ol>
<li> Follow the <a href="http://crunchbanglinux.org/wiki/howto/aspireone">installation guide</a> and be sure to use ext2 for the file system (thanks <a href="http://www.aspireoneuser.com/forum/viewtopic.php?f=28&#038;t=10596&#038;p=85143&#038;hilit=crunchbang#p85422">exwannabe</a>). This requires manual partitioning (do not select guided partioning). Remember to create a swap partition if you have less than 1.5 GB memory (I&#8217;ve read that with 1.5 GB RAM it is possible to do without a swap partition, but don&#8217;t take my word for it).</li>
<li>As mentioned at the end of the installation guide, follow the instructions to <a href="https://help.ubuntu.com/community/AspireOne110L#Reduce%20SSD%20Wear">reduce wear</a> and <a href="https://help.ubuntu.com/community/AspireOne110L#SSD%20Performance">increase performance</a>.</li>
<li>The default logout dialog do not include suspend and hibernate options. This can easily be added with a package with a <a href="http://crunchbanglinux.org/forums/topic/148/new-logout-script-with-hibernate-suspend-options/">modified logout script</a>.</li>
<li>To make the AA1 suspend when the lid is closed, press Super-Space (hold the Home button and press space), select &#8220;Preferences->Screensaver &#038; Power Management&#8221;, click &#8220;Power Management&#8221; and select &#8220;Suspend&#8221; in the drop down to the right of &#8220;When laptop lid is closed&#8221; in the tabs &#8220;On AC Power&#8221; and &#8220;On Battery Power&#8221;. Now is a good time to configure the other power options to your taste.</li>
<li>The default fonts are a little big. To make them smaller, follow these instructions:
<ol>
<li>For widget fonts (menu labels, button labes, etc), press Super-Space, select &#8220;Preferences->User Interface Settings&#8221; and choose a smaller font by pressing the &#8220;Font&#8221; button. I selected &#8220;Sans 6&#8243;.</li>
<li>For window manager fonts, press Super-Space, select &#8220;Preferences->Openbox Config->GUI Config Tool&#8221;, Select the &#8220;Appearance&#8221; tab and configure your fonts by clicking the font buttons. I selected &#8220;Sans 6&#8243; for all fonts here also.</li>
<li>For the terminator (the terminal program in CrunchBang), open $HOME/.config/terminator/config in your favorite text editor (I use emacs) and change the font size. Here I use &#8220;Mono 7&#8243;.</li>
</ol>
</li>
<li>One thing I liked with Linpus was an XFCE feature that let me maximize my windows totally with no decorations (like the window title area) by pressing Alt+F11. To add this feature to CrunchBang, open $HOME/.config/openbox/rc.xml and add this entry after the one with A-F3:

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;keybind</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;A-F11&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ToggleDecorations&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;action</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;ToggleMaximizeFull&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/keybind<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>This will not make the maximized windows cover the panel at the bottom of the screen. It is possible to make the maximized window use this area, but since I haven&#8217;t found out a way to disable the panel always being on top, there is no point in that. </p>
<p>Another small problem with this key binding is that since it works by toggling the two states, a window which is maximized but decorated, will be unmaximized and undecorated by pressing Alt-F11. The solution here is to unmaximize it first and then press Alt-F11. A little clumsy, but it doesn&#8217;t happen all that often.</li>
</ol>
<h2>Surprise</h2>
<p>I think that the default color scheme of CrunchBang looks very cool, but since I prefer black on white over white on black for everyday work, I changed the window manager theme to a light one. Later I was surprised to see that synaptic still used the default theme. It wasn&#8217;t until I ran another program with sudo that I understood. It seems like root uses this theme too and since I always run synaptic sudoed root&#8217;s theme is used.</p>
<h2>Remaining issues</h2>
<p>There is some stuff that I haven&#8217;t fixed yet:</p>
<ol>
<li>I get no on screen indication when I adjust the volume or mute it with the Fn-keys. Similarily I get no indication when I toggle the wifi switch. When changing the screen brightness I get an indication sometimes but not always.</li>
<li>The wifi led is totally dead but I think there are guides for making it work.</li>
<li>When resuming the AA1 after suspending it I get a password prompt. This feels almost totally useless since I use auto-login when starting the computer anyway. I haven&#8217;t found a setting to disable the password prompt yet.</li>
<li>There are probably other programs that have their own font settings. But that&#8217;s mostly a question of configuring as the need arises.</li>
</ol>
<p>Good luck!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D309&amp;linkname=Setting%20up%20CrunchBang%20Linux%20on%20an%20Acer%20Aspire%20One%20with%20SSD"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=309</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Destination: University!</title>
		<link>http://javahacker.com/?p=297</link>
		<comments>http://javahacker.com/?p=297#comments</comments>
		<pubDate>Mon, 23 Mar 2009 08:57:59 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Real Life]]></category>
		<category><![CDATA[UU]]></category>
		<category><![CDATA[work]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=297</guid>
		<description><![CDATA[I&#8217;ve got a new job! From late May I will be working at Uppsala University in the central software development unit.
Uppsala University has launched a project aiming to bring most of the diverse university web sites into one platform. The platform will be an open source CMS called InfoGlue. I will mostly be working with [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a new job! From late May I will be working at <a href="http://www.uu.se/en/">Uppsala University</a> in the central <a href="http://www-hotel.uu.se/webbtjanster/wtu.php">software development</a> unit.</p>
<p>Uppsala University has launched <a href="http://www.universen.uu.se/artiklar.php?id=377&#038;typ=artikel">a project</a> aiming to bring most of the diverse university web sites into one platform. The platform will be an open source CMS called <a href="http://www.infoglue.org">InfoGlue</a>. I will mostly be working with implementing web components for InfoGlue.</p>
<p>I am looking forward very much to this, but at the same time it is kind of sad to leave my current colleagues. Since I live in Uppsala and will not have to commute by train to Kista, Stockholm, the decision was easy, though.</p>
<p>(Three virtual points to anyone who caught the SF reference&#8230;)</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D297&amp;linkname=Destination%3A%20University%21"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=297</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get rid of a graphics problem in Ubuntu on Thinkpad A21P</title>
		<link>http://javahacker.com/?p=280</link>
		<comments>http://javahacker.com/?p=280#comments</comments>
		<pubDate>Mon, 23 Mar 2009 07:36:10 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[X]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=280</guid>
		<description><![CDATA[I wanted to see if an old IBM Thinkpad A21P could be put to use and installed Ubuntu (9.10) on it. The installation went well, but when X started and displayed the login screen, the graphics were messed up.
Some googling finally solved this, but since I had to collect information from several sources, I thought [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to see if an old IBM Thinkpad A21P could be put to use and installed Ubuntu (9.10) on it. The installation went well, but when X started and displayed the login screen, the graphics were messed up.</p>
<p>Some googling finally solved this, but since I had to collect information from several sources, I thought I should sum it up in one post.</p>
<p>The problem is a <a href="https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/28898">known bug</a>, and there even is a fix for the problem in the bug report, provided by <a href="https://bugs.launchpad.net/~dlongwing">Longwing</a>. Add these lines to your xorg.conf file in the appropriate place (the Monitor section):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">HorizSync 31-77
VertRefresh 50-77
&nbsp;
Modeline &quot;640x480&quot; 27.96 640 656 720 864 480 480 485 501
Modeline &quot;800x600&quot; 43.68 800 816 928 1072 600 600 606 626
Modeline &quot;1024x768&quot; 71.39 1024 1040 1216 1400 768 768 776 802
Modeline &quot;1152x864&quot; 90.48 1152 1168 1384 1568 864 864 873 902
Modeline &quot;1280x960&quot; 111.82 1280 1296 1552 1736 960 960 970 1003
Modeline &quot;1280x1024&quot; 119.28 1280 1296 1552 1736 1024 1024 1035 1070
Modeline &quot;1600x1200&quot; 160.16 1600 1616 1968 2208 1200 1200 1212 1253
Modeline &quot;1600x1200&quot; 167.23 1600 1616 1968 2208 1200 1200 1212 1253</pre></div></div>

<p>This is all very well if you know how to do that. I haven&#8217;t been editing the X configuration files for a while, so I actually had to look it up.</p>
<p>First off, we need an <code>xorg.conf</code> file. It&#8217;s probably located in<code> /etc/X11</code>, if it exists. It didn&#8217;t on my computer, but as I found out, it can be generated. In order to do that, X has to be shut down. Switch to a virtual console by pressing Alt+F1. Log in and <a href="http://www.cyberciti.biz/faq/how-to-stop-xorg-server/">stop gdm</a> (the GNOME Display Manager, it manages the X displays) like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">sudo /etc/init.d/gdm stop</pre></div></div>

<p>Then generate the <a href="http://www.freebsd.org/doc/en/books/handbook/x-config.html">Xorg configuration</a> file like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Xorg -configure</pre></div></div>

<p>This generates a file called <code>xorg.conf.new</code>. Open it in your favourite text editor and add the configuration lines from above to the Monitor section. Save it and then try it out with:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Xorg -config xorg.conf.new</pre></div></div>

<p>This will present a running X session, but it will probably not show anything interesting. We only need to check that the graphics problem is gone. You can easily exit the session by pressing Ctrl+Alt+Backspace. X should run nice now, but you need to make this change permanent by copying the configuration file to the correct place:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">sudo cp xorg.conf.new /etc/X11/xorg.conf</pre></div></div>

<p>Now just start gdm again and everything should be fine:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">sudo /etc/init.d/gdm start</pre></div></div>

<p>Hopefully this can help someone :)</p>
<p><strong>Edit</strong>: added some clarification.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D280&amp;linkname=Get%20rid%20of%20a%20graphics%20problem%20in%20Ubuntu%20on%20Thinkpad%20A21P"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=280</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>welcometotheåf Update</title>
		<link>http://javahacker.com/?p=220</link>
		<comments>http://javahacker.com/?p=220#comments</comments>
		<pubDate>Sun, 01 Mar 2009 20:28:30 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Real Life]]></category>
		<category><![CDATA[competition]]></category>
		<category><![CDATA[åf]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=220</guid>
		<description><![CDATA[A while ago I wrote about the welcometothelist event.
ÅF recently put up their own page about it, on which they interview Alexander Bottema.
They also ask Jonatan Heyman, who is my brother-in-law and who took the position before me in the competition, some questions.
]]></description>
			<content:encoded><![CDATA[<p>A while ago I wrote about <a href="http://javahacker.com/?p=147">the welcometothelist event</a>.</p>
<p>ÅF recently put up <a href="http://www.afconsult.com/templates/Page____45057.aspx">their own page about it</a>, on which they interview Alexander Bottema.</p>
<p>They also ask <a href="http://heyman.info">Jonatan Heyman</a>, who is my brother-in-law and who took the position before me in the competition, some questions.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D220&amp;linkname=welcometothe%C3%A5f%20Update"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=220</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to setup Ubuntu under MacOS X on a Macbook with Swedish keyboard (svenskt tangentbord) using VirtualBox</title>
		<link>http://javahacker.com/?p=189</link>
		<comments>http://javahacker.com/?p=189#comments</comments>
		<pubDate>Mon, 23 Feb 2009 09:40:32 +0000</pubDate>
		<dc:creator>Peter Jaric</dc:creator>
				<category><![CDATA[Guest appearance]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[virtualbox]]></category>

		<guid isPermaLink="false">http://javahacker.com/?p=189</guid>
		<description><![CDATA[Today I will present a guest appearance by my friend and colleague Stefan Hellkvist, a fellow programmer and the guy behind the standingonabeach.com photo blog. He will describe how to fix some problems when running Ubuntu as a guest OS in VirtualBox on a Mac OS X host. Over to Stefan:
&#8220;The installation of VirtualBox is [...]]]></description>
			<content:encoded><![CDATA[<p>Today I will present a guest appearance by my friend and colleague <a href="http://hellkvist.org">Stefan Hellkvist</a>, a fellow programmer and the guy behind the <a href="http://standingonabeach.com">standingonabeach.com</a> photo blog. He will describe how to fix some problems when running Ubuntu as a guest OS in <a href="http://www.virtualbox.org/">VirtualBox</a> on a Mac OS X host. Over to Stefan:</p>
<p>&#8220;The installation of VirtualBox is straight forward. You just download it from its website and install it as any other MacOS X application. Then you create your virtual machine, download the latest Ubuntu ISO from its website, boot Ubuntu and install that within VirtualBox.</p>
<p>What you are left with now is a Ubuntu running at 800&#215;600 screen resolution and a not fully working keyboard. Keys such as pipe (|), back-slash (\), at-sign (@) etc are impossible to type even if you set the &#8220;right&#8221; keyboard layout at installation. So it&#8217;s a system not very useful for hacking on unfortunately.</p>
<p>First off &#8211; screen resolution. It turns out that this was fairly easy to solve. You just need to install the Guest Addition tools. </p>
<p><a href="http://javahacker.com/?attachment_id=190" rel="attachment wp-att-190"><img src="http://javahacker.com/wp-content/uploads/2009/02/guestadditiontools-300x187.png" alt="guestadditiontools" title="guestadditiontools" width="300" height="187" class="alignnone size-medium wp-image-190" /></a></p>
<p>When you choose this option in VirtualBox it will place an ISO into your CDROM. All you then need to do is to, on the Ubuntu machine, go into /media/cdrom and type &#8220;sudo sh VBoxLinuxAdditions-x86.run&#8221; if you are using a 32-bit linux (the 64-bit version is there as well). This will install the required kernel modules<br />
so that, after reboot, you shall be able to run ubuntu full-screen on your Macbook.</p>
<p>Secondly &#8211; the Swedish keyboard layout. Partly this is a problem with VirtualBox choosing the apple-key as &#8220;host&#8221;-key &#8211; the key that you switch between the virtual machine and the host with (in this case OS X). This key is normally used for typing these special characters on a Macbook. There are many ways to work around this but one way to make this work is to do two things in Ubuntu.</p>
<p>1) You open up the keyboard setting dialog (System->Preferences->Keyboard)</p>
<p><a href="http://javahacker.com/?attachment_id=199" rel="attachment wp-att-199"><img src="http://javahacker.com/wp-content/uploads/2009/02/keyboardpreferences-269x300.png" alt="keyboardpreferences" title="keyboardpreferences" width="269" height="300" class="alignnone size-medium wp-image-199" /></a></p>
<p>and for Keyboard Model you here select &#8220;Macbook/Macbook Pro&#8221; which is under &#8220;Apple&#8221;</p>
<p>2) Click &#8220;Other options&#8221;</p>
<p><a href="http://javahacker.com/?attachment_id=200" rel="attachment wp-att-200"><img src="http://javahacker.com/wp-content/uploads/2009/02/layoutoptions-300x229.png" alt="layoutoptions" title="layoutoptions" width="300" height="229" class="alignnone size-medium wp-image-200" /></a></p>
<p>and in &#8220;Third level chooser&#8221; you select &#8220;Press right win-key to choose 3rd level&#8221;. Click ok to save these settings.</p>
<p>This will give you similar functionality as when working on a PC keyboard with Swedish characters &#8211; that you have an Alt-Gr key for these special keys. The only thing which I&#8217;ve noticed a bit strange is the placement of the characters for &#8220;<" and ">&#8221; which are in the upper left corner. Otherwise it works more or less as expected given that you cannot use the normal apple-key under Ubuntu.</p>
<p>The one thing that remains is to find some easy way to &#8220;right-click&#8221; under Ubuntu. I&#8217;ve seen a couple of options for this such as having a special button or screen area to switch the click function, or to use the eject key to right-click, but I would like to make the ctrl-click work as you normally use it under Mac.&#8221;</p>
<p>Thank you, Stefan. If someone knows the answer to Stefan&#8217;s remaining issue, please leave a comment here!</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fjavahacker.com%2F%3Fp%3D189&amp;linkname=How%20to%20setup%20Ubuntu%20under%20MacOS%20X%20on%20a%20Macbook%20with%20Swedish%20keyboard%20%28svenskt%20tangentbord%29%20using%20VirtualBox"><img src="http://javahacker.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://javahacker.com/?feed=rss2&amp;p=189</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
