<?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>Vegard Hammerseth &#187; Tutorial</title>
	<atom:link href="http://vegard.hammerseth.com/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://vegard.hammerseth.com</link>
	<description>Geekness by remote</description>
	<lastBuildDate>Sat, 04 Feb 2012 16:31:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Ubuntu 9.04 on MacBookPro5,3</title>
		<link>http://vegard.hammerseth.com/2009/08/ubuntu-904-on-macbookpro53/</link>
		<comments>http://vegard.hammerseth.com/2009/08/ubuntu-904-on-macbookpro53/#comments</comments>
		<pubDate>Thu, 20 Aug 2009 20:56:30 +0000</pubDate>
		<dc:creator>Vegard</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[GNU/Linux]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Open source]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[5.3]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[jackalope]]></category>
		<category><![CDATA[januty]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[macbookpro]]></category>
		<category><![CDATA[manual]]></category>
		<category><![CDATA[mbp]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://vegard.hammerseth.com/?p=521</guid>
		<description><![CDATA[How I installed Ubuntu Jaunty Jackalope 9.04 on my MacBook Pro 5,3. After you have installed Ubuntu on your MBP and connected to internet. We need to add some lines in sources.list to be able to get special packages developed for apple products. WARNING: be carefull with all the &#8221; when pasting, they tend to [...]]]></description>
			<content:encoded><![CDATA[<p>How I installed Ubuntu Jaunty Jackalope 9.04 on my MacBook Pro 5,3.</p>
<p>After you have installed Ubuntu on your MBP and connected to internet. We need to add some lines in sources.list to be able to get special packages developed for apple products.</p>
<p><strong>WARNING: be carefull with all the &#8221; when pasting, they tend to change into a similar sign!</strong></p>
<p><strong>Update</strong><br />
<code>echo deb http://ppa.launchpad.net/mactel-support/ubuntu jaunty main | sudo tee -a /etc/apt/sources.list<br />
echo deb-src http://ppa.launchpad.net/mactel-support/ubuntu jaunty main | sudo tee -a /etc/apt/sources.list<br />
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 7A6BC20C4FE04DADD10837608DB7F87A2B97B7B8 (DONT WORK)</code></p>
<p><code>sudo apt-get update<br />
sudo apt-get upgrade<br />
</code></p>
<p>REBOOT (recommended)</p>
<p><strong>Get hardware packages</strong><br />
<code>sudo apt-get install mbp-nvidia-bl-dkms applesmc-dkms hal-applesmc bcm5974-dkms lm-sensors</code></p>
<p>Reboot if you want it to work right away or just continue below.</p>
<p><strong>Keyboard</strong><br />
<a href="https://help.ubuntu.com/community/AppleKeyboard">Apple keyboard</a> backlight and Fn-keys should now work.<br />
If you want to change the fn-usage buttons.</p>
<p><code>echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf<br />
sudo update-initramfs -u </code></p>
<p>I like to use gnome-do and usually use the Menu key for this. You will be prompted for next login, make sure you load the file.<br />
Add this to ~/.xmodmaprc<br />
<code>keycode 252 = Super_R<br />
echo keysym Super_R = Menu<br />
keycode 49 = apostrophe</code></p>
<p>If you`re having problems getting the $ or brackets (and more) we need to do edit your keyboard layout. Go to Gnome menu -&gt; preferences -&gt; keyboard -&gt; layout and change keyboard model to apple and make sure you have the right layout selected.</p>
<p><strong>Sensors</strong><br />
For using sensors and fans we need to load apple modules:</p>
<p><code>echo coretemp | sudo tee -a /etc/modules<br />
echo applesmc | sudo tee -a /etc/modules</code></p>
<p>Reboot (optional).</p>
<p><strong>Caps lock</strong><br />
By default the green caps-lock does not work. ItÂ´s a easy fix.</p>
<p><code>sudo apt-get remove mouseemu</code></p>
<p><strong>Monitor</strong><br />
If you don`t like the way your MBP auto dim your screen, you can disable it.</p>
<p><code>gconftool -s /apps/gnome-power-manager/ambient/enable -t bool false</code></p>
<p><strong>Touchpad</strong><br />
To get multitouch we need to do a little trick.</p>
<p><code>echo bcm5974 | sudo tee -a /etc/modules<br />
echo usbhid | sudo tee -a /etc/modules<br />
echo blacklist usbhid | sudo tee -a /etc/modprobe.d/blacklist.conf</code></p>
<p>Open /etc/hal/fdi/policy/x11-synaptics-bcm5974.fdi and paste.<br />
<code>sudo gedit /etc/hal/fdi/policy/x11-synaptics-bcm5974.fdi</code></p>
<pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
&lt;deviceinfo version="0.2"&gt;
 &lt;device&gt;
  &lt;match key="info.capabilities" contains="input.touchpad"&gt;
   &lt;match key="info.product" contains="bcm5974"&gt;
   &lt;merge key="appledevice" type="bool"&gt;true&lt;/merge&gt;
   &lt;/match&gt;

   &lt;match key="appledevice" bool="true"&gt;
        &lt;merge key="input.x11_driver" type="string"&gt;synaptics&lt;/merge&gt;
        &lt;merge key="input.x11_options.SHMConfig" type="string"&gt;1&lt;/merge&gt;

        &lt;merge key="input.x11_options.FingerLow" type="string"&gt;40&lt;/merge&gt;
        &lt;merge key="input.x11_options.FingerHigh" type="string"&gt;70&lt;/merge&gt;
        &lt;merge key="input.x11_options.ClickFinger1" type="string"&gt;1&lt;/merge&gt;
        &lt;merge key="input.x11_options.ClickFinger2" type="string"&gt;3&lt;/merge&gt;
        &lt;merge key="input.x11_options.ClickFinger3" type="string"&gt;2&lt;/merge&gt;
        &lt;merge key="input.x11_options.TapButton1" type="string"&gt;1&lt;/merge&gt;
        &lt;merge key="input.x11_options.TapButton2" type="string"&gt;3&lt;/merge&gt;
        &lt;merge key="input.x11_options.TapButton3" type="string"&gt;2&lt;/merge&gt;

        &lt;merge key="input.x11_options.VertEdgeScroll" type="string"&gt;false&lt;/merge&gt;
        &lt;merge key="input.x11_options.HorizEdgeScroll" type="string"&gt;false&lt;/merge&gt;
        &lt;merge key="input.x11_options.VertTwoFingerScroll" type="string"&gt;1&lt;/merge&gt;
        &lt;merge key="input.x11_options.HorizTwoFingerScroll" type="string"&gt;1&lt;/merge&gt;

        &lt;merge key="input.x11_options.MinSpeed" type="string"&gt;0.5&lt;/merge&gt;
        &lt;merge key="input.x11_options.MaxSpeed" type="string"&gt;2.5&lt;/merge&gt;
        &lt;merge key="input.x11_options.AccelFactor" type="string"&gt;0.15&lt;/merge&gt;

        &lt;merge key="input.x11_options.PalmDetect" type="string"&gt;0&lt;/merge&gt;
        &lt;merge key="input.x11_options.PalmMinWidth" type="string"&gt;25&lt;/merge&gt;
        &lt;merge key="input.x11_options.PalmMinZ" type="string"&gt;250&lt;/merge&gt;
   &lt;/match&gt;
  &lt;/match&gt;
 &lt;/device&gt;
&lt;/deviceinfo&gt;</code></pre>
<p>Reboot (optional).</p>
<p><strong>Sound</strong><br />
Follow this recipe and your sound should work.</p>
<p><code><br />
sudo apt-get install linux-headers-generic linux-image-generic linux-restricted-modules-generic<br />
wget ftp://ftp.kernel.org/pub/linux/kernel/people/tiwai/snapshot/alsa-driver-unstable-snapshot.tar.gz<br />
tar xf alsa-driver-unstable-snapshot.tar.gz<br />
cd alsa-driver-unstable<br />
sudo ./configure --enable-dynamic-minors --with-cards="hda-intel" --with-oss<br />
sudo make<br />
sudo make install<br />
cd ..<br />
sudo rm -rf alsa-driver-unstable alsa-driver-unstable-snapshot.tar.gz</code></p>
<p>REBOOT (recommended)</p>
<p>Now, donÂ´t forget to unmute sound channels.</p>
<p>If youÂ´d want a automatic fan program, I wrote one in bash. It requires lm-sensors (installed above) to work. I will write it in C some day.<br />
<code>#!/bin/bash</code></p>
<p><code># we don`t want to go all the way up to critiacal temp, safe_temp is substracted from critical temp<br />
SAFE_TEMP=10</code></p>
<p><code> </code></p>
<p><code># AUTOMATIC VALUES BELOW, DON`T EDIT</p>
<p># CPU critical temp<br />
CPU_CRIT=`cat /sys/devices/platform/coretemp.0/temp1_crit`</p>
<p># FAN SPEED<br />
FAN1_SPEED_MIN=`cat /sys/devices/platform/applesmc.768/fan1_min`<br />
FAN1_SPEED_MAX=`cat /sys/devices/platform/applesmc.768/fan1_max`<br />
FAN2_SPEED_MIN=`cat /sys/devices/platform/applesmc.768/fan2_min`<br />
FAN2_SPEED_MAX=`cat /sys/devices/platform/applesmc.768/fan2_max`<br />
CPU_CRIT=`expr "(" "$CPU_CRIT" "/" 1000 ")" "-" "$SAFE_TEMP"`</p>
<p>echo 1 &gt; /sys/devices/platform/applesmc.768/fan1_manual<br />
echo 1 &gt; /sys/devices/platform/applesmc.768/fan2_manual</p>
<p># dynamic values<br />
while [ 1 ]; do</p>
<p># CPU TEMPS<br />
CPU_TEMP0=`cat /sys/devices/platform/coretemp.0/temp1_input`<br />
CPU_TEMP1=`cat /sys/devices/platform/coretemp.1/temp1_input`<br />
CPU_TEMP=`expr "(" $CPU_TEMP0 + $CPU_TEMP1 ")" "/" 2000`</p>
<p># calculate<br />
FAN_SPEED=`expr "(" $CPU_TEMP "-" 34 ")" "*" 200`</p>
<p># if CPU reaches critical - SAFE_TEMP, shut off<br />
if [ "$CPU_TEMP" -gt "$CPU_CRIT" ]; then<br />
shutdown -h now<br />
fi</p>
<p># don`t go below min limit<br />
if [ "$FAN_SPEED" -le "$FAN1_SPEED_MIN" ]; then<br />
FAN_SPEED=$FAN1_SPEED_MIN;<br />
fi</p>
<p># don`t go above max limit<br />
if [ "$FAN_SPEED" -gt "$FAN1_SPEED_MAX" ]; then<br />
FAN_SPEED=$FAN1_SPEED_MAX;<br />
fi</p>
<p># only write if speed has changed<br />
if [ "$FAN_SPEED" != "$FAN_SPEED_OLD" ]; then<br />
#echo $CPU_TEMP $FAN_SPEED<br />
echo $FAN_SPEED &gt; /sys/devices/platform/applesmc.768/fan1_output<br />
echo $FAN_SPEED &gt; /sys/devices/platform/applesmc.768/fan2_output<br />
fi</p>
<p># store old speed<br />
FAN_SPEED_OLD=$FAN_SPEED;</p>
<p></code></p>
<p><code>sleep 5<br />
done<br />
</code></p>
<p><strong>Pommed</strong><br />
If you would like to install pommed on this machine at this time we have to modify pommed. I have notified creator of pommed about macbook5,3 support. If you have version above 1.27 you can skip this how to.</p>
<p><code>wget https://alioth.debian.org/frs/download.php/3084/pommed-1.27.tar.gz<br />
tar zxf pommed-1.27.tar.gz<br />
cd pommed-1.27/pommed/<br />
pico pommed-mpb5,3.patch</code></p>
<p>Then paste following.<br />
<code>--- pommed.c-old	2009-08-22 20:23:21.796989322 +0200<br />
+++ pommed.c	2009-08-22 20:22:42.270020918 +0200<br />
@@ -677,6 +677,7 @@<br />
* MacBook Pro 13" (June 2009) */<br />
else if ((strcmp(buf, "MacBookPro5,1") == 0)<br />
|| (strcmp(buf, "MacBookPro5,2") == 0)<br />
+           || (strcmp(buf, "MacBookPro5,3") == 0)<br />
|| (strcmp(buf, "MacBookPro5,5") == 0))<br />
ret = MACHINE_MACBOOKPRO_5;<br />
/* Core Duo MacBook (May 2006) */<br />
</code></p>
<p>Now apply the patch<br />
<code>patch -p0 &lt; pommed-mpb5,3.patch</code></p>
<p>Install required packages<br />
<code>sudo apt-get install pommed libdbus-1-dev libalsa-ocaml-dev libaudiofile-dev libconfuse-dev libpci-dev</code></p>
<p>Compile<br />
<code>cd ..<br />
make pommed<br />
sudo cp pommed/pommed /usr/sbin/pommed<br />
</code></p>
<p>Reboot.</p>
<p>Read additional info <a href="https://help.ubuntu.com/community/MacBookPro5-1_5-2/Jaunty">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://vegard.hammerseth.com/2009/08/ubuntu-904-on-macbookpro53/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#039;s make a needle shooter in 5 minutes</title>
		<link>http://vegard.hammerseth.com/2009/02/lets-make-a-needle-shooter-in-5-minutes/</link>
		<comments>http://vegard.hammerseth.com/2009/02/lets-make-a-needle-shooter-in-5-minutes/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 21:46:31 +0000</pubDate>
		<dc:creator>Vegard</dc:creator>
				<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[clothing peg]]></category>
		<category><![CDATA[guide]]></category>
		<category><![CDATA[gun]]></category>
		<category><![CDATA[klesklype]]></category>
		<category><![CDATA[klesklypepistol]]></category>
		<category><![CDATA[needle]]></category>
		<category><![CDATA[toothpick]]></category>
		<category><![CDATA[weapon]]></category>

		<guid isPermaLink="false">http://vegard.hammerseth.com/?p=361</guid>
		<description><![CDATA[Guide on how to make a needle shooting peg gun. The author of this tutorial can not be hold responsibility for any harm this weapon might cause on anything or any one. Use with caution. As a child I was able to make my self a neat gun which could fire over 5 meters and [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Guide on how to make a needle shooting peg gun. The author of this tutorial can not be hold responsibility for any harm this weapon might cause on anything or any one. Use with caution.</strong></p>
<p>As a child I was able to make my self a neat gun which could fire over 5 meters and still being cheap and cool. Now I will share how I made it before I completly forget it.</p>
<p>To complete this tutorial you&#8217;ll need the following</p>
<ul>
<li>wooden clothing peg (check first image)</li>
<li>rubber band</li>
<li>small saw or you can just break of the first part</li>
<li>needle, toothpick, match or something similar for ammunition</li>
</ul>
<p><strong>1. Split your peg.</strong></p>
<p><a href="http://lh6.ggpht.com/_kHz6hsl_gy8/SZsT3YKdweI/AAAAAAAABuk/di1ZmO9FPsc/s640/2.%20splitted%20clothing%20peg.jpg"><img class="alignleft" title="Enlarge" src="http://lh5.ggpht.com/_kHz6hsl_gy8/SZsT2y4aOwI/AAAAAAAABuc/QnaGa_IFzl8/s640/1.%20clothing%20peg.jpg" alt="" width="344" height="257" /> <img class="alignnone" title="Enlarge" src="http://lh6.ggpht.com/_kHz6hsl_gy8/SZsT3YKdweI/AAAAAAAABuk/di1ZmO9FPsc/s640/2.%20splitted%20clothing%20peg.jpg" alt="" width="343" height="256" /></a></p>
<p><strong>2. Saw and grind.</strong></p>
<p>Gently saw the parts off and keep the biggest part. You only want to do this to one of the pieces. If you don&#8217;t have a saw it&#8217;ll do just breaking off the larger piece and forget about the small at the back (upper in picture below).</p>
<p>The piece you haven&#8217;t touched now needs some grinding where the spring is going to be sitting. Make sure you make enough room for the spring to securely stay in it&#8217;s place (check step 3).</p>
<p><a href="http://lh6.ggpht.com/_kHz6hsl_gy8/SZsT311f6QI/AAAAAAAABus/w3miitzYz34/s640/3.%20clothing%20peg%20sawed.jpg"><img class="alignleft" title="Enlarge" src="http://lh6.ggpht.com/_kHz6hsl_gy8/SZsT311f6QI/AAAAAAAABus/w3miitzYz34/s640/3.%20clothing%20peg%20sawed.jpg" alt="" width="347" height="260" /></a><a href="http://lh3.ggpht.com/_kHz6hsl_gy8/SZsT4Z3ymNI/AAAAAAAABu0/c1apxT9qFKw/s640/4.%20clothing%20peg%20grinded.jpg"><img class="alignnone" title="Enlarge" src="http://lh3.ggpht.com/_kHz6hsl_gy8/SZsT4Z3ymNI/AAAAAAAABu0/c1apxT9qFKw/s640/4.%20clothing%20peg%20grinded.jpg" alt="" width="345" height="258" /></a></p>
<p><strong>3. Put it together.</strong></p>
<p>Put the spring back on the biggest piece you just grined and mount the upper piece (now refereed to as the re-loader) with a rubber band. Please do use a smaller rubber. I didn&#8217;t have any other band when making this tutorial. Make sure the re-loader is not to tight mounted, this will cause the projectile to eject slower and shoot shorter.</p>
<p><a href="http://lh4.ggpht.com/_kHz6hsl_gy8/SZsVHjFKpJI/AAAAAAAABvI/mPU65NHsN9g/s640/6.%20clothing%20peg%20loader%20mounted.jpg"><img class="alignleft" title="Enlarge" src="http://lh5.ggpht.com/_kHz6hsl_gy8/SZsT4tdnL_I/AAAAAAAABu8/PD-q-CY6Lmo/s640/5.%20clothing%20gun%20sprint%20mounted.jpg" alt="" width="348" height="260" /><img class="alignnone" title="Enlarge" src="http://lh4.ggpht.com/_kHz6hsl_gy8/SZsVHjFKpJI/AAAAAAAABvI/mPU65NHsN9g/s640/6.%20clothing%20peg%20loader%20mounted.jpg" alt="" width="343" height="257" /></a></p>
<p><strong>4. Re-loading and arming.</strong></p>
<p>Pull the re-loader forward until you hit the spring. Pull the re-loader down and backwards until the spring is locked in it&#8217;s position. Now arm your weapon with desired ammunition.</p>
<p><a href="http://lh4.ggpht.com/_kHz6hsl_gy8/SZsVIOL4NVI/AAAAAAAABvQ/jKIH23VzJ6U/s640/7.%20clothing%20peg%20loading.jpg"><img class="alignleft" title="Enlarge" src="http://lh4.ggpht.com/_kHz6hsl_gy8/SZsVIOL4NVI/AAAAAAAABvQ/jKIH23VzJ6U/s640/7.%20clothing%20peg%20loading.jpg" alt="" width="345" height="259" /></a><a href="http://lh3.ggpht.com/_kHz6hsl_gy8/SZsVJWdWKGI/AAAAAAAABvg/ZTEH4ncs8jA/s640/9.%20clothing%20peg%20armed.jpg"><img class="alignnone" title="Enlarge" src="http://lh3.ggpht.com/_kHz6hsl_gy8/SZsVJWdWKGI/AAAAAAAABvg/ZTEH4ncs8jA/s640/9.%20clothing%20peg%20armed.jpg" alt="" width="345" height="256" /></a></p>
<p><strong>Troubleshoot</strong></p>
<ul>
<li>If the spring is stuck in arming position, you may have to grind it&#8217;s lock-hole a bit.</li>
<li>If above dosen&#8217;t work because the spring is slipping from it&#8217;s place underneath the gun, you didn&#8217;t grind a good enough room for it.</li>
<li>When your spring is going back inside the re-loader when fireing, you didn&#8217;t saw off enough at the end of it. Grind off some more.</li>
</ul>
<p>Again; use with caution. Do not aim at any human, animals or like. This is not a toy.</p>
]]></content:encoded>
			<wfw:commentRss>http://vegard.hammerseth.com/2009/02/lets-make-a-needle-shooter-in-5-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

