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

<feed version="0.3" 
   xmlns="http://purl.org/atom/ns#"
   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/rss.php?version=atom0.3" rel="service.feed" title="Daniel Lange's blog" type="application/x.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 mode="escaped" type="text/html">Daniel Lange's blog</title>
    <tagline mode="escaped" type="text/html">agrep -pB IT /dev/life</tagline>
    <id>http://daniel-lange.com/</id>
    <modified>2013-01-23T17:16:30Z</modified>
    <generator url="http://www.s9y.org/" version="1.7">Serendipity 1.7 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>
    <info mode="xml" type="text/html">
        <div xmlns="http://www.w3.org/1999/xhtml">You are viewing an ATOM formatted XML site feed. Usually this file is inteded to be viewed in an aggregator or syndication software. If you want to know more about ATOM, please visist <a href="http://atomenabled.org/">Atomenabled.org</a></div>
    </info>

    <entry>
        <link href="http://daniel-lange.com/archives/76-Replicating-BIND-DNS-slave-configurations-from-BIND-DNS-master-servers.html" rel="alternate" title="Replicating BIND DNS slave configurations from BIND DNS master servers" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2013-01-23T17:00:00Z</issued>
        <created>2013-01-23T17:00:00Z</created>
        <modified>2013-01-23T17:16:30Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=76</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=76</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/76-guid.html</id>
        <title mode="escaped" type="text/html">Replicating BIND DNS slave configurations from BIND DNS master servers</title>
        <content type="application/xhtml+xml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Manually copying the <a href="https://www.isc.org/software/bind" title="BIND DNS server homepage">BIND</a> master zone configuration to slave servers is a tedious and error-prone process.
There are configuration management systems available for large deployments and BIND can support database backends as well which allow synchronization virtually behind the scenes.</p>

<p>For my use these options are overly complex and have unwanted risks associated with it.</p>

<p>The better option is to automate generating the BIND slave configuration from the BIND master  <code>named.conf.local</code>.</p>
 <br /><a href="http://daniel-lange.com/archives/76-Replicating-BIND-DNS-slave-configurations-from-BIND-DNS-master-servers.html#extended">Continue reading "Replicating BIND DNS slave configurations from BIND DNS master servers"</a>
            </div>
        </content>

        <dc:subject>awk</dc:subject>
<dc:subject>bind</dc:subject>
<dc:subject>config</dc:subject>
<dc:subject>convert</dc:subject>
<dc:subject>dns</dc:subject>
<dc:subject>isc</dc:subject>
<dc:subject>named</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/75-Securing-the-grub-boot-loader.html" rel="alternate" title="Securing the grub boot loader" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2012-10-07T21:55:00Z</issued>
        <created>2012-10-07T21:55:00Z</created>
        <modified>2012-11-30T08:46:30Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=75</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=75</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/75-guid.html</id>
        <title mode="escaped" type="text/html">Securing the grub boot loader</title>
        <content type="application/xhtml+xml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Since version 2.0 the behaviour of grub regarding passwords has changed quite substantially.
It can be nicely used to secure the boot process so that a X display manager (gdm, kdm, lightdm, ...) or login prompt cannot be circumvented by editing the Linux kernel boot command line parameters. The <a href="http://www.gnu.org/software/grub/manual/html_node/Security.html" title="GNU grub manual page on Authentication and authorisation">documentation</a> is concise but many old how-tos may lead you down the wrong GNU grub "legacy" (the pre-2.0 versions) path.</p>

<p>So this assumes you have a grub installed and working.
I.e. if you press Shift during boot, you get a grub menu and can edit menu entries via the e key.</p>

<p>First you need to setup grub users and corresponding passwords:</p>

<p>Run <em>grub-mkpasswd-pbkdf2</em> to encrypt every password you want to use for grub users (which are technically unrelated to Linux system users at this time).<br />
You'll get a string like 'grub.pbkdf2.sha512.10000...'. It will replace the plain text passwords.</p>

<p>In '/etc/grub/40_custom' add lines like:</p>

<blockquote>
  <p>&#35; These users can change the config at boot time and run any menuentry:<br />
  set superusers="root user1"<br />
  password_pbkdf2 root  grub.pbkdf2.sha512.10000.aaa...<br />
  password_pbkdf2 user1 grub.pbkdf2.sha512.10000.bbb...<br />
  &#35; This user can only run specifically designated menuentries (not a superuser):<br />
  password_pbkdf2 user2 grub.pbkdf2.sha512.10000.ccc...</p>
</blockquote>

<p>Now once you did this grub v. 2.0+ will ask for a supervisor password every time you want to boot any menu item.
This is a changed behavior from v. 1.9x which defaulted to allow all entries if no user restriction was specified.
So you need to add '--unrestricted' to all 'menuentries' that any user shall be able to boot.
You can edit '/boot/grub/grub.cfg' and add --unrestricted to (the default) menuentries.
Or you can edit the 'linux_entry ()' function in '/etc/grub/10_linux' so that the 'echo "menuentry ..."' lines include --unrestricted by default:</p>

<blockquote>
  <p>[...]<br />
  echo "menuentry '$(echo "$title" | grub_quote)' <font color="red">--unrestricted</font> ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"<br />
  else<br />
  echo "menuentry '$(echo "$os" | grub_quote)' <font color="red">--unrestricted</font> ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"<br />
  [...]</p>
</blockquote>

<p>Make a backup of this file as it will be overwritten by grub updates.
This way all Linux kernels detected by the script will be available to all users without identifying to grub via username / password.</p>

<p>Now issue <em>update-grub</em> to re-generate 'grub.cfg' with the amended menuentries.</p>

<p>If everything worked well, your system can now be booted unrestricted but the grub configuration can only be changed from the grub superusers after identifying with their username and password at the grub prompt.</p>

<p>Bonus point:</p>

<p>If you want to create menuentries that user2 (and any superuser) from the above example user list can run, add blocks like these to the end of '40_custom':</p>

<blockquote>
  <p>menuentry "Only user2 (or superuser) can run this Windows installation" <font color="red">--users user2</font> {<br />
    set root=(hd1,1)<br />
    chainloader +1<br />
  }</p>
</blockquote>
 
            </div>
        </content>

        <dc:subject>boot</dc:subject>
<dc:subject>grub</dc:subject>
<dc:subject>security</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/73-855-years-and-counting.html" rel="alternate" title="855 years and counting" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2012-09-21T21:50:00Z</issued>
        <created>2012-09-21T21:50:00Z</created>
        <modified>2012-09-26T15:45:08Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=73</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=73</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/73-guid.html</id>
        <title mode="escaped" type="text/html">855 years and counting</title>
        <content type="application/xhtml+xml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <div style="margin-left: 140px;">
<p>Dear marketing managers:</p>
<ol>
<li>Test your scripts before using them on real customers
<li>Server images don't show in emails these days anymore
</ol>
<p>Dear developers:</p>
<ol>
<li>Test your scripts before deploying them in production
<li>Add (configurable) sanity checks to customer visible output according to the underlying business logic
</ol>
<div class="serendipity_imageComment_center" style="width: 642px"><div class="serendipity_imageComment_img"><!-- s9ymdb:603 --><img class="serendipity_image_center" width="642" height="126"  src="http://daniel-lange.com/uploads/entries/120921_SPG_10262_months.png" title="120921_SPG_10262_months.png" alt="SPG mailing fail" /></div><div class="serendipity_imageComment_txt">SPG mailing fail</div></div>
</div>
 
            </div>
        </content>

        <dc:subject>fun</dc:subject>
<dc:subject>mailing</dc:subject>
<dc:subject>marketing</dc:subject>
<dc:subject>spam</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/71-SyncPlaces,-SortPlaces-...-preserving-these-and-other-excellent-Firefox-add-ons.html" rel="alternate" title="SyncPlaces, SortPlaces ... preserving these and other excellent Firefox add-ons" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2012-07-08T03:45:00Z</issued>
        <created>2012-07-08T03:45:00Z</created>
        <modified>2012-07-11T01:48:33Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=71</wfw:comment>
        <slash:comments>26</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=71</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/71-guid.html</id>
        <title mode="escaped" type="text/html">SyncPlaces, SortPlaces ... preserving these and other excellent Firefox add-ons</title>
        <content type="application/xhtml+xml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>A few days ago I was re-installing a laptop of mine. Downloading the default add-ons for Firefox came to a stall as I could not find SyncPlaces, which I've been using for a few years to synchronize my bookmarks between the systems I use. As I knew the author, Andy Halford, has a <a href="http://www.andyhalford.com/" title="Andy Halford's homepage">homepage</a> I surfed there and found...</p>

<blockquote>
  <p>"<strong>So long Mozilla and thanks for all the fish</strong></p>
  
  <p>If you are here looking for any of my extensions (SyncPlaces, SortPlaces, CheckPlaces or SearchPlaces) then I'm sad to inform you that these are no longer available.</p>
  
  <p>Unfortunately I do not have the time or the motivation to continue to support these in light of the close-minded, short-sighted and increasingly inflexible organisation that Mozilla has become. Apparently spending 1000's of hours promoting their products and providing my extensions to the general public to fill the gaps in their product, and repair bookmarks destroyed by Firefox Sync, counts for little and does not deserve any flexibility or support from them. Apparently add-on developers are second-class citizens to them whatever they may say. Surprising given that these are the main USP of Firefox, and developers are providing their time and efforts for free. My decision was taken after a series of problems the last one being the final straw."<br />
  <em>Andy Halford, 17.06.12</em> <a href="http://daniel-lange.com/uploads/entries/120707_Screenshot_Homepage_AndyHalford.png" title="Screenshot of Andy Halford's homepage on 07.07.12">screenshot</a></p>
</blockquote>

<p>I was unable to find any details what caused this rant and the serious decision to remove his excellent add-ons from the Internet.
There are a <a href="http://forums.mozillazine.org/viewtopic.php?f=38&amp;t=2492681" title="Mozillazine thread: Need alternate Add-Ons for CheckPlaces and SortPlaces!">few discussions</a> on the Mozillazine forums but nothing enlightening so far.
<a href="http://www.andyhalford.com/" title="Andy Halford's homepage">Andy's personal homepage</a>, <a href="http://thehalfords.co.uk" title="Andy Halford's family homepage">family homepage</a> and the <a href="http://totalvalidator.com/" title="TotalValidator product homepage">TotalValidator product</a> he and his wife offer are all still online, he just pulled all his popular Firefox add-ons.</p>

<p>Andy states on his homepage</p>

<blockquote>
  <p>"I will not be answering any further emails on this matter, I suggest that you direct any questions to Mozilla themselves and ask them why they were happier for me to leave than to use a little common sense." [ib.]</p>
</blockquote>

<p>I still tried to contact him and asked for an interview but he has not come back to me so far. I've sent a second email with the URL of this blog post.</p>

<p>The SyncPlaces plug-in is still prominently featured on Wikipedia's <a href="http://en.wikipedia.org/wiki/Comparison_of_browser_synchronizers" title="Wikipedia entry: Comparison of browser synchronizers">Comparison of browser synchronizers</a> at press time.</p>

<p>Now this is a mess. With some ungraciously licensed closed source software, you're probably used to plan migrations once license terms run out or you have to upgrade to the <em>much improved</em> successor product because "extended support" for your perfectly fine current version gets ridiculously expensive.</p>

<p>But with open source you have more rights and e.g. the security to use the product as long as you wish. <em>If</em> you have kept a copy of the code (and the license file). Because in this case the Mozilla Firefox installer .xpi's are hard to come by. Mozilla has a <a href="https://addons.mozilla.org/" title="Mozilla add-ons repository">centralized add-on repository</a> and once the files are pulled from there, they quickly vanish off the net. Now don't get me wrong, these plug-ins are now unmaintained software, so you will have to migrate at some point in time, but not necessarily now. You have some time for planning and evaluation of alternatives.</p>
 <br /><a href="http://daniel-lange.com/archives/71-SyncPlaces,-SortPlaces-...-preserving-these-and-other-excellent-Firefox-add-ons.html#extended">Continue reading "SyncPlaces, SortPlaces ... preserving these and other excellent Firefox add-ons"</a>
            </div>
        </content>

        <dc:subject>addon</dc:subject>
<dc:subject>bookmarks</dc:subject>
<dc:subject>firefox</dc:subject>
<dc:subject>mozilla</dc:subject>
<dc:subject>opensource</dc:subject>
<dc:subject>plugin</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/69-The-XY-problem-in-IT-management.html" rel="alternate" title="The XY problem in IT management" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2012-06-24T07:45:00Z</issued>
        <created>2012-06-24T07:45:00Z</created>
        <modified>2012-09-14T22:04:34Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=69</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=69</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/69-guid.html</id>
        <title mode="escaped" type="text/html">The XY problem in IT management</title>
        <content type="application/xhtml+xml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Online community users know the XY problem:</p>

<p>A person has a problem X and tries to solve it with Y. He asks about help with Y online.<br />
Often X has a straight forward solution which is not Y. But the person asking doesn't describe X.<sup id="fnref:AltDef"><a href="#fn:AltDef" rel="footnote">1</a></sup></p>

<p>The term "XY problem" was implicitly coined when the Open Source philosopher <a href="http://www.catb.org/~esr/" title="Eric's Homepage">Eric S. Raymond</a> wrote his "How To Ask Questions The Smart Way" text and added "How can I use X to do Y?" to the <a href="http://www.catb.org/~esr/faqs/smart-questions.html#idp29958640" title="FAQ entry: Q: How can I use X to do Y?">"Questions Not To Ask"</a> section.</p>

<p><abbr title="Eric Steven Raymond">ESR</abbr> himself states in "How To Ask Questions The Smart Way":</p>

<blockquote>
  <p><strong>Describe the problem's symptoms, not your guesses</strong></p>
  
  <p>It's not useful to tell hackers what you think is causing your problem. (If your diagnostic theories were such hot stuff, would you be consulting others for help?) So, make sure you're telling them the raw symptoms of what goes wrong, rather than your interpretations and theories. Let them do the interpretation and diagnosis. If you feel it's important to state your guess, clearly label it as such and describe why that answer isn't working for you.</p>
  
  <p>[...]</p>
  
  <p>Since the preceding point seems to be a tough one for many people to grasp, here's a phrase to remind you: "All diagnosticians are from Missouri." That US state's official motto is "Show me" (earned in 1899, when Congressman Willard D. Vandiver said "I come from a country that raises corn and cotton and cockleburs and Democrats, and frothy eloquence neither convinces nor satisfies me. I'm from Missouri. You've got to show me.") In diagnosticians' case, it's not a matter of skepticism, but rather a literal, functional need to see whatever is as close as possible to the same raw evidence that you see, rather than your surmises and summaries. Show us.<br />
  <a href="http://www.catb.org/~esr/faqs/smart-questions.html#symptoms">Source</a></p>
</blockquote>

<p>As online communities like IRC or forums are quite aware of the XY problem now, the people involved will often quickly focus on getting behind the issue presented. They will ask questions around the "why" do you want to do Y, what is the reason for you seeking help on Y etc. trying to uncover X.</p>

<p>They have been trained by numerous long winded discussions of why somebody would want to solve something as awkward as Y which slowly lead to uncover the unarticulated  underlying problems X.<sup id="fnref:Examples"><a href="#fn:Examples" rel="footnote">2</a></sup></p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:AltDef">
<p>There are many alternate definitions for the XY problem available on <a href="http://www.perlmonks.org/index.pl?node_id=542341" title="Perlmonks: XY Problem by John D. Porter">PerlMonks</a>. <a href="http://ikettu.blogspot.com/2011/11/xy-problem.html" title="Ilpo Kettunen's blog article on the XY problem">Some</a> - like <abbr title="Eric Steven Raymond">ESR</abbr> - define Y to be the original problem and X the offered solution. I stuck with Greg Wooledge and John D. Porter and used X to be the underlying problem and Y the exposed question or request. That occurs more intuitively to me and seems to be the more frequent definition. As they don't change the message both nomenclatures are fine and time will tell which one prevails.&#160;<a href="#fnref:AltDef" rev="footnote">&#8617;</a></p>
</li>

<li id="fn:Examples">
<p>Greg "GreyCat" Wooledge has collected examples of the XY problem in IRC communities in his <a href="http://mywiki.wooledge.org/XyProblem" title="GreyCat's XY Problem Wiki article">Wiki</a>.&#160;<a href="#fnref:Examples" rev="footnote">&#8617;</a></p>
</li>

</ol>
</div>
 <br /><a href="http://daniel-lange.com/archives/69-The-XY-problem-in-IT-management.html#extended">Continue reading "The XY problem in IT management"</a>
            </div>
        </content>

        <dc:subject>effectiveness</dc:subject>
<dc:subject>efficiency</dc:subject>
<dc:subject>esr</dc:subject>
<dc:subject>it</dc:subject>
<dc:subject>processes</dc:subject>
<dc:subject>projects</dc:subject>
<dc:subject>strategy</dc:subject>
<dc:subject>xy</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/66-ICQ-web-status-icons.html" rel="alternate" title="ICQ web status icons" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2012-02-11T10:56:00Z</issued>
        <created>2012-02-11T10:56:00Z</created>
        <modified>2012-02-11T11:15:19Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=66</wfw:comment>
        <slash:comments>3</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=66</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/66-guid.html</id>
        <title mode="escaped" type="text/html">ICQ web status icons</title>
        <content type="application/xhtml+xml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>ICQ has a feature to show your online status on a web page. You need to enable it in the "Security and Privacy" settings as indicated on <a href="http://www.icq.com/support/security/availability.html#ena" title="ICQ support web-page">ICQ's support page</a>.
Once you include <code>http://status.icq.com/online.gif?icq=&lt;ICQ-ID&gt;&amp;img=5</code> in a web page you can show your online status like this: <img src="http://daniel-lange.com/uploads/icons/icq/Online5.gif" alt="ICQ Online Icon #5" />(Online) and <img src="http://daniel-lange.com/uploads/icons/icq/Offline5.gif" alt="ICQ Offline Icon #5" />(Offline).</p>

<p>Now the page that used to show all the icons available (<code>img=&lt;number&gt;</code> parameter in the URL) <a href="http://en.wikipedia.org/wiki/HTTP_404" title="Wikipedia entry on HTTP error 404">404's</a> (with a very nice <a class="serendipity_image_link" title="forms_404cow.jpg" href='http://daniel-lange.com/uploads/entries/forms_404cow.jpg' onclick="F1 = window.open('/uploads/entries/forms_404cow.jpg','Zoom','height=273,width=359,top=471,left=788,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes'); return false;">404-cow</a>). Try at <a href="http://www.icq.com/features/web/indicator.html" title="ICQ page about the icons that 404'd at press time">http://www.icq.com/features/web/indicator.html</a> whether ICQ fixed their pages.</p>

<p>A friendly</p>

<div class="bash geshi" style="text-align: left"><span style="color: #c20cb9; font-weight: bold;">seq</span> <span style="color: #000000;">1</span> <span style="color: #000000;">30</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-n</span> <span style="color: #000000;">1</span> <span style="color: #660033;">-I</span> _num_ <span style="color: #c20cb9; font-weight: bold;">wget</span> <span style="color: #660033;">-O</span> Online_num_.gif &#160;<span style="color: #ff0000;">&quot;http://status.icq.com/online.gif?icq=197344872&amp;img=_num_&quot;</span></div>

<p>helped to get the Online (and similarly the Offline) icons in the mean time.</p>

<p>Looking at them I find these icons provide a nice glimpse into web design history.<br />
ICQ was founded 1996 and has seen a lot of changes between being sold to AOL 1998 and on to mail.ru in 2010. Aah, the '90s ... animated gifs anyone?<br />
As you probably risk eye-cancer looking at them too long, the full glory of the available ICQ icons delegated to the full article view...</p>
 <br /><a href="http://daniel-lange.com/archives/66-ICQ-web-status-icons.html#extended">Continue reading "ICQ web status icons"</a>
            </div>
        </content>

        <dc:subject>gif</dc:subject>
<dc:subject>icq</dc:subject>
<dc:subject>online</dc:subject>
<dc:subject>presence</dc:subject>
<dc:subject>status</dc:subject>
<dc:subject>web</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/64-Creating-iPhoneiPodiPad-notes-from-the-shell.html" rel="alternate" title="Creating iPhone/iPod/iPad notes from the shell" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2012-02-04T08:00:00Z</issued>
        <created>2012-02-04T08:00:00Z</created>
        <modified>2012-02-05T04:28:16Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=64</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=64</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/64-guid.html</id>
        <title mode="escaped" type="text/html">Creating iPhone/iPod/iPad notes from the shell</title>
        <content type="application/xhtml+xml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>I found a very nice script to create Notes on the iPhone from the command line by <a href="http://www.perlmonks.org/?node_id=123291" title="hossman's profile at Perlmonks">hossman</a> over at <a href="http://www.perlmonks.org/?node_id=851322" title="Manipulate iPhone 'Notes' folders by hossman">Perlmonks</a>.</p>

<p>For some weird reason Perlmonks does not allow me to reply with amendments even after I created an <a href="http://www.perlmonks.org/?node_id=951767" title="proof ... my Perlmonks account">account</a>. I can "preview" a reply at Perlmonks but after "create" I get "Permission Denied". Duh. <a href="http://www.perlmonks.org/?node=vroom" title="Perlmonk abbot">vroom</a>, if you want screenshots, contact me on IRC <img src="http://daniel-lange.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />.</p>

<p>As I wrote everything up for the Perlmonks reply anyways, I'll post it here instead.</p>

<p>Against hossman's version 32 from 2011-02-22 I changed the following:</p>

<ul>
<li>removed .pl from filename and documentation</li>
<li>added --list to list existing notes</li>
<li>added --hosteurope for Hosteurope mail account preferences and with it a sample how to add username and password into the script for unattended use</li>
<li>made the "Notes" folder the default (so -f Notes becomes obsolete)</li>
<li>added some UTF-8 conversions to make Umlauts working better (this is a mess in perl, see <a href="http://jeremy.zawodny.com/blog/archives/010546.html" title="Blog entry: The Perl UTF-8 and utf8 Encoding Mess">Jeremy Zawodny's writeup</a> and <a href="http://ahinea.com/en/tech/perl-unicode-struggle.html" title="Blog entry: Unicode-processing issues in Perl and how to cope with it">Ivan Kurmanov's blog entry</a> for some further solutions). Please try combinations of utf8::encode and ::decode, binmode utf8 for STDIN and/or STDOUT and the other hints from these linked blog entries in your local setup to get Umlauts and other non-7bit ASCII characters working. Be patient. There's more than one way to do it <img src="http://daniel-lange.com/templates/default/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />.</li>
</ul>

<p>I /msg'd hossman the URL of this blog entry.</p>
 <br /><a href="http://daniel-lange.com/archives/64-Creating-iPhoneiPodiPad-notes-from-the-shell.html#extended">Continue reading "Creating iPhone/iPod/iPad notes from the shell"</a>
            </div>
        </content>

        <dc:subject>imap</dc:subject>
<dc:subject>iphone</dc:subject>
<dc:subject>notes</dc:subject>
<dc:subject>perl</dc:subject>
<dc:subject>script</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/59-Apple-iPhone-ring-tones-Linux-style.html" rel="alternate" title="Apple iPhone ring tones Linux style" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2011-03-27T09:55:00Z</issued>
        <created>2011-03-27T09:55:00Z</created>
        <modified>2011-03-27T11:57:13Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=59</wfw:comment>
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=59</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/59-guid.html</id>
        <title mode="escaped" type="text/html">Apple iPhone ring tones Linux style</title>
        <content type="application/xhtml+xml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>Apple has crippled the iPhone to not allow normal music files as ringtones. Business decision. Technically any sub 40 second MP4 audio file will do once you rename it to <code>*.m4r</code> and drag-and-drop it to the ringtones folder of your phone in iTunes. Longer ones will work, too. But you'd need a jailbroken iPhone for that as iTunes will refuse to transfer the ringtone file if it's too long. Not much of an issue imho, who keeps ringing your phone for 40 seconds or more?</p>

<p>There's a gazillion websites available telling you how to convert a single .mp3-file to a ringtone with or without iTunes help and there are hundreds of tools doing that for you if you can't find out how to do it with just iTunes itself. Still the ones I tried failed for me as I wanted to convert my 20 or so standard ringtones from the good old Motorola K3 to iPhone ringtones all in one go. Without having to edit each one by hand. They are already nice ringtones and have served me well for years, just too long for the iPhone and in .mp3 format.</p>

<p>The basic processing sequence needed is</p>

<ol>
<li>Cut the .mp3 down to 39s</li>
<li>Convert the .mp3 -> .wav (with mplayer, normalize output gain while we're at it)</li>
<li>Convert the .wav -> .mp4 (with facc)</li>
<li>Clean up, GOTO 1 for next file</li>
</ol>

<p>So below is the free shell script to create multiple ringtones in one go on any Linux system. You need to install cutmp3, mplayer and faac for it, so <code>apt-get install cutmp3 mplayer faac</code> on Debian or Ubuntu. cutmp3 is currently not in the portage tree for Gentoo, but you can download an ebuild from <a href="http://www.fn-clan.de/downloads/gentoo/poly-c_overlay/media-sound/cutmp3/" title="Ebuild for cutmp3">Polynomial-C's overlay</a> (<a href="http://gentoo-overlays.zugaina.org/poly-c/portage/media-sound/cutmp3/" title="Poly-C mirror at gentoo-overlays.zugaina.org">mirror</a>). Or you just download the cutmp3 binary from <a href="http://www.puchalla-online.de/cutmp3.html" title="download Cutmp3 from the author's homepage">Jochen Puchalla's homepage</a>. There's no error checking in the script, so know your way around the shell before running it.</p>

<p>Without further ado:</p>

<div class="bash geshi" style="text-align: left"><span style="color: #666666; font-style: italic;">#!/bin/sh</span><br /><span style="color: #666666; font-style: italic;">#</span><br /><span style="color: #666666; font-style: italic;"># convert_to_ringtone file1.mp3 [file2.mp3, ...]</span><br /><span style="color: #666666; font-style: italic;"># Placed into the public domain by Daniel Lange, 2011.</span><br /><span style="color: #666666; font-style: italic;">#</span><br /><br /><span style="color: #000000; font-weight: bold;">for</span> arg<br /><span style="color: #000000; font-weight: bold;">do</span><br />&#160; &#160; &#160; &#160; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;Processing <span style="color: #007800;">$arg</span>...&quot;</span><br />&#160; &#160; &#160; &#160; cutmp3 <span style="color: #660033;">-c</span> <span style="color: #660033;">-a</span> <span style="color: #000000;">0</span>:<span style="color: #000000;">0.0</span> <span style="color: #660033;">-b</span> <span style="color: #000000;">0</span>:<span style="color: #000000;">39.0</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$arg</span>&quot;</span> <span style="color: #660033;">-O</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$arg</span>.tmp&quot;</span><br />&#160; &#160; &#160; &#160; <span style="color: #c20cb9; font-weight: bold;">mplayer</span> <span style="color: #660033;">-vo</span> null <span style="color: #660033;">-vc</span> null <span style="color: #660033;">-af</span> volnorm <span style="color: #660033;">-ao</span> pcm:fast:<span style="color: #007800;"><span style="color: #c20cb9; font-weight: bold;">file</span></span>=tmpfile.wav <span style="color: #ff0000;">&quot;<span style="color: #007800;">$arg</span>.tmp&quot;</span><br />&#160; &#160; &#160; &#160; faac <span style="color: #660033;">-b</span> <span style="color: #000000;">128</span> <span style="color: #660033;">-c</span> <span style="color: #000000;">44100</span> <span style="color: #660033;">-w</span> tmpfile.wav<br />&#160; &#160; &#160; &#160; <span style="color: #007800;">name</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$arg</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/.mp3//g'</span><span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">sed</span> <span style="color: #ff0000;">'s/ /_/g'</span><span style="color: #000000; font-weight: bold;">`</span><br />&#160; &#160; &#160; &#160; <span style="color: #c20cb9; font-weight: bold;">mv</span> tmpfile.m4a <span style="color: #007800;">$name</span>.m4r<br />&#160; &#160; &#160; &#160; <span style="color: #c20cb9; font-weight: bold;">rm</span> tmpfile.wav<br />&#160; &#160; &#160; &#160; <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$arg</span>.tmp&quot;</span><br />&#160; &#160; &#160; &#160; <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$arg</span> done.&quot;</span><br /><span style="color: #000000; font-weight: bold;">done</span><br />&#160;</div>

<p><a class="serendipity_image_link" title="Apple 1984 ad. When they we're thinking different." href='http://en.wikipedia.org/wiki/1984_(advertisement)' target="_blank"><!-- s9ymdb:535 --><img class="serendipity_image_center" width="305" height="228"  src="http://daniel-lange.com/uploads/Apple1984.jpg" title="Apple 1984 ad. When they were thinking differently." alt="Wikipedia article on Apple's 1984 ad." /></a></p>
 
            </div>
        </content>

        <dc:subject>apple</dc:subject>
<dc:subject>convert</dc:subject>
<dc:subject>iphone</dc:subject>
<dc:subject>mp3</dc:subject>
<dc:subject>mp4</dc:subject>
<dc:subject>ringtone</dc:subject>
<dc:subject>script</dc:subject>
<dc:subject>shell</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/57-Internations-Greasemonkey-script-to-enlarge-user-images-on-mouse-over.html" rel="alternate" title="Internations Greasemonkey script to enlarge user images on mouse over" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2010-11-19T14:00:00Z</issued>
        <created>2010-11-19T14:00:00Z</created>
        <modified>2011-11-20T12:11:49Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=57</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=57</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/57-guid.html</id>
        <title mode="escaped" type="text/html">Internations Greasemonkey script to enlarge user images on mouse over</title>
        <content type="application/xhtml+xml" xml:base="http://daniel-lange.com/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <p>We've recently relocated to Beijing, China. A fellow expatriate invited me to <a href="http://www.internations.org" title="Internations web page">Internations</a> which is basically Xing with a focus on people living (or having lived) abroad. As I've used the <a href="http://daniel-lange.com/archives/24-Greasemonkey-to-enlarge-Xing-pictures.html" title="Blog entry on the Xing Greasemonkey script">Xing Greasemonkey script</a> to enlarge user images on mouse over for years now, I missed that function  on Internations immediately.</p>

<p>So I created a derivative of the Xing script which you can download <a href="http://daniel-lange.com/software/internations_userimages.user.js" title="Greasemonkey script to enlarge user images on the Internations web pages. Click to install.">here (2kB), v1.1</a>.</p>

<p><!-- s9ymdb:532 --><img class="serendipity_image_center" width="429" height="260"  src="http://daniel-lange.com/uploads/entries/101119_internations_mouseover.jpg" title="Internations web page with Greasemonkey user image script installed" alt="Screenshot of the Internations web page" /></p>

<p>You need to install the <a href="http://www.greasespot.net/" title="Greasespot - Greasemonkey homepage">Greasemonkey</a> <a href="https://addons.mozilla.org/firefox/addon/748/" title="Firefox Addon page for Greasemonkey">Firefox Addon</a> and then click on the above download link to get the script which will automatically be active on Internations.</p>

<p>If you care, my shiny new Internations profile can be found <a href="http://www.internations.org/users/profile_general/240255" title="Daniel's page on Internations">here</a>.</p>

<h3>Updates:</h3>

<p>07.10.11 Updated to v1.1 to support Internations new NetDNA Content Distribution Network (in-cdn.net) URLs. Thanks to Marc for the prod via the comment below.</p>

<p>20.11.11 I've seen a new URL scheme in <a href="http://img.in-cdn.net/2011/11/16/9fa12e28400085e06a24ddaaf195ae65_p9260002_e__5.jpg">this image</a>. URL ending in _e__x.jpg. If that's not an error but a new scheme, I'll update the script to support it.</p>
 
            </div>
        </content>

        <dc:subject>greasemonkey</dc:subject>
<dc:subject>internations</dc:subject>
<dc:subject>javascript</dc:subject>
<dc:subject>xing</dc:subject>

    </entry>
    <entry>
        <link href="http://daniel-lange.com/archives/55-MINI-key-chrome-ring.html" rel="alternate" title="MINI key chrome ring" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2010-07-25T11:25:39Z</issued>
        <created>2010-07-25T11:25:39Z</created>
        <modified>2012-07-05T06:25:57Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=55</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/55-guid.html</id>
        <title mode="escaped" type="text/html">MINI key chrome ring</title>
        <content type="application/xhtml+xml" 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 wirelessly, 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/54-Keeping-IRC-nicks-active.html" rel="alternate" title="Keeping IRC nicks active" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2010-05-18T21:50:00Z</issued>
        <created>2010-05-18T21:50:00Z</created>
        <modified>2012-04-07T06:07:35Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=54</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/54-guid.html</id>
        <title mode="escaped" type="text/html">Keeping IRC nicks active</title>
        <content type="application/xhtml+xml" 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; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span><span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>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>
<dc:subject>updated</dc:subject>

    </entry>
    <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" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2010-01-09T19:00:00Z</issued>
        <created>2010-01-09T19:00:00Z</created>
        <modified>2012-06-22T09:29:47Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=53</wfw:comment>
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=53</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/53-guid.html</id>
        <title mode="escaped" type="text/html">Binding applications to a specific IP</title>
        <content type="application/xhtml+xml" 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; font-weight: bold;">@</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; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>bind.so firefox <span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000; font-weight: bold;">*</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; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</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>(&#42;)</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>Updates:</h3>

<p>22.06.12 Lennart Poettering has a IPv4 only version of a shim and a rather good readme available at <a href="http://0pointer.de/lennart/projects/fixsrcip/" title="Lennart Poettering's FixSrcIP">his site</a>.</p>

<p>29.11.10 Catalin M. Boie wrote another LD_PRELOAD shim, <a href="http://kernel.embedromix.ro/us/" title="Catalin(ux) Homepage">force_bind</a>. I have not tested this one. It's capable of handling IPv6 binds.</p>

<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)" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2009-12-21T17:10:00Z</issued>
        <created>2009-12-21T17:10:00Z</created>
        <modified>2009-12-21T16:38:43Z</modified>
        <wfw:comment>http://daniel-lange.com/wfwcomment.php?cid=52</wfw:comment>
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://daniel-lange.com/rss.php?version=atom0.3&amp;type=comments&amp;cid=52</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/52-guid.html</id>
        <title mode="escaped" type="text/html">Ubuntu Karmic 9.10 Bluetooth UMTS Dial-up (DUN)</title>
        <content type="application/xhtml+xml" 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" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2009-12-06T17:00:00Z</issued>
        <created>2009-12-06T17:00:00Z</created>
        <modified>2009-12-06T16:21:07Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=51</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/51-guid.html</id>
        <title mode="escaped" type="text/html">Kubuntu 9.10 (karmic) 64bit firefox java plugin</title>
        <content type="application/xhtml+xml" 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</p>

<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>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; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>jvm<span style="color: #000000; font-weight: bold;">/</span>java-<span style="color: #000000;">6</span>-sun<span style="color: #000000; font-weight: bold;">/</span>jre<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>amd64<span style="color: #000000; font-weight: bold;">/</span>libnpjp2.so <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>mozilla<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</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" type="text/html" />
        <author>
            <name>Daniel Lange</name>
                    </author>
    
        <issued>2009-12-06T16:10:00Z</issued>
        <created>2009-12-06T16:10:00Z</created>
        <modified>2009-12-06T16:18:24Z</modified>
        <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=atom0.3&amp;type=comments&amp;cid=50</wfw:commentRss>
    
        <id>http://daniel-lange.com/archives/50-guid.html</id>
        <title mode="escaped" type="text/html">Summer Fun</title>
        <content type="application/xhtml+xml" 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>
</feed>