<?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>myplace.dk &#187; Linux</title>
	<atom:link href="http://myplace.dk/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://myplace.dk</link>
	<description></description>
	<lastBuildDate>Fri, 30 Sep 2011 12:21:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ubuntu Linux on ASRock Core 100HT</title>
		<link>http://myplace.dk/2010/12/27/linux-on-asrock-core-100ht/</link>
		<comments>http://myplace.dk/2010/12/27/linux-on-asrock-core-100ht/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 18:10:26 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://myplace.dk/?p=364</guid>
		<description><![CDATA[<p>I installed Ubuntu 10.10 (Maverick Meerkat) 32 bit on my ASRock Core 100HT, which I use as an &#8220;HTPC&#8221; (Home Theater PC) or &#8220;mediacenter&#8221;. For now I also use it as a NAS and a few other odd jobs. Everything I&#8217;ve tried so far worked out of the box, except infrared. I had to install [...]]]></description>
			<content:encoded><![CDATA[<p>I installed Ubuntu 10.10 (Maverick Meerkat) 32 bit on my ASRock Core 100HT, which I use as an &#8220;HTPC&#8221; (Home Theater PC) or &#8220;mediacenter&#8221;. For now I also use it as a NAS and a few other odd jobs. Everything I&#8217;ve tried so far worked out of the box, except infrared. I had to install the infrared driver in an inconvenient way, but it works too. This blog-post will mostly be about the remote.</p>
<p><span id="more-364"></span></p>
<h1 id="toc-what-i-have-tested">What I have tested</h1>
<p>The HTPC is connected to my TV by HDMI. It automatically chose HDMI output, and the right resolution for my TV (1360&#215;768). I didn&#8217;t have any audio, so I clicked my way into audio settings and changed the output to &#8220;HDMI Stereo&#8221;, and then it worked like I wanted it. I haven&#8217;t tried VGA, optical audio out</p>
<p>It&#8217;s networked by WIFI (802.11b), no problems there. I haven&#8217;t tried 802.11n or wired network.</p>
<p>Reading DVD&#8217;s works. I haven&#8217;t tried CD or burning anything.</p>
<p>Infrared works with the supplied MCE remote. It probably works with almost any infrared remote, with a bit of work. I haven&#8217;t tried that yet.<br />
My <a href="http://logitech.com/harmony">Logitech Harmony</a> (programmable universal remote) works fine with the HTPC. I simply autodetected the MCE remote with the Harmony.</p>
<p>I can play 1080p h264 movies.</p>
<p>USB 2 works, haven&#8217;t tried USB 3 yet.</p>
<p>Oh, and I can turn the device on with the IR-remote.</p>
<h1 id="toc-installing-the-infrared-driver">Installing the infrared driver</h1>
<p>ASRock has two Linux-downloads for the Core 100HT: Infrared driver for Ubuntu 10.4, and infrared driver for Ubuntu 10.10. The latter has a great manual, but there&#8217;s a lot of steps. The style in the manual is &#8220;click this, click that, type this, type that&#8221; etc., which I think is what most people want. I prefer a more terse syntax, with commands I can copy/paste to the terminal. Like this:</p>
<pre>sudo apt-get update
sudo apt-get install lirc lirc-modules-source

        Remote control configuration: None
        IR transmitter, if present: None

unzip -d /tmp/ "IR(10.10)2.6.35-22.zip"

Install one of these, ignore errors:
32 bit: sudo dpkg -i /tmp/Ubuntu\ 10.10/lirc-nct677x-1.1.0-ubuntu10.10-kernel2.6.35.deb
64 bit: sudo dpkg -i /tmp/Ubuntu\ 10.10/lirc-nct677x-x64-1.1.0-ubuntu10.10-kernel2.6.35.deb

Again, ignore errors:
sudo dpkg -i /tmp/Ubuntu\ 10.10/lirc-nct677x-src-1.1.0-ubuntu10.10.deb 

cd /usr/src
sudo dkms remove -m lirc -v 0.8.7~pre3 --all
sudo dkms add -m lirc -v 0.8.7~pre3
sudo dkms build -m lirc -v 0.8.7~pre3
sudo dkms install -m lirc -v 0.8.7~pre3 --force
sudo dpkg-reconfigure lirc

        Remote control configuration: Nuvoton Transceivers/Remotes
        IR transmitter, if present: None</pre>
<pre>Test by running the command "irw", and push some buttons on the remote. It should output the name of the buttons you press.</pre>
<h1 id="toc-using-the-remote">Using the remote</h1>
<p>After installing the driver and confirming that it works, the remote still didn&#8217;t do anything. I haven&#8217;t studied how this is supposed to work, but after playing around a bit I&#8217;ve learning that it&#8217;s probably something like this: LIRC (Linux Infrared Remote Control) receives the infrared signal, recognizes which remote it is and which button it is, and then tells about it to anyone who wants to listen. In my case, nobody.</p>
<p>I started XBMC and made sure it knows I have a remote that doesn&#8217;t send keyboard signals, and then it worked.</p>
<p>For now, I only want one more feature: Starting XBMC with the remote.</p>
<p><em>Warning: I tried to configure LIRC with an easy GUI. I don&#8217;t remember the name, but it didn&#8217;t work and it destroyed what already worked. I removed the software and reinstalled the driver. Please comment or email me if you have anything to add here.</em></p>
<p>I created the file &#8220;~/.lircrc&#8221; with this content:</p>
<pre>begin
    prog = irexec
    button = Home
    config = ps -e | grep xbmc &gt;/dev/null || xbmc&amp;
    repeat = 0
end</pre>
<p>In english, if I understand correct: &#8220;If the program irexec wants to know that Home (big green button with the ) is pressed, give it the string from the &#8216;config&#8217;-line.&#8221;</p>
<p>irexec then executes the command, which is &#8220;if xbmc is not running, run it&#8221;.</p>
<p>The final step is to start irexec when the machine is booting, I simply did that with the Ubuntu &#8220;Startup Applications&#8221; function.</p>
<h1 id="toc-lirc-names-of-the-remote-buttons">LIRC names of the remote buttons</h1>
<p>&#8230;as defined by the driver from ASRocks website.</p>
<table border="0">
<tbody>
<tr>
<td>Aspect</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Power</td>
</tr>
<tr>
<td>RecTV</td>
<td></td>
<td>Guide</td>
<td></td>
<td>LiveTV</td>
<td></td>
<td>DVD</td>
</tr>
<tr>
<td></td>
<td>Record</td>
<td></td>
<td></td>
<td></td>
<td>Stop</td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>Play</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>Rewind</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Forward</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>Pause</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>Replay</td>
<td></td>
<td></td>
<td></td>
<td>Skip</td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>Up</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>Left</td>
<td></td>
<td>OK</td>
<td></td>
<td>Right</td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>Down</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>VolUp</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>ChanUp</td>
</tr>
<tr>
<td>VolDown</td>
<td></td>
<td></td>
<td>Home</td>
<td></td>
<td></td>
<td>ChanDown</td>
</tr>
<tr>
<td>Back</td>
<td></td>
<td></td>
<td>Mute</td>
<td></td>
<td></td>
<td>More</td>
</tr>
<tr>
<td>One</td>
<td></td>
<td></td>
<td>Two</td>
<td></td>
<td></td>
<td>Three</td>
</tr>
<tr>
<td>Four</td>
<td></td>
<td></td>
<td>Five</td>
<td></td>
<td></td>
<td>Six</td>
</tr>
<tr>
<td>Seven</td>
<td></td>
<td></td>
<td>Eight</td>
<td></td>
<td></td>
<td>Nine</td>
</tr>
<tr>
<td>Star</td>
<td></td>
<td></td>
<td>Zero</td>
<td></td>
<td></td>
<td>Hash</td>
</tr>
<tr>
<td></td>
<td>Clear</td>
<td></td>
<td></td>
<td></td>
<td>Enter</td>
<td></td>
</tr>
<tr>
<td>Radio</td>
<td></td>
<td>Music</td>
<td></td>
<td>Pictures</td>
<td></td>
<td>Videos</td>
</tr>
<tr>
<td>Red</td>
<td></td>
<td>Green</td>
<td></td>
<td>Yellow</td>
<td></td>
<td>Blue</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>Teletext</td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<h1 id="toc-harmony-names-of-the-remote-buttons" style="font-size: 2em;">Harmony names of the remote buttons</h1>
<p>&#8230;in the configution it autodetected. You could make your own configuration with the LIRC-names or whatever you choose. There is a few duplicates and a few buttons not on the original remote.</p>
<table border="0">
<tbody>
<tr>
<td>Aspect</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>PowerToggle</td>
</tr>
<tr>
<td colspan="2">RecordedTV</td>
<td>Guide</td>
<td></td>
<td>LiveTV</td>
<td></td>
<td>DVDMenu</td>
</tr>
<tr>
<td></td>
<td colspan="2">Rec/Record</td>
<td></td>
<td></td>
<td>Stop</td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>Play</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2">Rew/Rewind</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>Fwd/FastForward</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>Pause</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>Replay</td>
<td></td>
<td></td>
<td></td>
<td>Skip</td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>Up</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td>Left</td>
<td></td>
<td colspan="2">OK/ChannelPrev</td>
<td>Right</td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td>Down</td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td>VolUp</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td>ChannelUp</td>
</tr>
<tr>
<td colspan="2">VolDown</td>
<td></td>
<td colspan="3">Media/GreenButton</td>
<td>ChannelDown</td>
</tr>
<tr>
<td>Back</td>
<td></td>
<td></td>
<td>Mute</td>
<td></td>
<td></td>
<td>Info</td>
</tr>
<tr>
<td>1</td>
<td></td>
<td></td>
<td>2</td>
<td></td>
<td></td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td></td>
<td></td>
<td>5</td>
<td></td>
<td></td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td></td>
<td></td>
<td>8</td>
<td></td>
<td></td>
<td>9</td>
</tr>
<tr>
<td>*</td>
<td></td>
<td></td>
<td>0</td>
<td></td>
<td></td>
<td>#</td>
</tr>
<tr>
<td></td>
<td>Clear</td>
<td></td>
<td></td>
<td></td>
<td>Enter</td>
<td></td>
</tr>
<tr>
<td colspan="2">MyRadio</td>
<td colspan="2">MyMusic</td>
<td colspan="2">MyPictures</td>
<td>MyVideos</td>
</tr>
<tr>
<td>Red</td>
<td></td>
<td>Green</td>
<td></td>
<td colspan="2">Yellow</td>
<td>Blue</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td colspan="2">Teletext</td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
<p>Additional commands, not on the original remote:</p>
<table border="0">
<tbody>
<tr>
<th>Harmony</th>
<th>LIRC</th>
</tr>
<tr>
<td>Audio</td>
<td>BB3</td>
</tr>
<tr>
<td>MyTV</td>
<td>TV</td>
</tr>
<tr>
<td>Subtitle</td>
<td>Not detected</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://myplace.dk/2010/12/27/linux-on-asrock-core-100ht/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>GratisDNS tip</title>
		<link>http://myplace.dk/2009/11/01/gratisdns-tip/</link>
		<comments>http://myplace.dk/2009/11/01/gratisdns-tip/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 18:54:28 +0000</pubDate>
		<dc:creator>Niels</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dansk]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://myplace.dk/?p=116</guid>
		<description><![CDATA[<p>En ting jeg godt kan lide ved GratisDNS er, at det er så nemt at scripte de fleste handlinger. Fx. at tilføje diverse records.
</p>

Log ind
Gå ind på den side som gør det, dit script skal gøre. Fx. for at tilføje en record, skal du gå ind på den side hvor du angiver detaljerne
Ret formens method [...]]]></description>
			<content:encoded><![CDATA[<p>En ting jeg godt kan lide ved <a href="http://gratisdns.dk">GratisDNS</a> er, at det er så nemt at scripte de fleste handlinger. Fx. at tilføje diverse records.<br />
<span id="more-116"></span></p>
<ol>
<li>Log ind</li>
<li>Gå ind på den side som gør det, dit script skal gøre. Fx. for at tilføje en record, skal du gå ind på den side hvor du angiver detaljerne</li>
<li>Ret formens method fra POST til GET. Det kan man ikke med en helt almindelig browser, men med <a href="http://getfirebug.com/">Firebug</a> er det nemt, med <a href="http://chrispederick.com/work/web-developer/">Web Developer</a> er det endnu nemmere. (De er begge plugins til Firefox.) Chrome kan vist gøre det uden plugins.</li>
<li>Udfyld og submit</li>
<li>Kopier urlen du nu er inde på</li>
<li>Dit script kan nu tilpasse data i urlen, og blot downloade den.</li>
</ol>
<h3 id="toc-eksempel-gmail">Eksempel &#8211; Gmail</h3>
<p>Hvis man vil bruge <a href="http://www.google.com/a/cpanel/domain/new">Gmail på dit eget domæne</a> skal du tilføje et hav af MX-records til dit domæne. Det skal man ikke gøre på ret mange domæner før det bliver kedeligt. (Jeg begyndte at kede mig inden jeg blev færdig med et første domæne.)</p>
<p>I Ubuntu Linux brugte jeg dette simple bash-script (kræver at curl er installeret):</p>
<pre class="codeblock"><code>#!/bin/bash
USER=myplacedk
PASSWD=god
DOMAIN=myplace.dk
HOST=$DOMAIN

function addMX() {
 pref=$1
 exchanger=$2
 curl --silent "https://ssl.gratisdns.dk/editdomains4.phtml?user=<strong>$USER</strong>&amp;password=<strong>$PASSWD</strong>&amp;user_domain=<strong>$DOMAIN</strong>&amp;action=addmxrecord&amp;host=<strong>$HOST</strong>&amp;exchanger=<strong>$exchanger</strong>&amp;preference=<strong>$pref</strong>&amp;button=Tilf%F8j+MX+recorden" &gt; /dev/null
}

addMX 10 aspmx.l.google.com &amp;&amp;
addMX 20 alt1.aspmx.l.google.com &amp;&amp;
addMX 20 alt2.aspmx.l.google.com &amp;&amp;
addMX 30 aspmx2.googlemail.com &amp;&amp;
addMX 30 aspmx3.googlemail.com &amp;&amp;
addMX 30 aspmx4.googlemail.com &amp;&amp;
addMX 30 aspmx5.googlemail.com</code></pre>
<p>Scriptet giver ingen statusmeddelelser, så kig selv om de er dukket op som de skal.</p>
<h3 id="toc-eksempel-2-google-chat">Eksempel 2 &#8211; Google Chat</h3>
<p>Hvis man vil bruge Google Chat på sit eget domæne, og chatte med folk på et andet domæne, skal der en masse SRV-records til. Dem tilføjer jeg sådan her:</p>
<pre class="codeblock"><code>
#!/bin/bash
USER=myplacedk
PASSWD=god
DOMAIN=myplace.dk
HOST=$DOMAIN

function addSRV() {
 host=$1
 pref=$2
 weight=$3
 port=$4
 exchanger=$5
 curl --silent "https://ssl.gratisdns.dk/editdomains4.phtml?user=$USER&amp;password=$PASSWD&amp;user_domain=$DOMAIN&amp;host=$host&amp;exchanger=$exchanger&amp;preference=$pref&amp;weight=$weight&amp;port=$port&amp;action=addsrvrecord&amp;button=Tilf%F8j+SRV+recorden" &gt; /dev/null
}

addSRV _xmpp-server._tcp.$HOST 5 0 5269 xmpp-server.l.google.com
addSRV _xmpp-server._tcp.$HOST 20 0 5269 xmpp-server1.l.google.com
addSRV _xmpp-server._tcp.$HOST 20 0 5269 xmpp-server2.l.google.com
addSRV _xmpp-server._tcp.$HOST 20 0 5269 xmpp-server3.l.google.com
addSRV _xmpp-server._tcp.$HOST 20 0 5269 xmpp-server4.l.google.com
addSRV _jabber._tcp.$HOST 5 0 5269 xmpp-server.l.google.com
addSRV _jabber._tcp.$HOST 20 0 5269 xmpp-server1.l.google.com
addSRV _jabber._tcp.$HOST 20 0 5269 xmpp-server2.l.google.com
addSRV _jabber._tcp.$HOST 20 0 5269 xmpp-server3.l.google.com
addSRV _jabber._tcp.$HOST 20 0 5269 xmpp-server4.l.google.com
</code></pre>
<p><strong>Update 2009-11-07:</strong> Tilføjet eksempel til Google Chat</p>
]]></content:encoded>
			<wfw:commentRss>http://myplace.dk/2009/11/01/gratisdns-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

