<?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>Aleksander Skjæveland Larsen &#187; instructions</title>
	<atom:link href="http://ogrim.no/tag/instructions/feed/" rel="self" type="application/rss+xml" />
	<link>http://ogrim.no</link>
	<description>This is my personal webpage, where I share the tings I make</description>
	<lastBuildDate>Wed, 16 Nov 2011 20:48:57 +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>Opening Spotify URIs in Spotify Linux Preview from Opera</title>
		<link>http://ogrim.no/2011/11/spotify-uri-linux/</link>
		<comments>http://ogrim.no/2011/11/spotify-uri-linux/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 20:48:05 +0000</pubDate>
		<dc:creator>ogrim</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[instructions]]></category>

		<guid isPermaLink="false">http://ogrim.no/?p=420</guid>
		<description><![CDATA[Using Spotify Linux Preview, I want to open URIs to songs and playlist from Opera &#8211; but it was not working. So here is how you fix it. Stick the following script in a file: Make it executable with &#8216;chmod +x&#8217; Go to Opera preferences by pressing Alt+P or Ctrl+F12, then go to &#8216;Advanced&#8217;, &#8216;Programs&#8217;, [...]]]></description>
			<content:encoded><![CDATA[<p>Using Spotify Linux Preview, I want to open URIs to songs and playlist from Opera &#8211; but it was not working. So here is how you fix it.</p>
<p>Stick the following script in a file:</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh
spotify -u $@
</pre>
<p>Make it executable with &#8216;chmod +x&#8217;</p>
<p>Go to Opera preferences by pressing Alt+P or Ctrl+F12, then go to &#8216;Advanced&#8217;, &#8216;Programs&#8217;, press &#8216;Add&#8217;, in &#8216;Protocol&#8217; enter &#8216;spotify&#8217; and put the path to the script in &#8216;Open with other application&#8217;. Now you can open all the playlists!</p>
]]></content:encoded>
			<wfw:commentRss>http://ogrim.no/2011/11/spotify-uri-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>E-MU 1820 in Debian</title>
		<link>http://ogrim.no/2011/08/e-mu-1820-in-debian/</link>
		<comments>http://ogrim.no/2011/08/e-mu-1820-in-debian/#comments</comments>
		<pubDate>Sun, 28 Aug 2011 09:51:59 +0000</pubDate>
		<dc:creator>ogrim</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[instructions]]></category>

		<guid isPermaLink="false">http://ogrim.no/?p=397</guid>
		<description><![CDATA[As I recently installed Debian on my main workstation, I wanted to make my beloved E-MU 1820 sound card work. The audio quality is much better than the integrated sound card on the motherboard, probably because of better digital-analog converters and more power to drive my headphones. The sound card did not work out of [...]]]></description>
			<content:encoded><![CDATA[<p>As I recently installed Debian on my main workstation, I wanted to make my beloved E-MU 1820 sound card work. The audio quality is much better than the integrated sound card on the motherboard, probably because of better digital-analog converters and more power to drive my headphones. The sound card did not work out of the box, so I had to start poking for data. We can get useful hardware information using lspci.</p>
<pre class="brush: bash; title: ; notranslate">lspci -nn</pre>
<p>This gave a lot of output, so I used grep to find my sound card.</p>
<pre class="brush: bash; title: ; notranslate">lspci -nn | grep Creative</pre>
<p>gave the following:</p>
<pre class="brush: bash; title: ; notranslate">01:09.0 Multimedia audio controller [0401]: Creative Labs SB Audigy [1102:0004] (rev 03)</pre>
<p>Notice the 1102:0004, which is the PCI id. Next I looked it up in Debians device database: <a href="http://wiki.debian.org/DeviceDatabase/PCI">http://wiki.debian.org/DeviceDatabase/PCI</a> Strangely it did not match completely, closest find in the database was 1102:7004. The output led me to search for &#8220;debian 1102:0004&#8243;, which gave just what I needed: a handy guide to compile and install the driver from scratch. Follow the guide and be on your way: <a href="http://wiki.debian.org/snd-emu10k1">http://wiki.debian.org/snd-emu10k1</a> When using sudo, I have to qualify modprobe to /sbin/modprobe. If you are elevated by su, you can call modprobe directly.</p>
<p>Upon completing the guide, I restarted my system and was able to get the sound working by poking around in the Alsa mixer. I had to select the correct hardware and output settings. To change the default card we can modify the alsa.conf or alsa-base.conf (depending on what you have present) in /etc/modprobe.d/</p>
<p>List your sound cards with:</p>
<pre class="brush: bash; title: ; notranslate">cat /proc/asound/modules</pre>
<p>Append alsa.conf / alsa-base.conf with</p>
<pre class="brush: bash; title: ; notranslate">options snd_emu10k1=0</pre>
<p>After rebooting the system, the clock rate had reset from 44.1Khz to 48Khz. This made sound playing erroneously. To fix it, set the clock rate with the following command:</p>
<pre class="brush: bash; title: ; notranslate">amixer -c 1 set 'Clock Internal Rate' 44100</pre>
<p>Notice that -c 1 corresponds to the sound card from /proc/asound/modules. Just add this command to /etc/rc.local to run it upon login. You must add the command before the &#8220;exit 0&#8243;, as this must be the last command in the file. This will ensure that the clock rate is set to 44.1Khz every time you log in.</p>
<p>Lastly, I want to mention a useful tool for poking around with the routing matrix: emutrix. In the end, I did not need this tool to playback audio. However, if you are doing recording, it seems very useful to work out the routing. There are detailed installation instructions here: <a href="http://code.google.com/p/emutrix/wiki/InstallGuide">http://code.google.com/p/emutrix/wiki/InstallGuide</a> Just make sure you check it out from the svn-repo, as the releases does not support multiple sound cards (which every motherboard has this these days (increasingly on graphics card too, through HDMI)).</p>
<p><strong>Update 31th August</strong></p>
<p>Using emutrix, I poked around a bit to fix output to my loudspeakers. Only headphones was working previously. Thanks to emutrix, it was very fast and simple to determine the routing, before writing the commands. I now have this in my rc.local as well:</p>
<pre class="brush: bash; title: ; notranslate">
amixer -c 1 sset 'Dock DAC1 Left' 'DSP 0'
amixer -c 1 sset 'Dock DAC1 Right' 'DSP 1'
amixer -c 1 sset 'Dock DAC2 Left' 'DSP 0'
amixer -c 1 sset 'Dock DAC2 Right' 'DSP 1'
amixer -c 1 sset 'Dock DAC3 Left' 'DSP 0'
amixer -c 1 sset 'Dock DAC3 Right' 'DSP 1'
amixer -c 1 sset 'Dock DAC4 Left' 'DSP 0'
amixer -c 1 sset 'Dock DAC4 Right' 'DSP 1'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ogrim.no/2011/08/e-mu-1820-in-debian/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>stumpwm and cmus (or any other terminal program)</title>
		<link>http://ogrim.no/2011/05/stumpwm-cmus/</link>
		<comments>http://ogrim.no/2011/05/stumpwm-cmus/#comments</comments>
		<pubDate>Tue, 10 May 2011 11:53:48 +0000</pubDate>
		<dc:creator>ogrim</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[instructions]]></category>
		<category><![CDATA[stumpwm]]></category>

		<guid isPermaLink="false">http://ogrim.no/?p=368</guid>
		<description><![CDATA[Update 2nd September 2011: It seems I forgot to write how to configure gnome-terminal to keep the original title. In Profile Preferences go to Title and Command and set When terminal commands set their own titles to Prepend initial title. Stumpwm is an excellent tiling window manager written entirely in Common Lisp. It is fully [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update 2nd September 2011:</strong> It seems I forgot to write how to configure gnome-terminal to keep the original title. In <em>Profile Preferences</em> go to <em>Title and Command</em> and set <em>When terminal commands set their own titles</em> to <em>Prepend initial title</em>.</p>
<p><a href="http://www.nongnu.org/stumpwm/">Stumpwm</a> is an excellent tiling window manager written entirely in Common Lisp. It is fully keyboard driven and hackable to the fullest. The wm is running in it&#8217;s own CLisp REPL, so you can connect with Slime+Emacs and hack directly. It is super easy to customize the wm, simply re-evaluate and you are good to go!</p>
<p><a href="http://cmus.sourceforge.net/">cmus</a> is an equally awesome program I enjoy using, a very efficient music player that runs in a terminal emulator.<br />
<img src="http://ogrim.no/wp-content/uploads/cmus-2.3.0.png" alt="" title="cmus-2.3.0" width="660" height="436" class="aligncenter size-full wp-image-369" /></p>
<p>I wanted to have a keybinding either bringing cmus in focus, or starting it if it isn&#8217;t running. As cmus is running in a terminal emulator, it wasn&#8217;t straight forward how to achieve this. I am using the Gnome Terminal, so this solution will have to be modified to work with other terminals. Of course, the code is added to the <code>.stumpwm</code> file, but you could also just evaluate it to try it out.</p>
<p><code>(defcommand cmus () ()<br />
  "Run or switch to CMus"<br />
  (run-or-raise "gnome-terminal -e cmus -t cmus"<br />
		'(:instance "gnome-terminal" :title "cmus")))</code></p>
<p>Now I just have to bind the command to an appropriate key</p>
<p><code>(define-key *root-map* (kbd "C-p") "cmus")</code></p>
<p>This works because I set the title of the terminal when I launch it. cmus changes the title based on what song is playing, so it will not work without doing this.</p>
]]></content:encoded>
			<wfw:commentRss>http://ogrim.no/2011/05/stumpwm-cmus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop Opera 11 hide URL parameters</title>
		<link>http://ogrim.no/2010/12/stop-opera-11-hide-url-parameters/</link>
		<comments>http://ogrim.no/2010/12/stop-opera-11-hide-url-parameters/#comments</comments>
		<pubDate>Fri, 24 Dec 2010 01:19:00 +0000</pubDate>
		<dc:creator>ogrim</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[instructions]]></category>

		<guid isPermaLink="false">http://ogrim.no/?p=359</guid>
		<description><![CDATA[I love the new version of the Opera web browser. If my memory is correct (it sometimes is) I have been using Opera for about 8 years. They do like to change things up, innovate and think differently. This is often for the better, giving us new and exiting features, for instance the Speed Dial. [...]]]></description>
			<content:encoded><![CDATA[<p>I love the new version of the <a href="http://www.opera.com/">Opera</a> web browser. If my memory is correct (it sometimes is) I have been using Opera for about 8 years. They do like to change things up, innovate and think differently. This is often for the better, giving us new and exiting features, for instance the <a href="http://www.opera.com/browser/tutorials/video/speeddial/">Speed Dial</a>. They changed up a lot of things for version 11, but there is one change I did not like: hiding the URL parameters.</p>
<p>I found a solution for this problem in the opera.beta newsgroup, and it is dead simple: enter &#8220;opera:config#UserPrefs|HideURLParameter&#8221; in the address bar, uncheck the highlighted field and press save in the bottom. Done. Now URLs will not be truncated in the address bar!</p>
]]></content:encoded>
			<wfw:commentRss>http://ogrim.no/2010/12/stop-opera-11-hide-url-parameters/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Suspend problem in Ubuntu 10.10 on ASUS N73JF (and others)</title>
		<link>http://ogrim.no/2010/12/suspend-problem-in-ubuntu-10-10-on-asus-n73jf-and-others/</link>
		<comments>http://ogrim.no/2010/12/suspend-problem-in-ubuntu-10-10-on-asus-n73jf-and-others/#comments</comments>
		<pubDate>Sun, 05 Dec 2010 02:16:27 +0000</pubDate>
		<dc:creator>ogrim</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[computers]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[instructions]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://ogrim.no/?p=348</guid>
		<description><![CDATA[Update 26th August 2011: Solution tested and working with Debian Squeeze (my new main distro). A commenter reported it works on Mint, so I guess it works on most Debian-based distros. Another commenter had success on a Gigabyte motherboard, which is very interesting indeed. After 3.5 years I finally caved in and got a new [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Update 26th August 2011:</strong> <em>Solution tested and working with Debian Squeeze (my new main distro). A commenter reported it works on Mint, so I guess it works on most Debian-based distros. Another commenter had success on a Gigabyte motherboard, which is very interesting indeed.</em></p>
<p>After 3.5 years I finally caved in and got a new laptop. Screen resolution, lagging editors and general sloppyness where the major factors for ditching the old one. I have been quite pleased with the quality on my ASUS eeePC 1015PE, so I decided to go for another ASUS computer. As I am to use this machine for development, I&#8217;d like to have a large screen; the old one left me frustrated at the lack of screen estate and the crappy resolution. I therefore got me a 17,3&#8243; ASUS N73JF, with enough power to last me just as long as the old one, I hope!</p>
<p>Since the new laptop has a somewhat decent graphics card, I decided to let the Windows install it came with stay, to be used for games and the likes. I of course installed Ubuntu 10.10 64-bit right away after booting the laptop to Windows 7 to check it out. <strong>It took longer booting to the preinstalled Windows 7, than it took installing Ubuntu from scratch!</strong> In addition to this, the Windows install was defiled with crapware. No wonder people buy Macs. Enough rambling; over to the problem at hand.</p>
<p>I did encounter a problem with getting the Suspend working in Ubuntu. After checking the fantastic ubuntuforums.org, I found people with similar issues. <a href="http://ubuntuforums.org/showthread.php?t=1444822">This thread</a> holds the answers, but it seems the fix is more technical than it should be. However it will probably get included in some patch in the future.</p>
<p>At least for the N73JF, you need to create two files.</p>
<pre class="brush: bash; title: ; notranslate">
sudo touch /etc/pm/sleep.d/20_custom-ehci_hcd
sudo touch /etc/pm/sleep.d/20_custom-xhci_hcd
</pre>
<p>To open a GUI editor like gedit, with root privileges, you can use the following command:</p>
<pre class="brush: bash; title: ; notranslate">
gksudo gedit
</pre>
<p>Keep in mind this is dangerous if you edit the wrong files, so only open the ones we created with the touch-command. If you want to open the file directly, you can append the path to the filename onto the gedit command like so:</p>
<pre class="brush: bash; title: ; notranslate">
gksudo gedit /etc/pm/sleep.d/20_custom-ehci_hcd
</pre>
<p>When you have opened the files in your favorite editor, we need to enter some scripts. In 20_custom-ehci-hcd put in:</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh
# File: &quot;/etc/pm/sleep.d/20_custom-ehci_hcd&quot;.
TMPLIST=/tmp/ehci-dev-list

case &quot;${1}&quot; in
        hibernate|suspend)
    echo -n '' &gt; $TMPLIST
          for i in `ls /sys/bus/pci/drivers/ehci_hcd/ | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'`; do
              # Unbind ehci_hcd for first device XXXX:XX:XX.X:
               echo -n &quot;$i&quot; | tee /sys/bus/pci/drivers/ehci_hcd/unbind
           echo &quot;$i&quot; &gt;&gt; $TMPLIST
          done
        ;;
        resume|thaw)
    for i in `cat $TMPLIST`; do
              # Bind ehci_hcd for first device XXXX:XX:XX.X:
              echo -n &quot;$i&quot; | tee /sys/bus/pci/drivers/ehci_hcd/bind
    done
    rm $TMPLIST
        ;;
esac
</pre>
<p>In 20_custom-xhci_hcd put in:</p>
<pre class="brush: bash; title: ; notranslate">
#!/bin/sh
# File: &quot;/etc/pm/sleep.d/20_custom-xhci_hcd&quot;.
TMPLIST=/tmp/xhci-dev-list

case &quot;${1}&quot; in
        hibernate|suspend)
    echo -n '' &gt; $TMPLIST
          for i in `ls /sys/bus/pci/drivers/xhci_hcd/ | egrep '[0-9a-z]+\:[0-9a-z]+\:.*$'`; do
              # Unbind ehci_hcd for first device XXXX:XX:XX.X:
               echo -n &quot;$i&quot; | tee /sys/bus/pci/drivers/xhci_hcd/unbind
           echo &quot;$i&quot; &gt;&gt; $TMPLIST
          done
        ;;
        resume|thaw)
    for i in `cat $TMPLIST`; do
              # Bind ehci_hcd for first device XXXX:XX:XX.X:
              echo -n &quot;$i&quot; | tee /sys/bus/pci/drivers/xhci_hcd/bind
    done
    rm $TMPLIST
        ;;
esac
</pre>
<p>Now you must make these files executable with these two commands:</p>
<pre class="brush: bash; title: ; notranslate">
chmod +x /etc/pm/sleep.d/20_custom-ehci_hcd
chmod +x /etc/pm/sleep.d/20_custom-xhci_hcd
</pre>
<p>A user on the forum reported he didn&#8217;t need the extra file as proposed in the first solution. I did not test without this file, as it wasn&#8217;t working until I added the xhci-related file. I suggest you try the steps outlined here first, and attempt these last steps only if it doesn&#8217;t work.</p>
<p>Make this file:</p>
<pre class="brush: bash; title: ; notranslate">
sudo touch /etc/pm/config.d/usb3-suspend-workaround
</pre>
<p>Open the file, and put this in:</p>
<pre class="brush: bash; title: ; notranslate">
#File: &quot;/etc/pm/config.d/usb3-suspend-workaround&quot;.
SUSPEND_MODULES=&quot;xhci&quot;
</pre>
<p>He didn&#8217;t say if it needs to be executable, I&#8217;m assuming it should and that it couldn&#8217;t hurt:</p>
<pre class="brush: bash; title: ; notranslate">
chmod +x /etc/pm/config.d/usb3-suspend-workaround
</pre>
<p>I hope you get it working <img src='http://ogrim.no/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You should also check out <a href="http://ubuntuforums.org/showthread.php?t=1444822">the source for this post</a>, as pointed out earlier. The forum might contain new information, after this is published.</p>
]]></content:encoded>
			<wfw:commentRss>http://ogrim.no/2010/12/suspend-problem-in-ubuntu-10-10-on-asus-n73jf-and-others/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to open a banana</title>
		<link>http://ogrim.no/2009/03/how-to-open-a-banana/</link>
		<comments>http://ogrim.no/2009/03/how-to-open-a-banana/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 23:08:39 +0000</pubDate>
		<dc:creator>ogrim</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[instructions]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://ogrim.no/?p=167</guid>
		<description><![CDATA[Some friends at the university and I had this discussion the other day, regarding the proper means of opening a banana. As the internet somehow seemed to disagree with me, I had to make some disagreeing on the internets for myself. This is the video I made to prove my point: The song is a [...]]]></description>
			<content:encoded><![CDATA[<p>Some friends at the university and I had this discussion the other day, regarding the proper means of opening a banana. As the internet somehow seemed to disagree with me, I had to make some disagreeing on the internets for myself. This is the video I made to prove my point:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/MK07cKnKam4&amp;hl=en&amp;fs=1&amp;rel=0" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/MK07cKnKam4&amp;hl=en&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The song is a work in progress, and everything is filmed by a crappy compact camera. I&#8217;ll post the song I used later, if there is demand. Now it is time to sleep.</p>
]]></content:encoded>
			<wfw:commentRss>http://ogrim.no/2009/03/how-to-open-a-banana/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

