<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://daniel-lange.com/feeds/atom10.xml" rel="self" title="Daniel Lange's blog" type="application/atom+xml" />
    <link href="http://daniel-lange.com/"                        rel="alternate"    title="Daniel Lange's blog" type="text/html" />
    <link href="http://daniel-lange.com/rss.php?version=2.0"     rel="alternate"    title="Daniel Lange's blog" type="application/rss+xml" />
    <title type="html">Daniel Lange's blog</title>
    <subtitle type="html">Life, IT, Managers, Cars...</subtitle>
    <icon>http://daniel-lange.com/templates/bulletproof/img/s9y_banner_small.png</icon>
    <id>http://daniel-lange.com/</id>
    <updated>2010-07-28T18:41:47Z</updated>
    <generator uri="http://www.s9y.org/" version="1.5.3">Serendipity 1.5.3 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://daniel-lange.com/archives/55-MINI-key-chrome-ring.html" rel="alternate" title="MINI key chrome ring" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2010-07-25T11:25:39Z</published>
        <updated>2010-07-28T18:41:47Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=55</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=55</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/3-Vehicles" label="Vehicles" term="Vehicles" />
    
        <id>http://daniel-lange.com/archives/55-guid.html</id>
        <title type="html">MINI key chrome ring</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>The key on my girlfriend's MINI had to be replaced as the remote control parts of it decided to cease functioning.</p>

<p>The key is an interesting piece of engineering as it communicates with the car wireless, charges via electromagnetic induction and has a standard key quite elegantly <a href="http://www.topspeed.com/cars/car-news/2007-mini-cooper-key-features-ar27958.html" title="Topgear: Mini Cooper Key Features">hidden inside</a>.</p>

<p>When the replacement key arrived it was already bruised on the chrome ring. So I went "duh, another two weeks wait on the next key" but the dealer just smiled, removed the chrome ring and replaced it with a new one.</p>

<p>Playing around with the key it had not occurred to me that the (quite easily scratched and bruised) chrome ring can simply be replaced.</p>

<p>So I figured, I'd document it:
Using (strong enough) fingernails or a plastic or wooden spatula you can carefully remove the chrome ring from you MINI key and replace / refurbish / re-paint it.  Work from one side. Push up as the chrome ring is open only on one side. There are four 8mm wide notches at 55° measured from the longitudinal axes of the key below the chrome ring. If you get your spatula locked in there you can easily leverage the chrome ring off the black plastic body of the key. Before you break things ask somebody with more manual skill to help you or pay a visit to your car dealer's spare parts desk.</p>

<p>The chrome ring as a spare part should be somewhat affordable as well. But I think being able to grind the ring and paint it matching the color of your MINI is a much cooler option. Please leave a comment / send a picture if you do this.</p>

<p><a class="serendipity_image_link" title="MINI key taken apart" href='http://daniel-lange.com/uploads/entries/100725_MINI_Key_disassembled.jpg' onclick="F1 = window.open('/uploads/entries/100725_MINI_Key_disassembled.jpg','Zoom','height=3015,width=4015,top=-900,left=-1040,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes'); return false;"><!-- s9ymdb:531 --><img class="serendipity_image_left" width="110" height="83"  src="http://daniel-lange.com/uploads/entries/100725_MINI_Key_disassembled.serendipityThumb.jpg" title="MINI key taken apart" alt="" /></a>The engineer in me demanded to take the broken key apart. The inner shell is quite sturdy and the halves are tightly molded into each other, so removing the electronics will quite likely break the thing. Don't do it. But my girlfriend's was broken already, so this is what it looks inside.</p>
 
            </div>
        </content>
        <dc:subject>chrome</dc:subject>
<dc:subject>disassemble</dc:subject>
<dc:subject>key</dc:subject>
<dc:subject>mini</dc:subject>
<dc:subject>remove</dc:subject>
<dc:subject>replace</dc:subject>
<dc:subject>ring</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/45-Fixing-FreeNX-NoMachine-NX-keyboard-glitches-e.g.-ALTGr.html" rel="alternate" title="Fixing FreeNX / NoMachine NX keyboard glitches (e.g. ALTGr)" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2009-05-10T11:44:18Z</published>
        <updated>2010-05-27T08:13:15Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=45</wfw:comment>
    
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=45</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/8-Linux" label="Linux" term="Linux" />
    
        <id>http://daniel-lange.com/archives/45-guid.html</id>
        <title type="html">Fixing FreeNX / NoMachine NX keyboard glitches (e.g. ALTGr)</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>There is a add-on technology to X or VNC called <a href="http://www.nomachine.com/sources.php" title="NX Sources download">NX</a> by an Italian company called <a href="http://www.nomachine.com" title="NoMachine homepage">NoMachine</a>.
It's quite useful as it speeds up working on remote desktops via slow network connections (i.e. DSL pipes) substantially.</p>

<p>The libraries that implement NX are released under GPLv2 by that company.
A server wrapping up the libraries' functionality is available as closed source from NoMachine or as a free product (GPLv2 again) by Fabian Franz, called <a href="http://freenx.berlios.de/" title="FreeNX homepage">FreeNX</a>.</p>

<p>FreeNX itself is amazing as it is written in BASH (with a few helper functions in C). It's also able to mend some of the shortcomings of the NX architecture. E.g. stock NX requires a technical user called "nx" to able to ssh into the NX server with a public/private keypair.
FreeNX can work around that for more secure set-ups.</p>

<p>One issue I bumped into quite regularly with Linux clients and Linux hosts from different distributions/localisations is that the keymaps are not compatible. This usually results in the ALTGr key not usable, so German keyboard users can't enter a pipe ("|"), tilde ("~") or a backslash ("\") character.  Also the up and down keys are usually resulting in weird characters being pasted to the shell. Now all of that makes using a shell/terminal prompt quite <em>interesting</em>.</p>
 <br /><a href="http://daniel-lange.com/archives/45-Fixing-FreeNX-NoMachine-NX-keyboard-glitches-e.g.-ALTGr.html#extended">Continue reading "Fixing FreeNX / NoMachine NX keyboard glitches (e.g. ALTGr)"</a>
            </div>
        </content>
        <dc:subject>freenx</dc:subject>
<dc:subject>gentoo</dc:subject>
<dc:subject>keyboard</dc:subject>
<dc:subject>keymap</dc:subject>
<dc:subject>nx</dc:subject>
<dc:subject>ubuntu</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/54-Keeping-IRC-nicks-active.html" rel="alternate" title="Keeping IRC nicks active" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2010-05-18T21:50:00Z</published>
        <updated>2010-05-18T22:38:43Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=54</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=54</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/15-IRC" label="IRC" term="IRC" />
    
        <id>http://daniel-lange.com/archives/54-guid.html</id>
        <title type="html">Keeping IRC nicks active</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Typical IRC services usually allow you to register with nickserv and link a number of nicks to a personal account. It's quite common to have nick, nick_ and nick__ as many IRC clients auto-append underscores if the primary nickname is already in use when connecting. Obviously you can set these alternate nicknames to almost anything you like in a decent client.</p>

<p>Some folks also group a "vanity" nickname or two for whatever reason. To keep these active, people do the "nick shuffle" (/nick newnick, /nick oldnick) all the time:</p>

<p><!-- s9ymdb:530 --><img class="serendipity_image_center" width="967" height="79" src="http://daniel-lange.com/uploads/entries/100309_freenode_nick_shuffle.png"  alt="nick shuffle on freenode" /></p>

<p>People who forget the occasional nick shuffle may end up losing a grouped nick because it became inactive. While freenode staff try to contact people before dropping linked nicks, there are occasional prunes of "old data" from the services database. And then nobody can really ask upfront.</p>

<p>So before the next big purge comes up, I wrote a small bash script that logs into a nickserv account and cycles through the linked nicks.
A few friends and me have used it successfully for many months now.</p>

<p>Grab a copy of <a href="http://daniel-lange.com/software/keepnick" title="keepnick bash script">keepnick (2.4kB)</a> and drop it into /usr/local/bin.</p>

<p>Keepnick expects to have an accountname, the corresponding password and then a sequence of linked nicks given on its command line.</p>

<p>Something like</p>

<div class="bash geshi" style="text-align: left"><span style="color: #000000;">/</span>usr<span style="color: #000000;">/</span>local<span style="color: #000000;">/</span>bin keepnick accountname passw0rd linked_nick linked_nick_ vanity_nick MyOtherNick</div>

<p>should work.</p>

<p>For regular use, you need to set up a cron job to call keepnick e.g. every week. So put something like the following script into <code>/etc/cron.weekly/keepnicks_irc</code> or create a corresponding crontab entry for <code>keepnicks_irc</code> if you do not have the convenient cron.* directories set up:</p>

<div class="bash geshi" style="text-align: left"><span style="color: #666666; font-style: italic;">#!/bin/bash</span><br /><span style="color: #666666; font-style: italic;">#</span><br /><span style="color: #666666; font-style: italic;"># run keepnick for user(s) irc account(s)</span><br /><span style="color: #666666; font-style: italic;"># intended to be run from cron, e.g. through /etc/cron.weekly</span><br /><span style="color: #666666; font-style: italic;">#</span><br /><br /><span style="color: #007800;">KEEPNICK</span>=<span style="color: #ff0000;">&quot;/usr/local/bin/keepnick&quot;</span><br /><span style="color: #666666; font-style: italic;"># better safe than sorry</span><br /><span style="color: #007800;">PATH</span>=<span style="color: #ff0000;">&quot;/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin&quot;</span><br /><span style="color: #7a0874; font-weight: bold;">export</span> PATH<br /><br /><span style="color: #007800;">$KEEPNICK</span> accountname1 passw0rd1 linked_nick1 linked_nick1_ linked_nick1__<br /><span style="color: #007800;">$KEEPNICK</span> accountname2 passw0rd2 linked_nick1 linked_nick2_ linked_nick2__<br />&#160;</div>

<p>You should see keepnick in action now every week like this:</p>

<p><!-- s9ymdb:529 --><img class="serendipity_image_center" width="758" height="68"  src="http://daniel-lange.com/uploads/entries/100306_keepnick_in_action.png"  alt="keepnick in action" /></p>

<p>What happens here is that the IRC services package tells you, keepnick has just authenticated to your account and will now shuffle through all nicks you asked it to.
The big advantage is that is does this outside of channels, so not annoying any users. The cron job should make sure you don't forget the nick shuffle anymore.</p>

<h2>Making sure your bash supports network connections</h2>

<p>Stock bash will support network connections but on Debian and old (=pre-karmic) Ubuntu that capability was disabled at compile time.</p>

<p>If you need to check whether your bash is compiled with network support, type <code>cat &lt; /dev/tcp/time.nist.gov/13</code> into a bash terminal.</p>

<p>In case that gives you a <a href="http://www.nist.gov/physlab/div847/grp40/its.cfm" title="NIST Internet time service">RFC-867 time string</a>, you're all fine.
If not, re-compile your bash with <code>--enable-net-redirections</code>.</p>

<p>Now for something more advanced (but entirely optional):</p>
 <br /><a href="http://daniel-lange.com/archives/54-Keeping-IRC-nicks-active.html#extended">Continue reading "Keeping IRC nicks active"</a>
            </div>
        </content>
        <dc:subject>account</dc:subject>
<dc:subject>active</dc:subject>
<dc:subject>bash</dc:subject>
<dc:subject>cron</dc:subject>
<dc:subject>freenode</dc:subject>
<dc:subject>irc</dc:subject>
<dc:subject>network</dc:subject>
<dc:subject>nick</dc:subject>
<dc:subject>script</dc:subject>

    </entry>

</feed>