<?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>No Znx! &#187; config</title>
	<atom:link href="http://znx.no/tag/config/feed/" rel="self" type="application/rss+xml" />
	<link>http://znx.no</link>
	<description>the pigeons!!!!</description>
	<lastBuildDate>Fri, 21 May 2010 16:05:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Accidental Firefox Quits</title>
		<link>http://znx.no/2010/04/accidental-firefox-quit/</link>
		<comments>http://znx.no/2010/04/accidental-firefox-quit/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 14:38:18 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://znx.no/?p=284</guid>
		<description><![CDATA[Whilst using Firefox I normally use the key press Ctrl+w to close the tabs, however on occasion my fingers strayed into Ctrl+q which, to my horror, quit Firefox! A quick Google pointed me towards a post on the useful Add-On Mirrors site. I then went to the homepage of the author and installed the nice [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst using Firefox I normally use the key press Ctrl+w to close the tabs, however on occasion my fingers strayed into Ctrl+q which, to my horror, quit Firefox!</p>
<p>A quick Google pointed me towards a <a href='http://forum.addonsmirror.net/index.php?showtopic=254'>post</a> on the useful Add-On Mirrors site. I then went to the <a href='http://mozilla.dorando.at/'>homepage</a> of the author and installed the nice tool <a href='http://mozilla.dorando.at/keyconfig.xpi'>KeyConfig</a>.</p>
<p>A quick restart of Firefox, then open KeyConfig (via Tools > KeyConfig), search for the Ctrl+q key press and disable.</p>
<p>Another restart of Firefox and it&#8217;s complete, no more accidental quits of Firefox! KeyConfig is a very nice and simple to use Add-On and will certainly be added to my default Firefox pack from now on, ace!</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2010/04/accidental-firefox-quit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Magic</title>
		<link>http://znx.no/2010/04/ssh-magic/</link>
		<comments>http://znx.no/2010/04/ssh-magic/#comments</comments>
		<pubDate>Wed, 07 Apr 2010 22:14:50 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://znx.no/?p=278</guid>
		<description><![CDATA[A friend of mine just recently posted a trick with long hostnames when using SSH. I have commented before many times when I see people making aliases or shorthand&#8217;s like this that they just don&#8217;t know about the magic that is possible in the SSH configuration file. Take for example this, imagine having a long [...]]]></description>
			<content:encoded><![CDATA[<p>A friend of mine just recently posted a <a href='http://zcentric.com/2010/04/07/ssh-trick/'>trick with long hostnames</a> when using SSH. I have commented before many times when I see people making aliases or shorthand&#8217;s like this that they just don&#8217;t know about the magic that is possible in the SSH configuration file.</p>
<p>Take for example this, imagine having a long hostname, with an odd port and a different user. Typing that would be a pain, most people would do something like:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">alias</span> ssh-short=<span style="color: #ff0000;">&quot;ssh -p 12345 someotheruser@somelong.hostname.com&quot;</span></pre></div></div>

<p>In their <code>~/.bashrc</code>, however the same can be filled into the configuration file. Edit the file <code>~/.ssh/config</code> (or make it!):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">Host short
  HostName somelong.hostname.com
  User someotheruser
  Port <span style="color: #000000;">12345</span></pre></div></div>

<p>After doing this you can simply do:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ssh</span> short</pre></div></div>

<p>How much easier do you need it to be?!</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2010/04/ssh-magic/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WPA2 Wireless With Linux</title>
		<link>http://znx.no/2010/02/wpa2-wireless-with-linux/</link>
		<comments>http://znx.no/2010/02/wpa2-wireless-with-linux/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 18:02:57 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[gentoo]]></category>

		<guid isPermaLink="false">http://znx.no/?p=106</guid>
		<description><![CDATA[This is a simple tutorial produced by me and my good mate enigma. It is aimed at Gentoo and uses the Broadcom drivers but this should replicate to other systems. The first step is to get your drivers and for Broadcom, which is relatively easy as they produce them for us. So first download the [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple tutorial produced by me and my good mate <a href="http://www.gentoo-fun.com/">enigma</a>. It is aimed at Gentoo and uses the Broadcom drivers but this should replicate to other systems.</p>
<p>The first step is to get your drivers and for Broadcom, which is relatively easy as they produce them for us. So first <a href="http://www.broadcom.com/support/802.11/linux_sta.php">download</a> the driver (these drivers support BM4311-, BCM4312-, BCM4321-, and BCM4322-based cards) and was also successful in this case with BCM4328.</p>
<p>Check that the package &#8216;linux-headers&#8217; is installed, this is really just for completeness sakes. Gentoo would not work for long without this package!</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># emerge linux-headers</span>
... output ...</pre></div></div>

<p>Unpack the downloaded drivers and build for your current kernel:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># tar -xzf hybrid-portsrc-ARCH-VERSION.tar.gz</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># make -C /lib/modules/`uname -r`/build M=`pwd`</span>
... output ...</pre></div></div>

<p>Remove any existing wireless drivers.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># rmmod ndiswrapper b43 ssb bcm43xx b43legacy</span></pre></div></div>

<p>Add in some modules required for WPA wireless:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># modprobe ieee80211_crypt_tkip</span></pre></div></div>

<p>Test the newly built wireless driver:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># insmod wl.ko</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># iwconfig</span>
.. output ...
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># iwlist scanning</span>
... output ...</pre></div></div>

<p>If that is working we can copy in the driver to the kernel and add to the autoload:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># cp wl.ko /lib/modules/`uname-r`/kernel/net/wireless/</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># rmmod wl</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># modprobe wl</span>
<span style="color: #7a0874; font-weight: bold;">&#40;</span>gentoo<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #666666; font-style: italic;"># echo 'wl' &gt;&gt;/etc/modules.autoload.d/kernel-2.6</span></pre></div></div>

<p>So now we have a working driver we can go on to configure for WPA. Alter the <i>/etc/conf.d/net</i> (note we assume that eth0 is wireless):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Prefer wpa_supplicant over wireless-tools</span>
<span style="color: #007800;">modules</span>=<span style="color: #7a0874; font-weight: bold;">&#40;</span> <span style="color: #ff0000;">&quot;wpa_supplicant&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># It's important that we tell wpa_supplicant which driver we should</span>
<span style="color: #666666; font-style: italic;"># be using as it's not very good at guessing yet</span>
<span style="color: #007800;">wpa_supplicant_eth0</span>=<span style="color: #ff0000;">&quot;-Dmadwifi&quot;</span></pre></div></div>

<p>Next set up the network in the <i>/etc/wpa_supplicant/wpa_supplicant.conf</i>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># This setting is required or the connection will not work</span>
<span style="color: #007800;">ctrl_interface</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>wpa_supplicant
&nbsp;
<span style="color: #666666; font-style: italic;"># Ensure that only root can read the WPA configuration</span>
<span style="color: #007800;">ctrl_interface_group</span>=<span style="color: #000000;">0</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Let wpa_supplicant take care of scanning and AP selection</span>
<span style="color: #007800;">ap_scan</span>=<span style="color: #000000;">1</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Only WPA-PSK is used. Any valid cipher combination is accepted</span>
<span style="color: #007800;">network</span>=<span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #007800;">ssid</span>=<span style="color: #ff0000;">&quot;example&quot;</span>
  <span style="color: #007800;">proto</span>=WPA RSN   <span style="color: #666666; font-style: italic;"># RSN is needed for WPA2</span>
  <span style="color: #007800;">key_mgmt</span>=WPA-PSK
  <span style="color: #007800;">pairwise</span>=CCMP TKIP
  <span style="color: #007800;">group</span>=CCMP TKIP WEP104 WEP40
  <span style="color: #007800;">psk</span>=06b4be19da289f475aa46a33cb793029d4ab3db7a23ee92382eb0106c72ac7bb
  <span style="color: #666666; font-style: italic;">#The higher the priority the faster it connects</span>
  <span style="color: #007800;">priority</span>=<span style="color: #000000;">2</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>And that is it, you should find that your wireless is enabled on boot.</p>
<p>Thanks should also go to <a href="http://djkaos.wordpress.com/2008/10/25/installing-broadcom-80211-linux-sta-driver/">DJ Kaos</a> for the preparation of the driver.</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2010/02/wpa2-wireless-with-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GPG Errors</title>
		<link>http://znx.no/2009/08/gpg-errors/</link>
		<comments>http://znx.no/2009/08/gpg-errors/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 21:47:23 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[gpg]]></category>

		<guid isPermaLink="false">http://znx.no/?p=142</guid>
		<description><![CDATA[Sometimes when you are installing RPM&#8217;s or Deb&#8217;s you will find yourself faced with GPG errors. Instead of ignoring them why not fix them! Simply download the key by using the GPG tool: gpg --keyserver pgpkeys.mit.edu --recv-key E6F33B6628973CC0 Then import that key into either apt: gpg -a --export 010908312D230C5F &#124; sudo apt-key add - Or [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes when you are installing RPM&#8217;s or Deb&#8217;s you will find yourself faced with GPG errors. Instead of ignoring them why not fix them!</p>
<p>Simply download the key by using the GPG tool:</p>
<pre>gpg --keyserver pgpkeys.mit.edu --recv-key E6F33B6628973CC0</pre>
<p>Then import that key into either apt:</p>
<pre>gpg -a --export 010908312D230C5F | sudo apt-key add -</pre>
<p>Or rpm:</p>
<pre>gpg --export -a 010908312D230C5F >key.txt
rpm --import key.txt</pre>
<p>Simple!</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2009/08/gpg-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>HTML E-mails And Mutt</title>
		<link>http://znx.no/2009/06/html-e-mails-and-mutt/</link>
		<comments>http://znx.no/2009/06/html-e-mails-and-mutt/#comments</comments>
		<pubDate>Sat, 27 Jun 2009 23:19:20 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://znx.no/?p=137</guid>
		<description><![CDATA[I find myself regularly using terminals and thus have grown to love any tool that allows me to remain in terminal. Mutt is only of those, a fantastic terminal mail client. The only issue is that most people these days send HTML e-mails rather than plain text. This means that when I open them in [...]]]></description>
			<content:encoded><![CDATA[<p>I find myself regularly using terminals and thus have grown to love any tool that allows me to remain in terminal. Mutt is only of those, a fantastic terminal mail client. The only issue is that most people these days send HTML e-mails rather than plain text. This means that when I open them in mutt it is very unreadable. However there is a very simple solution.</p>
<p>First off lets make a simple script to convert the HTML into text. Several terminal based browsers exist and these can do the conversion for us (make sure to place it in your PATH somewhere).</p>
<pre>#!/bin/sh

if [ ! -z `which links | grep -v 'no links'` ]
then
  links -html-numbered-links 1 -html-images 1 -dump "file://$@"
elif [ ! -z `which lynx | grep -v 'no lynx'` ]
then
  lynx -force_html -dump "$@"
elif [ ! -z `which w3m | grep -v 'no w3m'` ]
then
  w3m -T text/html -F -dump "$@"
else
  cat $@
fi</pre>
<p>Add this to your <i>~/.muttrc</i>:</p>
<pre>auto_view text/html
alternative_order text/enriched text/plain text text/html</pre>
<p>And then this to your <i>~/.mailcap</i>:</p>
<pre>text/html;html2txt %s; copiousoutput</pre>
<p>Start up Mutt and get nothing but text e-mails.</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2009/06/html-e-mails-and-mutt/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Click URLs In URxvt</title>
		<link>http://znx.no/2008/10/click-urls-in-urxvt/</link>
		<comments>http://znx.no/2008/10/click-urls-in-urxvt/#comments</comments>
		<pubDate>Wed, 15 Oct 2008 19:23:16 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[IRC]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[irssi]]></category>
		<category><![CDATA[rxvt]]></category>

		<guid isPermaLink="false">http://znx.no/?p=42</guid>
		<description><![CDATA[Most terminals these days have the ability to click on a URL and then it opens in your browser. Needless to say some terminals aren&#8217;t as simple to setup as others. I commonly use URxvt and initially didn&#8217;t think that it was possible to do. However URxvt has a rather nice Perl plug-in which expands [...]]]></description>
			<content:encoded><![CDATA[<p>Most terminals these days have the ability to click on a URL and then it opens in your browser. Needless to say some terminals aren&#8217;t as simple to setup as others. I commonly use URxvt and initially didn&#8217;t think that it was possible to do. However URxvt has a rather nice Perl plug-in which expands its range of abilities. So to setup, edit or create <em>~/.Xdefaults</em> and add these lines to it:</p>
<pre>urxvt*urlLauncher:  firefox
urxvt*matcher.button:  1
urxvt*perl-ext-common:  default,matcher,searchable-scrollback
urxvt.matcher.pattern.1:  \\bwww\\.[\\w-]\\.[\\w./?&amp;@#-]*[\\w/-]</pre>
<p>Now you need to make this work:</p>
<pre># xrdb -merge ~/.Xdefaults</pre>
<p>You may need to add this command to <em>~/.xinitrc</em> or whatever startup script that your desktop uses. Most systems should automatically load it when your X starts.</p>
<p>Whilst I chose to use <strong>firefox</strong> as the browser you can set it to any other browser, indeed if you are using Gnome a trick to use the default browser is:</p>
<pre>urxvt*urlLauncher:  gnome-open</pre>
<p>This is actually rather handy because you can click on a variety of links not just web ones and it will open the correct tool for those links. Thanks to <a href="http://nion.modprobe.de/blog/archives/653-URL-highlighting-in-rxvt-unicode.html">Nion&#8217;s</a> blog I found out that you can colour the URLs too! Finally to those that wish to be mouseless, how about <a href="http://www.jukie.net/~bart/blog/20070503013555">Bart&#8217;s</a> blog for an awesome example of the abilities of URxvt!</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2008/10/click-urls-in-urxvt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
