<?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>Tue, 20 Dec 2011 22:42:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Android Wi-Fi Error</title>
		<link>http://znx.no/2011/03/android-wi-fi-error/</link>
		<comments>http://znx.no/2011/03/android-wi-fi-error/#comments</comments>
		<pubDate>Sat, 26 Mar 2011 22:06:44 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[SGS]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[sgs]]></category>

		<guid isPermaLink="false">http://znx.no/?p=338</guid>
		<description><![CDATA[There seems to be a known issue which affects my Samsung Galaxy S and other Android based phones. Sometimes you will discover that the wireless is disconnected and it hasn&#8217;t reconnected automatically. Then when you go to the wireless settings (via Applications > Settings > Wireless and network > Wif-Fi settings) you will see the [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be a known issue which affects my Samsung Galaxy S and other Android based phones. Sometimes you will discover that the wireless is disconnected and it hasn&#8217;t reconnected automatically. Then when you go to the wireless settings (via Applications > Settings > Wireless and network > Wif-Fi settings) you will see the words &#8220;Error&#8221; under the Wi-Fi. Tapping to re-enable the wireless will instantly reconnect.</p>
<p>After a brief amount of time searching I found a rather good explanation via <a href='http://kb.mit.edu/confluence/pages/viewpage.action?pageId=7144856'>MIT</a>. It turns out that if you are running a mixed wireless network at home (i.e. providing B, G and N types at the same time) you could find your phone sometimes disconnects in this way.</p>
<p>Foruntately the page also points out a possible solution; <a href='http://wififixer.wordpress.com/'>Wi-Fi Fixer</a> which is also available via <a href='https://market.android.com/details?id=org.wahtod.wififixer'>Marketplace</a> and I do recommend donations!</p>
<p>This has left a little tool running in the background that detects the loss of wireless and sorts it out.</p>
<p>My wireless is now reconnecting automatically; Perfect!</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2011/03/android-wi-fi-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH and Limits</title>
		<link>http://znx.no/2011/01/ssh-and-limits/</link>
		<comments>http://znx.no/2011/01/ssh-and-limits/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 18:50:34 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[SSH]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://znx.no/?p=306</guid>
		<description><![CDATA[I was tasked to look at why a limit wasn&#8217;t being applied to a shell when using ssh. To let you understand lets have a look at what was being seen: [user@host]$ ssh test -l user user@test's password: [user@test]$ ulimit -n 1024 [user@test]$ cat /etc/security/limits.conf * soft nofile 4096 * hard nofile 4096 However switching [...]]]></description>
			<content:encoded><![CDATA[<p>I was tasked to look at why a limit wasn&#8217;t being applied to a shell when using <code>ssh</code>. To let you understand lets have a look at what was being seen:</p>
<pre>[user@host]$ ssh test -l user
user@test's password:
[user@test]$ ulimit -n
1024
[user@test]$ cat /etc/security/limits.conf
* soft nofile 4096
* hard nofile 4096</pre>
<p>However switching to the same user you will see:</p>
<pre>[user@test]$ su - user
Password:
[user@test]$ ulimit -n
4096</pre>
<p>That the limit isn&#8217;t respect when logging in via SSH but when we switch user it is applied.</p>
<p>The reason for this is rather simple; the SSH is opening a shell that isn&#8217;t a login shell and therefore limits is not being applied. To correct this simply edit your <em>sshd_config</em> file and set it to use login shells.</p>
<pre>[root@test]$ grep -i uselogin /etc/ssh/sshd_config
#UseLogin no</pre>
<p>You can see that the entry is set by default to <strong>no</strong>; so simply edit the line and alter it to yes:</p>
<pre>[root@test]$ sed -i.bak 's/#UseLogin no/UseLogin yes/' /etc/ssh/sshd_config
[root@test]$ grep -i uselogin /etc/ssh/sshd_config
UseLogin yes</pre>
<p>Now reload your <em>sshd</em>.</p>
<pre>[root@test]$ /etc/init.d/sshd reload
 /etc/init.d/sshd reload
Reloading sshd:                                            [  OK  ]</pre>
<p>And test again:</p>
<pre>[user@host]$ ssh test -l user
user@test's password:
[user@test]$ ulimit -n
4096</pre>
<p>That&#8217;s it! Sometimes odd behaviour like this can be difficult to track down without having a good read of configuration files.</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2011/01/ssh-and-limits/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create GMail Mailing List Filter</title>
		<link>http://znx.no/2010/10/create-gmail-mailing-list-filter/</link>
		<comments>http://znx.no/2010/10/create-gmail-mailing-list-filter/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 20:39:54 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://znx.no/?p=297</guid>
		<description><![CDATA[One of my friends was having trouble filtering a mailing list today with GMail. Turns out he didn&#8217;t know that GMail makes it simple: Open on of the mailing list e-mail Expand the &#8220;Show Details&#8221; link. Click on the &#8220;Filter messages from this mailing list&#8221; link That&#8217;s it instant filter, then you setup the label [...]]]></description>
			<content:encoded><![CDATA[<p>One of my friends was having trouble filtering a mailing list today with <a href='http://mail.google.com'>GMail</a>. Turns out he didn&#8217;t know that GMail makes it simple:</p>
<ul>
<li>Open on of the mailing list e-mail</li>
<li>Expand the &#8220;Show Details&#8221; link.</li>
<li>Click on the &#8220;Filter messages from this mailing list&#8221; link</li>
</ul>
<p>That&#8217;s it instant filter, then you setup the label you wish and the actions. Just one more reason why I really love using GMail!</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2010/10/create-gmail-mailing-list-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Router Respond To Ping</title>
		<link>http://znx.no/2010/10/make-router-respond-to-ping/</link>
		<comments>http://znx.no/2010/10/make-router-respond-to-ping/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 23:04:31 +0000</pubDate>
		<dc:creator>znx</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[config]]></category>

		<guid isPermaLink="false">http://znx.no/?p=295</guid>
		<description><![CDATA[I have a old &#8220;BT Voyager 2100&#8243; router and wanted to enable ping. It turned out that the setting was in a bit of an unusual place (at least I thought so). Open the router web interface, normally http://192.168.1.1/ Advanced > System > Remote Access Then tick the &#8220;Ping&#8221; checkbox and apply. After this the [...]]]></description>
			<content:encoded><![CDATA[<p>I have a old &#8220;BT Voyager 2100&#8243; router and wanted to enable ping. It turned out that the setting was in a bit of an unusual place (at least I thought so).</p>
<p>Open the router web interface, normally http://192.168.1.1/<br />
Advanced > System > Remote Access</p>
<p>Then tick the &#8220;Ping&#8221; checkbox and apply.</p>
<p>After this the box will respond to ping.</p>
]]></content:encoded>
			<wfw:commentRss>http://znx.no/2010/10/make-router-respond-to-ping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>

