<?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/atom.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-01-14T12:09:16Z</updated>
    <generator uri="http://www.s9y.org/" version="1.5.1">Serendipity 1.5.1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://daniel-lange.com/archives/53-Binding-applications-to-a-specific-IP.html" rel="alternate" title="Binding applications to a specific IP" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2010-01-09T19:00:00Z</published>
        <updated>2010-01-14T12:09:16Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=53</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=53</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/8-Linux" label="Linux" term="Linux" />
    
        <id>http://daniel-lange.com/archives/53-guid.html</id>
        <title type="html">Binding applications to a specific IP</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>These days many systems are multi-homed in the sense that they have more than one IP address bound at the same time.<br />
I.e. for different network cards, virtual IPs for shared servers or just using WiFi and a wired network connection at the same time on a laptop.</p>

<p>Murphy of course makes sure that your system will choose to worst IP (i.e. that on slow WiFi or the one reserved for admin access) when an application does not specifically supports binding to a selected IP address.
And Mozilla Firefox for example doesn't.</p>

<p>The kernel chooses an outgoing IP from those in the routing table with the same metric:</p>

<pre><code>daniel@server:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.0.2.1         0.0.0.0         U     0      0        0 eth0
0.0.0.0         192.0.2.2         0.0.0.0         U     0      0        0 eth1
0.0.0.0         192.0.2.3         0.0.0.0         U     0      0        0 eth2
0.0.0.0         192.0.2.4         0.0.0.0         U     0      0        0 eth3
</code></pre>

<p>You can obviously play around with the metric and make the kernel router prefer the desired interface above others. This will affect all applications though.
Some people use the firewall to nat all packages to port 80 onto the network interface desired for web browsing. Gee, beware the http://somewebsite.tld:8080 links...</p>

<p>Thankfully <a href="http://www.ryde.net" title="Daniel Ryde's homepage">Daniel Ryde</a> has solved the problem via a LD_PRELOAD shim. With his code you can run</p>

<div class="bash geshi" style="text-align: left">daniel<span style="color: #000000;">@</span>laptop:~$ <span style="color: #007800;">BIND_ADDR</span>=<span style="color: #ff0000;">&quot;192.0.2.100&quot;</span> <span style="color: #007800;">LD_PRELOAD</span>=<span style="color: #000000;">/</span>usr<span style="color: #000000;">/</span>lib<span style="color: #000000;">/</span>bind.so firefox <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">*</span><span style="color: #7a0874; font-weight: bold;">&#41;</span></div>

<p>and happily surf away.</p>

<p>To compile <a href="http://www.ryde.net/code/bind.c.txt" title="Bind.c LD_PRELOAD wrapper">his code</a> (3.3kB, <a href="http://daniel-lange.com/software/bind.c" title="Local copy of Daniel Ryde's Bind.c LD_PRELOAD wrapper">local copy</a>, see note 1)
you need to run</p>

<div class="bash geshi" style="text-align: left"><span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-nostartfiles</span> <span style="color: #660033;">-fpic</span> <span style="color: #660033;">-shared</span> bind.c <span style="color: #660033;">-o</span> bind.so <span style="color: #660033;">-ldl</span> -D_GNU_SOURCE<br /><span style="color: #c20cb9; font-weight: bold;">strip</span> bind.so<br /><span style="color: #c20cb9; font-weight: bold;">cp</span> <span style="color: #660033;">-i</span> bind.so <span style="color: #000000;">/</span>usr<span style="color: #000000;">/</span>lib<span style="color: #000000;">/</span></div>

<p>and you're set to go.</p>

<p>If you don't have gcc available (and trust me) you can download pre-compiled 32bit and 64bit (glibc-2) bind.so libraries <a href="http://daniel-lange.com/software/bind_so_compiled.tar.gz" title="Pre-compiled 32bit and 64bit bind.so libs">here</a> (4.5kB).</p>

<p>I guess because Daniel Ryde hid his code so well on his webpage, Robert J. McKay wrote another LD_PRELOAD shim, called <a href="http://wari.mckay.com/~rm/bindhack.c.txt" title="Bindhack.c LD_PRELOAD wrapper">Bindhack</a> (4.5kB, <a href="http://daniel-lange.com/software/bindhack.c" title="Local mirror of Robert J. McKay's Bindhack.c LD_PRELOAD wrapper">local mirror</a>). This will - as is - only compile on 32bit machines. But YMMV.</p>

<p>Run the above command <strong>(*)</strong> with your desired (and locally bound) IP address in bash and visit <a href="http://myip.dk" title="MyIP.dk show-your-ip service">MyIP.dk</a> or <a href="http://showip.be/" title="ShowIP.be show-your-ip service">ShowIP.be</a> or any of the other services that show your external IP to see whether you've succeeded.</p>

<p>Notes:</p>

<ol>
<li>Daniel Ryde did not specify the -D_GNU_SOURCE in the comments section of bind.c. Modern glibc/gcc need that as he used RTLD_NEXT which is Unix98 and not POSIX. I amended the local copy of bind.c and sent him an email so he can update his.</li>
<li>Both are IPv4 only, no IPv6 support.</li>
</ol>

<h3>Update:</h3>

<p>11.01.09 Daniel Ryde has replied to my email and updated his local copy now as well.</p>
 
            </div>
        </content>
        <dc:subject>address</dc:subject>
<dc:subject>bind</dc:subject>
<dc:subject>ip</dc:subject>
<dc:subject>ld_preload</dc:subject>
<dc:subject>multi-homed</dc:subject>
<dc:subject>network</dc:subject>
<dc:subject>updated</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/52-Ubuntu-Karmic-9.10-Bluetooth-UMTS-Dial-up-DUN.html" rel="alternate" title="Ubuntu Karmic 9.10 Bluetooth UMTS Dial-up (DUN)" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2009-12-21T17:10:00Z</published>
        <updated>2009-12-21T16:38:43Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=52</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=52</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/8-Linux" label="Linux" term="Linux" />
    
        <id>http://daniel-lange.com/archives/52-guid.html</id>
        <title type="html">Ubuntu Karmic 9.10 Bluetooth UMTS Dial-up (DUN)</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Using a mobile phone's Bluetooth Dial-up network (DUN) to connect to the Internet (UMTS/GPRS) while on the road is quite convenient for me. Sadly so this is not supported out-of-the-box in Ubuntu Karmic 9.10 (Netbook Remix) as it uses Network-Manager to handle - well - network connections. And that is <a href="https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/269329" title="Ubuntu bug #269329 - NM 0.7 lacks bluetooth 3g support" target="_blank">not quite there on Bluetooth managed devices yet</a>.</p>

<p>While the default solution (rfcomm and Gnome-PPP) still works, it's ugly to set up. Sadly so, zillions of Ubuntu-Forum threads and blog entries still detail this solution - or the issues encountered with it along the way.</p>

<p>The much better solutions is using <a href="http://blueman-project.org" title="Blueman GTK+ Bluetooth solution" target="_blank">Blueman</a>, an improved Gnome-Bluetooth primarily developed by Valmantas Palikša. It brings the right UDEV magic along to teach Network-Manager about the Bluetooth devices it handles.</p>

<div class="serendipity_imageComment_right" style="width: 724px"><div class="serendipity_imageComment_img"><!-- s9ymdb:528 --><img class="serendipity_image_right" width="724" height="462"  src="http://daniel-lange.com/uploads/entries/091221_Blueman_Ubuntu.png" alt="" /></div><div class="serendipity_imageComment_txt">Blueman Screenshot on Ubuntu Karmic 9.10 Netbook Edition</div></div>

<p>Just follow the steps on their <a href="http://blueman-project.org/downloads.html" title="Blueman downloads (and - more important - instructions for various distributions)" target="_blank">downloads page</a> to set up the Blueman PPA (Personal Package Archive) to get things working.</p>
 
            </div>
        </content>
        <dc:subject>bluetooth</dc:subject>
<dc:subject>dial-up</dc:subject>
<dc:subject>dun</dc:subject>
<dc:subject>gprs</dc:subject>
<dc:subject>network</dc:subject>
<dc:subject>network-manager</dc:subject>
<dc:subject>ubuntu</dc:subject>
<dc:subject>umts</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/51-Kubuntu-9.10-karmic-64bit-firefox-java-plugin.html" rel="alternate" title="Kubuntu 9.10 (karmic) 64bit firefox java plugin" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2009-12-06T17:00:00Z</published>
        <updated>2009-12-06T16:21:07Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=51</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=51</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/8-Linux" label="Linux" term="Linux" />
    
        <id>http://daniel-lange.com/archives/51-guid.html</id>
        <title type="html">Kubuntu 9.10 (karmic) 64bit firefox java plugin</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>For some unknown reason the (K)Ubuntu developers did not update the Java plugin for firefox after jaunty (yet?).</p>

<p>The version that Karmic (9.10) pulls out of the multiverse repository is still jaunty's (9.04).</p>

<p>So when you try:</p>

<div class="bash geshi" style="text-align: left"><span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> sun-java6-plugin</div>

<p>you'll get something like
<blockquote>
<pre><code>   Reading package lists... Done
   Building dependency tree
   Reading state information... Done
   Some packages could not be installed. This may mean that you have
   requested an impossible situation or if you are using the unstable
   distribution that some required packages have not yet been created
   or been moved out of Incoming.
   The following information may help to resolve the situation:

   The following packages have unmet dependencies:
     sun-java6-plugin: Depends: sun-java6-bin (= 6-15-1) but 6-16-0ubuntu1.9.04 is to be installed
   E: Broken packages
</code></pre>
</blockquote></p>

<p>Duh.</p>

<p>Actually if you have the Java Runtime Environment (JRE, package name <code>sun-java6-jre</code>) installed all files needed are already present.<br />
Just not put in the right place on the filesystem.</p>

<p>So, run:</p>

<div class="bash geshi" style="text-align: left"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> sun-java6-jre &#160; <span style="color: #666666; font-style: italic;"># install JRE if needed</span><br /><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> <span style="color: #000000;">/</span>usr<span style="color: #000000;">/</span>lib<span style="color: #000000;">/</span>jvm<span style="color: #000000;">/</span>java-<span style="color: #000000;">6</span>-sun<span style="color: #000000;">/</span>jre<span style="color: #000000;">/</span>lib<span style="color: #000000;">/</span>amd64<span style="color: #000000;">/</span>libnpjp2.so <span style="color: #000000;">/</span>usr<span style="color: #000000;">/</span>lib<span style="color: #000000;">/</span>mozilla<span style="color: #000000;">/</span>plugins<span style="color: #000000;">/</span></div>

<p>This will install the JRE (if it's not already installed) and will symlink the firefox plugin for java in place so that it'll be found after a browser restart.</p>
 
            </div>
        </content>
        <dc:subject>64bit</dc:subject>
<dc:subject>firefox</dc:subject>
<dc:subject>java</dc:subject>
<dc:subject>karmic</dc:subject>
<dc:subject>kubuntu</dc:subject>
<dc:subject>mozilla</dc:subject>
<dc:subject>plugin</dc:subject>
<dc:subject>ubuntu</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/50-Summer-Fun.html" rel="alternate" title="Summer Fun" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2009-12-06T16:10:00Z</published>
        <updated>2009-12-06T16:18:24Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=50</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=50</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/5-BMW" label="BMW" term="BMW" />
    
        <id>http://daniel-lange.com/archives/50-guid.html</id>
        <title type="html">Summer Fun</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>In case you wondered about the lack of activity here over the summer...</p>

<p>I've been working with the motorbikes unit of the company quite a bit as of late. They are great people and thus got me a bit enticed to try out their products.
So I ordered myself a BMW K1300S.</p>

<p>And wow. This is simply the best bike I've ever ridden.
It's extremely powerful while still agile and easy to maneuver. It's comfortable enough for a day ride and fun enough to take to the track.</p>

<p>The German newspaper FAZ found it <a href="http://www.faz.net/s/Rub9AE899D74FA64E1C97C29D196E8EB0BB/Doc~EA467DB18CA0D4FB98E78649733BA3702~ATpl~Ecommon~Scontent.html" title="FAZ article "Jetzt ist sie aber wirklich gut" (GERMAN)" target="_blank">flawless except for the price</a>. I'd second that. It's nearly perfect. The small improvement I'd like on the 2010 model: make the windshield a little higher. The air flow basically ends up right on the helmet if you're above 6 ft. (1.82 m) tall.
But that's really a minor issue, I'm sure accessory developers will take care of it if BMW doesn't.</p>

<p>I got the bike with all the electronic gadgetry available so it has ESA II (Electronic Suspension Adjustment), Quickshift (so one can switch gears up without using the clutch), on-board computer, tire pressure monitor and (...yes I know...) handle bar heating (to save me: the bike was pre-configured when I ordered), ASC, ABS, whatever. Being a geek that's fine: lotsa knobs to play with. After 7 months I have to say none of these are really needed but none are completely useless either.</p>

<div class="serendipity_imageComment_center" style="width: 1024px"><div class="serendipity_imageComment_img"><!-- s9ymdb:527 --><img class="serendipity_image_center" width="1024" height="682"  src="http://daniel-lange.com/uploads/entries/BMW_K1300S.jpg" alt="Daniel's BMW K1300S" /></div><div class="serendipity_imageComment_txt">My K1300S: 1,293cc, water-cooled four-stroke straight-four engine, DOHC, four valves per cylinder; 175bhp at 9,250rpm; 140Nm at 8,250rpm; 228kg dry.</div></div>
 
            </div>
        </content>
        <dc:subject>bmw</dc:subject>
<dc:subject>motorbike</dc:subject>
<dc:subject>summer</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/47-zip2dir-expand-a-zip-to-a-directory-of-the-same-name.html" rel="alternate" title="zip2dir (expand a zip to a directory of the same name)" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2009-07-30T21:51:40Z</published>
        <updated>2009-07-30T23:28:01Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=47</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=47</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/2-IT" label="IT" term="IT" />
    
        <id>http://daniel-lange.com/archives/47-guid.html</id>
        <title type="html">zip2dir (expand a zip to a directory of the same name)</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I needed to expand a lot of jars (Java zips) and other zips of various names into directories of the same name for each file.
With 6,239 files of which some are jars, some other zips and many xml and other filetypes all not properly identified by a file extension, this gets a bit too much to do manually.</p>

<p>So:<br />
Finding candidates for these is easy with <code>find . -type f</code>.<br />
The file is most probably a zip archive if the first two characters are "PK", good old <a href="http://en.wikipedia.org/wiki/Phil_Katz" title="Wikipedia: Phil Katz - the inventor of .zip" target="_blank">Phil Katz'</a> signature. A friendly <code>head -c 2</code> checks that.<br />
All combined with some rudimentary error checking:</p>

<div class="bash geshi" style="text-align: left"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># There is little data security here, so know what you're doing.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># All risks in using this code are yours. It moves and deletes files quite stupidly.</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># (c) Daniel Lange, 2009, v0.01, released into the public domain</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #007800;">$#</span> <span style="color: #660033;">-ne</span> <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Error: $0 expects exactly one argument, a (fully qualified) path/to/a/zipfile&quot;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">1</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">fi</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">!</span> <span style="color: #660033;">-r</span> $<span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Error: file does not exist or no read permission on $1&quot;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">2</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">fi</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #000000;">!</span> <span style="color: #660033;">-w</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(dirname $1)</span>&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Error: cannot write to directory of $1&quot;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #7a0874; font-weight: bold;">exit</span> <span style="color: #000000;">3</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">fi</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">&#91;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(head -c 2 $1)</span>&quot;</span> == <span style="color: #ff0000;">&quot;PK&quot;</span> <span style="color: #7a0874; font-weight: bold;">&#93;</span> ; <span style="color: #000000; font-weight: bold;">then</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #c20cb9; font-weight: bold;">mv</span> $<span style="color: #000000;">1</span> $1.tmp</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #c20cb9; font-weight: bold;">mkdir</span> <span style="color: #660033;">-p</span> $<span style="color: #000000;">1</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #c20cb9; font-weight: bold;">unzip</span> <span style="color: #660033;">-d</span> $<span style="color: #000000;">1</span> $1.tmp</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;">&#160; &#160; &#160; &#160; <span style="color: #c20cb9; font-weight: bold;">rm</span> $1.tmp</div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">else</span> <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;$1 is not a zipfile&quot;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #000000; font-weight: bold;">fi</span></div></li></ol></div>

<p>Download available <a href="http://daniel-lange.com/software/zip2dir" title="zip2dir download">here (1KB)</a>.</p>

<p>Typical usage:</p>

<div class="bash geshi" style="text-align: left">&#160;<span style="color: #c20cb9; font-weight: bold;">find</span> . <span style="color: #660033;">-type</span> f <span style="color: #660033;">-print0</span> <span style="color: #000000;">|</span><span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">--null</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> zip2dir</div>

<p>This will expand all zips under the current directory.<br />
Leave the <code>zip2dir</code> out for a dry run (xargs will just print to the tty then). Look at the <code>-exec</code> switch when digging around a bit more into what <code>find</code> can do for you.</p>
 
            </div>
        </content>
        <dc:subject>bash</dc:subject>
<dc:subject>decompress</dc:subject>
<dc:subject>directory</dc:subject>
<dc:subject>expand</dc:subject>
<dc:subject>script</dc:subject>
<dc:subject>unzip</dc:subject>
<dc:subject>zip</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/46-Google-GMail-dominating-the-email-market.html" rel="alternate" title="Google GMail dominating the email market" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2009-05-28T21:55:00Z</published>
        <updated>2009-06-12T23:59:35Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=46</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=46</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/13-Other" label="Other" term="Other" />
    
        <id>http://daniel-lange.com/archives/46-guid.html</id>
        <title type="html">Google GMail dominating the email market</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Google's GMail was launched in April 2004 and only in February 2007 Google dropped its invite system to open up to the general public acc. to <a href="http://en.wikipedia.org/wiki/History_of_Gmail" title="Wikipedia article on the history of GMail">Wikipedia's history of GMail</a>. That's some five years of operations up to now.</p>

<p>It kind of amazed me how many people I know have GMail as their primary mail provider. So I took the chance today to get a bit of statistics to check my gut feelings:</p>

<p>A friend of mine selected some (mostly American) bloggers that have indicated specific interests in a topic related to his Doctoral thesis. This sample ended up to be 1,375 people. These folks have 295 different email domains. Only.</p>

<p>A whooping 46% of the (rather random) sample use GMail, 12% Yahoo, 8% Hotmail and about 3% AOL.
While Yahoo has some foreign domains in the sample (yahoo.co.uk, yahoo.ca, see <em>mostly</em> American bloggers above), these add up to around 0.1% of the sample so it's not really significant.</p>

<p><img src="http://daniel-lange.com/uploads/entries/090528_Blogger_Email_Domains.png" alt="Distribution of American blogger's email domains" title="" /></p>

<p>This data is in no way representative, but still wow. Google basically has a monopoly on search and now seems to have a close-to-majority footprint in personal email.</p>

<p>I guess the dominance is currently larger in the States than in Europe or Asia as GMail has only gradually learned languages beyond English.<br />
Large local providers should also have some foothold in these markets. Similar to the Comcast and SBC customers still significant in sample depicted above. Just the local providers in Europe and Asia will be somewhat stronger (for now). Google is also aggressively targeting corporations with hosted email and apps now so one can expect further and accelerated growth in that area. Quite a number of companies are considering using hosted email instead of the conventional mail system they have operated on site for many years now.</p>

<p>So while <a href="http://ginatrapani.org/" title="Gina Trapani's homepage">Gina Trapani</a> recommends <a href="http://lifehacker.com/5261934/break-googles-monopoly-on-your-data-switch-to-yahoo-search" title="Lifehacker blog entry: Break Google's Monopoly on Your Data: Switch to Yahoo Search">"Break Google's Monopoly on Your Data: Switch to Yahoo Search"</a>, may I humbly point out: It's becoming quite impossible to just keep your emails between the recipient and the addressee these days.</p>

<p>Even if you personally do not use GMail, Google can (technically) still profile you because a huge chunk of  people you communicate with send from GMail and receive and store your emails there.</p>

<p>Nearly all email that is sent also passes spam filters before delivery. Google bought the <a href="http://www.google.com/intl/en/press/pressrel/postini_20070709.html" title="Google Press Release about the Postini acquisition">Postini</a> spam filter in 2007. That anti-spam service is used by many enterprises and even city governments, see <a href="http://www.google.com/postini/customers.html" title="Google Postini customer testimonials">here</a>.</p>

<p>So time to consider (unencrypted) email as what it has always been: The digital equivalent of a postcard.<br />
Just now Google has become the postmen. All of them, every second shift. You should hope they're not nosey. Or send letters.</p>
 
            </div>
        </content>
        <dc:subject>email</dc:subject>
<dc:subject>gmail</dc:subject>
<dc:subject>google</dc:subject>
<dc:subject>monopoly</dc:subject>
<dc:subject>privacy</dc:subject>
<dc:subject>security</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>2009-05-10T11:44:18Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=45</wfw:comment>
    
        <slash:comments>1</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/44-Fix-Umlauts-in-the-XFCE-Terminal.html" rel="alternate" title="Fix Umlauts in the XFCE Terminal" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2009-05-01T21:20:00Z</published>
        <updated>2009-05-01T20:40:16Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=44</wfw:comment>
    
        <slash:comments>5</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=44</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/2-IT" label="IT" term="IT" />
    
        <id>http://daniel-lange.com/archives/44-guid.html</id>
        <title type="html">Fix Umlauts in the XFCE Terminal</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>The XFCE Terminal has the weird issue of sometimes showing question marks (?) instead of German Umlauts (äöüÄÖÜ) although they work fine in any other stock XFCE application (e.g. the default editor "mousepad").</p>

<p>The solution to this can be found on the <a href="http://forum.xfce.org/index.php?topic=3302.0" title="XFCE Forum thread on Umlauts in Terminal">XFCE Forums</a> but it took me quite some time to find it. It was difficult to find a suitable search query to dig out that page. Google turns up a lot of irrelevant stuff on "XFCE Terminal question marks"...</p>

<div class="serendipity_imageComment_center" style="width: 526px"><div class="serendipity_imageComment_img"><!-- s9ymdb:525 --><img class="serendipity_image_center" width="526" height="283"  src="http://daniel-lange.com/uploads/entries/090430_XFCE_terminal.png" alt="" /></div><div class="serendipity_imageComment_txt">XFCE Editor Umlauts with and without LANG variable set</div></div>

<p>The problem with Umlauts (and other 8bit ASCII characters) showing as question marks arises if the user has no LANG variable set.</p>

<p>A simple</p>

<div class="bash geshi" style="text-align: left"><span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">LANG</span>=en_US</div>

<p>resolves the issue. Put that into <em>~/.bashrc</em> or any other place suitable in your distribution.</p>

<p>Gentoo users may want to</p>

<div class="bash geshi" style="text-align: left"><span style="color: #c20cb9; font-weight: bold;">su</span> &#160;<span style="color: #666666; font-style: italic;"># become root</span><br /><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;LANG=en_US&quot;</span> <span style="color: #000000;">&gt;&gt;</span> <span style="color: #000000;">/</span>etc<span style="color: #000000;">/</span>env.d<span style="color: #000000;">/</span>02locale<br />env-update<br /><span style="color: #7a0874; font-weight: bold;">exit</span><br /><span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #000000;">/</span>etc<span style="color: #000000;">/</span>profile</div>

<p>to set the LANG variable system-wide.</p>

<p>So keywords, dear Google: <em>Umlaute, deutsch, Fragezeichen, kaputt, falsch, broken, display, zeigt, charset, Zeichensatz</em> <img src="http://daniel-lange.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" /></p>
 
            </div>
        </content>
        <dc:subject>bug</dc:subject>
<dc:subject>charset</dc:subject>
<dc:subject>gentoo</dc:subject>
<dc:subject>terminal</dc:subject>
<dc:subject>umlauts</dc:subject>
<dc:subject>xfce</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/43-Getting-dual-screen-xinerama-to-work-with-Matrox-G450550-graphics-cards-and-Xorg-1.5.html" rel="alternate" title="Getting dual-screen (xinerama) to work with Matrox G450/550 graphics cards and Xorg 1.5" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2009-04-25T12:30:00Z</published>
        <updated>2009-04-25T11:46:56Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=43</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=43</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/9-Gentoo" label="Gentoo" term="Gentoo" />
    
        <id>http://daniel-lange.com/archives/43-guid.html</id>
        <title type="html">Getting dual-screen (xinerama) to work with Matrox G450/550 graphics cards and Xorg 1.5</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Gentoo finally decided to update Xorg to 1.5. Because this has very substantial changes
against the previous version, some things break and there is a <a href="http://www.gentoo.org/proj/en/desktop/x/x11/xorg-server-1.5-upgrade-guide.xml" title="Gentoo Xorg 1.5 Upgrade Guide">migration guide</a> that you
are nagged to read. After the upgrade I found that the Matrox card in one of my servers would not
display xinerama anymore, i.e. I would get the same image on both screens only.
This is the default behaviour for the stock Xorg mga driver. It needs a proprietary HALlib
to get real dual-screen capabilities. Whilst there are a few unstable ebuilds for
<code>x11-drivers/xf86-video-mga</code> none worked for me any better with Xinerama.
The <a href="http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-drivers/xf86-video-mga/ChangeLog?view=markup" title="Gentoo Changelog for xf86-video-mga">Gentoo Changelog</a> is useless as usual. (Gentoo ebuild ChangeLogs tend to never really tell what is fixed, if you're lucky they reference a bug with a good description. But that's only if you're really lucky.)</p>

<p>Worse, that driver hasn't been updated by Matrox anymore since mammals took over the earth (<em>figuratively</em> ... 2005). This is the typical unmaintained-closed-source-drivers-make-hardware-obsolete-sooner-than-later story. Luckily the cards are quite widely used and clever people from the Open Source community have written guides (<a href="http://www.tuxx-home.at/projects/mga/HOWTO_mga_Xorg7" title="The Original MGA HALLib Guide by Alexander Griesser">Tuxx-Home</a>, <a href="http://fkung.wordpress.com/2007/02/08/fkung-1-matrox-0/" title="Recent blog post by Alexander Griesser">Fkung</a>) on how to dissect the proprietary driver and combine parts of it with the Open Source version so that it can be linked into recent X servers.
Unfortunately because of the architectural changes in Xorg 1.5, following these guides will fail at the compile stage.</p>

<p>In the <a href="http://forum.tuxx-home.at/" title="Matrox mga driver discussion forum">Matrox Forum</a> of <a href="http://www.tuxx-home.at/archives/2009/03/17/T21_40_38/" title="Blog entry by Alexander Griesser on his try to port the mga driver to Xorg 1.5">Alexander Griesser</a>, the author of the first comprehensive Matrox driver install guide linked above, people currently mostly downgrade to previous Xorg versions to work around the issue.</p>

<p>But there is a better^Hworking solution already emerging <img src="http://daniel-lange.com/templates/default/img/emoticons/tongue.png" alt=":-P" style="display: inline; vertical-align: bottom;" class="emoticon" /> ...</p>
 <br /><a href="http://daniel-lange.com/archives/43-Getting-dual-screen-xinerama-to-work-with-Matrox-G450550-graphics-cards-and-Xorg-1.5.html#extended">Continue reading "Getting dual-screen (xinerama) to work with Matrox G450/550 graphics cards and Xorg 1.5"</a>
            </div>
        </content>
        <dc:subject>driver</dc:subject>
<dc:subject>gentoo</dc:subject>
<dc:subject>hallib</dc:subject>
<dc:subject>matrox</dc:subject>
<dc:subject>mga</dc:subject>
<dc:subject>ubuntu</dc:subject>
<dc:subject>xinerama</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/42-Windows-Vista-dial-up-networking-slow-to-establish-connection.html" rel="alternate" title="Windows Vista dial-up networking slow to establish connection" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2009-04-12T21:02:54Z</published>
        <updated>2009-04-12T21:02:54Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=42</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=42</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/2-IT" label="IT" term="IT" />
    
        <id>http://daniel-lange.com/archives/42-guid.html</id>
        <title type="html">Windows Vista dial-up networking slow to establish connection</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>If you find that Microsoft Windows Vista is slow to establish a dial-up network connection (DUN) ("register with the network"), that may be caused by it trying to also get an IPv6 on a IPv4 only ISP.
Remove the IPv6 protocol from the Properties -> Network tab of the DUN then.
Worked for me on dialing into an ISP via Bluetooth / mobile phone. Ymmv.</p>
 
            </div>
        </content>
        <dc:subject>dial-in</dc:subject>
<dc:subject>dial-up</dc:subject>
<dc:subject>dun</dc:subject>
<dc:subject>network</dc:subject>
<dc:subject>slow</dc:subject>
<dc:subject>vista</dc:subject>
<dc:subject>windows</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/40-Cool,-command-line-style-blog-design.html" rel="alternate" title="Cool, command-line style blog design" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2008-12-16T23:30:00Z</published>
        <updated>2008-12-17T00:02:19Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=40</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=40</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/1-Private" label="Private" term="Private" />
    
        <id>http://daniel-lange.com/archives/40-guid.html</id>
        <title type="html">Cool, command-line style blog design</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>It's very seldom that a blog design catches my eye.</p>

<div class="serendipity_imageComment_right" style="width: 110px"><div class="serendipity_imageComment_img"><a class='serendipity_image_link' href='http://daniel-lange.com/uploads/entries/081217_BlogDesign_PeteHindle.png' onclick="F1 = window.open('/uploads/entries/081217_BlogDesign_PeteHindle.png','Zoom','height=975,width=1277,top=32,left=9,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes'); return false;"><!-- s9ymdb:524 --><img class="serendipity_image_right" width="110" height="84"  src="http://daniel-lange.com/uploads/entries/081217_BlogDesign_PeteHindle.serendipityThumb.png" alt="" /></a></div><div class="serendipity_imageComment_txt">Screenshot of Pete Hindle's blog</div></div>

<p>Most common templates for blog systems like Wordpress or Serendipity are very well honed. Usability, accessibility and visual design of these systems and their default templates are are as good as it gets for the time being. Trying to do better usually fails. But <a href="http://code.google.com/p/wordpress-cli/" title="Wordpress CLI Homepage at Google code" target="_blank">Wordpress-CLI</a>, which I found at <a href="http://www.petehindle.com/" title="Pete Hindle's blog" target="_blank">Pete Hindle's blog</a> manages to create a unique design. It may be inspired on the google shell (<a href="http://goosh.org/" title="Unofficial Google Shell" target="_blank">gosh</a>) or older incarnations of the concept, e.g. <a href="http://a-i-studio.com/cmd/" title="WebCmd: web-based command-line interpreter (shell)" target="_blank">WebCmd</a>, but it is unique because it requires poking and trying stuff to expose the full functionality. A bit like an old school <a href="http://en.wikipedia.org/wiki/Roguelike" title="Wikipedia: Rogue-like explained" target="_blank">rogue-like</a> game, it inspires playing with it to find out more. And it reminds nicely of command interfaces to <a href="http://en.wikipedia.org/wiki/Bulletin_board_system" title="Wikipedia: BBS - Bulletin Board System" target="_blank">BBS</a> systems although the authors chose a syntax to resemble a unix based shell. You can <a href="http://thrind.xamai.ca/themes/" title="Rob McFarland's themes for Wordpress" target="_blank">try out different sub-designs</a> at <a href="http://thrind.xamai.ca/" title="Rob McFarland - the original theme author's blog" target="_blank">Rob McFarland's</a> site. Obviously, usability still sucks, but it's worth it! Well done.
And Pete: Please write some interesting entries in that blog now <img src="http://daniel-lange.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />.</p>
 
            </div>
        </content>
        <dc:subject>bash</dc:subject>
<dc:subject>blog</dc:subject>
<dc:subject>design</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/39-Wikimedia-20082009-Fundraiser-Analysis-I.html" rel="alternate" title="Wikimedia 2008/2009 Fundraiser Analysis I" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2008-12-02T22:30:00Z</published>
        <updated>2009-01-22T21:54:14Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=39</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=39</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/13-Other" label="Other" term="Other" />
    
        <id>http://daniel-lange.com/archives/39-guid.html</id>
        <title type="html">Wikimedia 2008/2009 Fundraiser Analysis I</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>The Wikimedia Foundation has started it's annual fundraiser again on November 4th 2008. It is scheduled to run until January 15th 2009. I've written <a href="http://daniel-lange.com/plugin/tag/wikimedia" title="Overview of Wikimedia articles on Daniel's blog">several articles</a> on last year's so I've been asked a lot to comment on the current one.
This year Wikimedia clearly <a href="http://wikimediafoundation.org/wiki/Donate/Questions/en#How_much_money_are_you_hoping_to_raise.3F" title="Wikimedia Fundraiser FAQ entry" target="_blank">state</a> they want to raise $6 million. No more diffuse targets, &quot;number of donors&quot; weirdness as last year. Well done, Rand!</p>

<div class="serendipity_imageComment_right" style="width: 425px"><div class="serendipity_imageComment_img"><!-- s9ymdb:521 --><img class="serendipity_image_right" width="425" height="100"  src="http://daniel-lange.com/uploads/entries/081202_Wikimedia_Fundraiser_Mainpage.png" alt="" /></div><div class="serendipity_imageComment_txt">Wikipedia main page shows $3.289.684</div></div>

<div class="serendipity_imageComment_right" style="width: 350px"><div class="serendipity_imageComment_img"><!-- s9ymdb:522 --><img class="serendipity_image_right" width="350" height="89"  src="http://daniel-lange.com/uploads/entries/081202_Wikimedia_Fundraiser_Contributionstatisticspage.png" alt="" /></div><div class="serendipity_imageComment_txt">The Wikimedia fundraiser contributions page shows $2.289.684 - the Sloan Foundation million less</div></div>

<p><a href="http://wikimediafoundation.org/wiki/User:Rand_Montoya" title="Rand Montoya's page at Wikimedia" target="_blank">Rand Montoya</a> is Wikimedia's new &quot;Head of Community Giving&quot; and responsible for making this fundraiser much more professional than last year's.
The contribution history page still is only good to spot the occasional clown donating <a class='serendipity_image_link' href='http://daniel-lange.com/uploads/entries/081116_Wikimedia_fundraiser_1jpys.png' onclick="F1 = window.open('/uploads/entries/081116_Wikimedia_fundraiser_1jpys.png','Zoom','height=634,width=591,top=202.5,left=352,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes'); return false;">JPY 1</a> (which makes Wikimedia loose money due to transaction fees). But Rand pointed me to two other pages giving a better report on current donations:</p>

<ul>
<li>The number of contributions, totals and average donations of the past seven days (and more aggregated past six months) can be viewed at <a href="http://wikimediafoundation.org/wiki/Special:ContributionStatistics" title="Contribution Statistics page at Wikimedia" target="_blank">[Special:ContributionStatistics]</a>
<li>A daily comparison of the 2007/2008 fundraiser vs. the current 2008/2009 fundraiser can be found at <a href="http://wikimediafoundation.org/wiki/Special:FundraiserStatistics" title="Fundraiser Statistics page at Wikimedia" target="_blank">[Special:FundraiserStatistics]</a>
</ul>

<p>The meter banner on top of many wikipedia pages matches the data on these pages quite closely. It's just a million off <img src="http://daniel-lange.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />. (see images above) That million is an annual donation by the Sloan foundation ($3 million over three years). All of it been accounted for in the donation year 2007 (see the <a href="http://wikimediafoundation.org/wiki/2007-2008_Financial_Statements_Questions_and_Answers" title="Wikimedia Financial Statements Q&amp;A" target="_blank">Wikimedia Financials FAQ</a>) but somehow it is added again in the meter but not in the statistics pages.
BTW: The German Wikimedia chapter has a less fancy, but more complete and transparent <a href="https://secure.wikimedia.de/spenden/list.php" title="Donations list of the German Wikimedia e.V.">reporting of donations</a>. Not cut-off after seven days. All of a month on one page. Data ready for copy &amp; paste into a spreadsheet. Benchmark.</p>

<p>So, is the $6 million target realistic?
At day 29 of the 74 day campaign, $3.3m have been raised. Taking out the major donations totaling $1.7m (these are not stochastic enough to be estimated with any reasonable validity) and assuming that the Christmas tax rally at the end of the year roughly equals the start of fundraising spike, we can expect $2.6m to be raised from individual contributors. Adding back the major donations, the estimation for the total fundraiser comes in at $4.3m. That's plus any major donations still to be announced. I bet a guy with Rand's experience has another ace up his sleeve. One less elegant solution has been hinted at in the <a href="http://wikimediafoundation.org/wiki/Donate/Questions/de#What_happens_if_you_do_not_reach_your_goal.3F" title="Wikimedia fundraiser FAQ entry: What happens if you do not reach your goal?" target="_blank">fundraiser FAQ</a> already:
<i>&quot;What happens if you do not reach your goal? [...] A second, smaller fundraiser may be scheduled for March.&quot;</i></p>
 
            </div>
        </content>
        <dc:subject>analysis</dc:subject>
<dc:subject>fundraiser</dc:subject>
<dc:subject>wikimedia</dc:subject>
<dc:subject>wikipedia</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/38-Converting-a-DVD-film-mpeg2-to-DV.html" rel="alternate" title="Converting a DVD film (mpeg2) to DV" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2008-10-22T23:30:00Z</published>
        <updated>2008-10-22T23:40:52Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=38</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=38</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/13-Other" label="Other" term="Other" />
    
        <id>http://daniel-lange.com/archives/38-guid.html</id>
        <title type="html">Converting a DVD film (mpeg2) to DV</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>There are a gazillion web pages telling you how to convert DV to MPEG2 for DVD use. But I got a DVD from a corporate event and needed to convert it to DV to be cut in <a href="http://www.kdenlive.org/" title="kdenlive KDE video editor home page" target="_blank">kdenlive</a>. So just the other way around. Try to find a web page about that direction (needle in haystack, anyone?).</p>

<p>Giving up on google, I tried unsuccessfully with the swiss army knife that comes to mind first (ffmeg).</p>

<p>While something like
<tt>ffmpeg -i vts_01_1.vob -i vts_01_2.vob -i vts_01_3.vob -sameq -target dv ../Raum_Video.avi</tt>
creates a nice .avi, even mplayer complains about it violating the dv and avi standards.</p>

<p>So back to digging around in tutorials and forums and trial and error with other tools. Finally I found <a href="http://fixounet.free.fr/avidemux/" title="Avidemux home page" target="_bank">Avidemux</a> to be the tool of choice. It encapsulates ffmpeg and other tools nicely to make them produce the expected results. Set video to DV (lavc), Audio to WAV PCM and the container format to AVI and go grab a <del>coffee</del> meal. It creates a nice DV file that you can easily work with in your favorite video editor.</p>

<p><!-- s9ymdb:520 --><img class="serendipity_image_center" width="916" height="789" style="border: 0px; padding-left: 5px; padding-right: 5px;" src="http://daniel-lange.com/uploads/entries/Screenshot_Avidemux2_qt4.png" alt="Screenshot of Avidemux in action" /></p>
 
            </div>
        </content>
        <dc:subject>audio</dc:subject>
<dc:subject>avi</dc:subject>
<dc:subject>avidemux</dc:subject>
<dc:subject>convert</dc:subject>
<dc:subject>dv</dc:subject>
<dc:subject>ffmpeg</dc:subject>
<dc:subject>mpeg2</dc:subject>
<dc:subject>transcode</dc:subject>
<dc:subject>video</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/37-httpdate-set-local-date-and-time-from-a-web-server.html" rel="alternate" title="httpdate - set local date and time from a web server" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2008-10-22T21:55:13Z</published>
        <updated>2009-09-27T19:19:18Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=37</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=37</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/8-Linux" label="Linux" term="Linux" />
    
        <id>http://daniel-lange.com/archives/37-guid.html</id>
        <title type="html">httpdate - set local date and time from a web server</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>While <a href="http://www.ntp.org" title="Network Time Protocol (NTP) home page" target="_blank">ntp</a> may be a great protocol, I find it quite bloated and slow for the simple purpose of just setting a local date and time to a reference clock. I do not need 20ms accuracy on a notebook's clock <img src="http://daniel-lange.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />.
Thus I use(d) <a href="http://packages.debian.org/stable/net/rdate" title="Debian's rdate page in lack of a proper homepage for the tool itself" target="_blank">rdate</a> for a decade now but the public rdate servers are slowly dying out. So I'm replacing it more and more with <a href="http://www.clevervest.com/htp/" title="htpdate home page">htpdate</a> which works quite nicely. It's written in C and a perl alternative is available on the author's site. There is also a forked <a href="http://www.rkeene.org/oss/htp/" title="(Forked) alternative and Windows version of htpdate" target="_blank">windows version</a> of it available.</p>

<p>Developing a bit larger bash script (which syncs a few servers), I wondered whether I could realize the time sync part in bash as well.</p>

<p>It's quite possible:</p>

<div class="bash geshi" style="text-align: left"><ol><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># open a tcp connection to www.google.com</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">3</span><span style="color: #000000;">&lt;&gt;/</span>dev<span style="color: #000000;">/</span>tcp<span style="color: #000000;">/</span>www.google.com<span style="color: #000000;">/</span><span style="color: #000000;">80</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># say hello HTTP-style</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;GET / HTTP/1.0<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #000000;">&gt;&amp;</span><span style="color: #000000;">3</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># parse for a Date: line and with a bit of magic throw the date-string at the date command </span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #007800;">LC_ALL</span>=C <span style="color: #007800;">LANG</span>=en <span style="color: #c20cb9; font-weight: bold;">date</span> <span style="color: #660033;">--rfc-2822</span> <span style="color: #660033;">--utc</span> <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(head &lt;&amp;3 | grep -i &quot;Date: &quot; | sed -e s/Date\:\ //I)</span>&quot;</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #666666; font-style: italic;"># close the tcp connection</span></div></li><li style="font-weight: normal; vertical-align:top;"><div style="font: normal normal 1em/1.2em monospace; margin:0; padding:0; background:none; vertical-align:top;"><span style="color: #7a0874; font-weight: bold;">exec</span> <span style="color: #000000;">3</span><span style="color: #000000;">&lt;&amp;</span>-</div></li></ol></div>

<p>Simple, eh?</p>
 <br /><a href="http://daniel-lange.com/archives/37-httpdate-set-local-date-and-time-from-a-web-server.html#extended">Continue reading "httpdate - set local date and time from a web server"</a>
            </div>
        </content>
        <dc:subject>bash</dc:subject>
<dc:subject>htpdate</dc:subject>
<dc:subject>httpdate</dc:subject>
<dc:subject>ntp</dc:subject>
<dc:subject>rdate</dc:subject>
<dc:subject>updated</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/34-Disabling-a-group-policyd-screensaver-on-Windows.html" rel="alternate" title="Disabling a group policy'd screensaver on Windows" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <published>2008-08-13T19:33:05Z</published>
        <updated>2010-01-19T20:54:37Z</updated>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=34</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom1.0&amp;type=comments&amp;cid=34</wfw:commentRss>
    
            <category scheme="http://daniel-lange.com/categories/2-IT" label="IT" term="IT" />
    
        <id>http://daniel-lange.com/archives/34-guid.html</id>
        <title type="html">Disabling a group policy'd screensaver on Windows</title>
        <content type="xhtml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I guess many people know the issue of having a screen saver forced active after a some time through a group policy in a corporate environment. This is usually done to make sure systems are locked during breaks if people forget to press Win+L (or Ctrl+Alt+Del and then Enter).
While that may well help IT security, it turns problematic when giving presentations for extended periods of time.  Having to move the mouse through the presentation pointer every few minutes or dash back to the PC once the screen saver has kicked in, again, is simply annoying.
On your company's systems you may be able to get the system admins to allow configuration of the interval or allow for disabling the screen saver, but on foreign systems you're often lost. But...</p>
 <br /><a href="http://daniel-lange.com/archives/34-Disabling-a-group-policyd-screensaver-on-Windows.html#extended">Continue reading "Disabling a group policy'd screensaver on Windows"</a>
            </div>
        </content>
        <dc:subject>network</dc:subject>
<dc:subject>screensaver</dc:subject>
<dc:subject>security</dc:subject>
<dc:subject>vista</dc:subject>
<dc:subject>windows</dc:subject>
<dc:subject>xp</dc:subject>

    </entry>

</feed>