<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>LUNIX</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/" />
    <link rel="self" type="application/atom+xml" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/atom.xml" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008-03-23:/~ritschi/lunix//2</id>
    <updated>2009-12-22T20:49:56Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.23-en</generator>

<entry>
    <title>GIMP Plugin (update 2)</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2009/12/gimp-plugin-update-2.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2009:/~ritschi/lunix//2.52</id>

    <published>2009-12-22T20:36:06Z</published>
    <updated>2009-12-22T20:49:56Z</updated>

    <summary>Once again, here is an update to my gimp plugin. NVIDIA released the first beta for CUDA 3.0 a few weeks ago and I updated the plugin for this version. Mainly the SDK layout changed a lot and the way...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="Mac OS X" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="gentoo" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>Once again, here is an update to my gimp plugin. NVIDIA released the first beta for CUDA 3.0 a few weeks ago and I updated the plugin for this version. Mainly the SDK layout changed a lot and the way the SDK is incorporated needed some updates. I hope I didn&#8217;t break any backward compatibility ;)</p>

<p>The plugin is still <span class="mt-enclosure mt-enclosure-file" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/downloads/gimp_plugin.tar.gz">here</a></span> available for download. It should work with any CUDA version from 2.0 up to 3.0 on GNU Linux and Mac OS X.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>Extending MT4 - Navigation Bar, Copyright, Justify, and Paginate</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2009/05/extending-mt4---navigation-bar.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2009:/~ritschi/lunix//2.51</id>

    <published>2009-05-16T09:22:44Z</published>
    <updated>2009-05-16T11:17:56Z</updated>

    <summary>Since I have to update my templates after each upgrade of Movable Type, I decided to list them here in order to find them again the next time :) Navigation Bar To get a navigation bar, we need to change...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>Since I have to update my templates after each upgrade of <a href="http://www.movabletype.org/">Movable Type</a>, I decided to list them here in order to find them again the next time :)  </p>

<p><br />
<strong>Navigation Bar</strong></p>

<p>To get a navigation bar, we need to change two things. Firstly, in the Banner Header add after the blogname description the navigation bar, e.g.</p>

<pre><code>&lt;div id="custom_nav" class="custom_nav"&gt;
    &lt;a href="http://www.richproductions.de/lunix"&gt;LUNIX&lt;/a&gt; |
    &lt;a href="http://www.richproductions.de/nz"&gt;New Zealand&lt;/a&gt; |
    &lt;a href="contact.html"&gt;Contact&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>Secondly, we add some css to the Stylesheet,  e.g. to get separation lines above and below of the navigation bar:</p>

<pre><code>#custom_nav {
    border-top: 2px solid #6699CC; /* d8e8f5 */
    padding: 7px 0;
    text-transform: uppercase;
    border-bottom: 2px solid #6699CC;
}

.custom_nav a:hover {
    color: #000000;
}
</code></pre>

<p>That&#8217;s it, rebuild your page and you should see the navigation bar!  </p>

<p><br />
<strong>Copyright Note</strong></p>

<p>To have your copyright at the bottom of the page, add the following to the Banner Footer template at the appropriate place (which updates the year automatically btw):</p>

<pre><code>&amp;nbsp;&amp;copy; 2002 - &lt;MTDate format="%Y"&gt; richproductions
</code></pre>

<p><br />
<strong>Justify Blog Entries</strong></p>

<p>In order to justify the blog entries, add to the Stylesheet the following lines:  </p>

<pre><code>.asset-content {
    text-align: justify;
}
</code></pre>

<p><br />
<strong>Pagination</strong></p>

<p>Get <a href="http://mt-hacks.com/pagination.html">Pagination</a>, follow the instructions and install it. After that I got the following error when accessing pages of my blog:</p>

<pre><code>The requested URL /~ritschi/~ritschi/text was not found on this server.
</code></pre>

<p>To get it working, you have to allow symbolic links in the apache configuration for the directory of you blog, e.g.</p>

<pre><code>&lt;Directory "/srv/www/mt"&gt;
    Options +FollowSymLinks
&lt;/Directory&gt;
</code></pre>
]]>
        

    </content>
</entry>

<entry>
    <title>GIMP Plugin (update)</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2009/02/gimp-plugin-update.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2009:/~ritschi/lunix//2.46</id>

    <published>2009-02-08T09:46:04Z</published>
    <updated>2009-04-26T15:04:59Z</updated>

    <summary>After installing CUDA on my new MacBook I tried to get also my GIMP plugin to work. I installed the latest version of GIMP from MacPorts and to my surprise the plugin just compiled and installed without any modifications. However,...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="Mac OS X" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>After installing CUDA on my new MacBook I tried to get also my GIMP plugin to work. I installed the latest version of GIMP from <a href="http://www.macports.org/">MacPorts</a> and to my surprise the plugin just compiled and installed without any modifications. However, when I chose the plugin from the GIMP menu only the CPU version worked. Some weeks later I stumbled across a post in the NVIDIA forums, which mentioned that the toolkit installer doesn&#8217;t install the kernel extension by default. That is why CUDA didn&#8217;t work! After I installed the missing kext manually, also the plugin worked flawlessly :)</p>

<p>The plugin can be still downloaded <span class="mt-enclosure mt-enclosure-file" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/downloads/gimp_plugin.tar.gz">here</a></span>. In the meanwhile it has been also tested and reported to work on some more Linux distributions and with CUDA 2.1.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>CUDA Challenge</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/10/cuda-challenge.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.45</id>

    <published>2008-10-05T18:22:26Z</published>
    <updated>2009-02-08T08:44:55Z</updated>

    <summary>Finally the winners of the NVIDIA&#8217;s CUDA Challenge Europe have been announced and I&#8217;m proud to be chosen as the first prize winner (official announcement, German version, Press Release of University). So according to the official announcement I&#8217;m &#8220;the most...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>Finally the winners of the NVIDIA&#8217;s CUDA Challenge Europe have been announced and I&#8217;m proud to be chosen as the first prize winner (<a href="http://www.nvidia.co.uk/object/io_1222782056939.html">official announcement</a>, <a href="http://www.nvidia.de/object/io_1222788368369.html">German version</a>, <a href="http://www.uni-erlangen.de/infocenter/meldungen/2008/personalmeldungen/auszeichnungen_funktionen2008.shtml">Press Release of University</a>). So according to the official announcement I&#8217;m &#8220;the most innovative graphics processing unit (GPU) programmer&#8221; :)</p>

<p>The plugin I wrote for <a href="http://www.gimp.org">GIMP</a> applies the multiresolution filter I investigated in my diploma thesis to grayscale images. The filter smooths an image while it preserves the details of interest. The filter was implemented using CUDA and runs on the GPU. Compared to a fully parallelized CPU version on a Xeon Quad Core a speedup of 25-35 can be achieved on a graphics card like a GeForce 8800 GTS. For normal CPUs the speedup is even higher. As seen in the screenshot below the size of the filter can be adjusted (geometric spread) and also a threshold value, which determines up to which level details of the images get smoothed (photometric spread):</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/assets_c/2008/10/gimp_plugin.html" onclick="window.open('http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/assets_c/2008/10/gimp_plugin.html','popup','width=408,height=461,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/assets_c/2008/10/gimp_plugin-thumb-200x225.png" width="200" height="225" alt="gimp_plugin.png" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span></p>

<p>The source of the plugin can be downloaded <span class="mt-enclosure mt-enclosure-file" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/downloads/gimp_plugin.tar.gz">here</a></span> and requires at least CUDA 2.0, the CUDA SDK, as well as gimp and its development libraries. Since kernel templates are currently not supported anymore in CUDA 2.0 I changed the code and use function overloading now, so don&#8217;t blame me for the bloated code ;) Tomorrow I will also upload the plugin to the CUDA Zone and to my homepage at work.</p>
]]>
        

    </content>
</entry>

<entry>
    <title>rctcosx - Rommel Widget</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/09/rctcosx---rommel-widget.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.44</id>

    <published>2008-09-23T13:51:01Z</published>
    <updated>2008-09-23T14:41:46Z</updated>

    <summary>Last update for the Rommel widget rctcosx, since I leave the student hostel. It still displays the basic information of the user, of the user&#8217;s cardwash account, and the current temperature in the hostel. The new version comes along in...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="Mac OS X" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>Last update for the Rommel widget rctcosx, since I leave the student hostel. It still displays the basic information of the user, of the user&#8217;s cardwash account, and the current temperature in the hostel. The new version comes along in a new look (in consistence with our new web design, though I liked the old one better) and was &#8220;ported&#8221; to use Dashcode. You can get the widget from <span class="mt-enclosure mt-enclosure-file" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/downloads/rctcosx.zip">rctcosx.zip</a></span> and the widget project from <span class="mt-enclosure mt-enclosure-file" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/downloads/rctcosx.wdgtproj.zip">rctcosx.wdgtproj.zip</a></span>.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/assets_c/2008/09/rctcosx_front1.html" onclick="window.open('http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/assets_c/2008/09/rctcosx_front1.html','popup','width=270,height=163,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/assets_c/2008/09/rctcosx_front-thumb-270x163.png" width="270" height="163" alt="rctcosx_front.png" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/assets_c/2008/09/rctcosx_back.html" onclick="window.open('http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/assets_c/2008/09/rctcosx_back.html','popup','width=270,height=163,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/assets_c/2008/09/rctcosx_back-thumb-270x163.png" width="270" height="163" alt="rctcosx_back.png" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span></p>
]]>
        

    </content>
</entry>

<entry>
    <title>suspend to disk (µswsusp)</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/08/suspend-to-disk-swsusp.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.42</id>

    <published>2008-08-08T19:58:03Z</published>
    <updated>2008-09-23T09:22:17Z</updated>

    <summary>After I set up a new boot system a few weeks ago, I tried to get also suspend to disk working. First I tried the suspend to disk support built directly into the Linux kernel. However it turned soon out...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="gentoo" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>After I set up a new <a href="http://www.richproductions.de/lunix/2008/07/minimal-boot-system-for-flash.html">boot system</a> a few weeks ago, I tried to get also suspend to disk working. First I tried the suspend to disk support built directly into the Linux kernel. However it turned soon out that this wouldn&#8217;t suit my needs as it support neither resume from encrypted devices nor from raid devices. Thus I tried my luck with <a href="http://suspend.sourceforge.net/">userspace suspend</a>. <br />
First I added the ~x86 keyword for suspend to /etc/portage/package.keywords and emerged the package into the boot image:  </p>

<blockquote>
  <p>ROOT=/boot_image USE=&#8221;static&#8221; emerge -av suspend</p>
</blockquote>

<p>Used /usr/sbin/s2disk to write the image to my encrypted raid1 swap partition and rebooted. When I called the resume binary (/usr/lib/suspend/resume) nothing happened, even no warning or error message. So I compiled the resume binary myself and added some debug information to the resume binary and got the following message:</p>

<blockquote>
  <p>The system snapshot image could not be read.  </p>
</blockquote>

<p>It turned out that the resume image was corrupted. After some googling I found this <a href="http://www.mail-archive.com/linux-raid@vger.kernel.org/msg07557.html">thread</a>, which says basically that s2disk doesn&#8217;t handle raid properly. As a matter of this when the raid is assembled on reboot the disks are not in a clean state and resync themselves, which leads probably to the corrupted image (at least resume thinks so). In the thread they suggest to set a variable in the sysfs that the raid should be assembled read-only and hence the resync would be delayed:</p>

<blockquote>
  <p>echo 1 > /sys/module/md<em>mod/parameters/start</em>ro  </p>
</blockquote>

<p>However it turned out that this doesn&#8217;t help anything, the raid starts to resync anyway. After some more investigations I found the solution: You can tell mdadm to assemble the raid under the assumption that the raid is clean avoiding the rebuild of the raid:</p>

<blockquote>
  <p>mdadm &#8212;build &#8212;assume-clean /dev/md1 &#8212;level=1 &#8212;raid-devices=2 /dev/sda1 /dev/sdb1  </p>
</blockquote>

<p>Finally I got it up and running :) After I added this to my init script I could resume from the resume image on my encrypted raid1 swap partition. Unfortunately after I removed all the debug stuff and used the resume binary from the boot image again, it stopped to work :/ I got the following error message although I didn&#8217;t use encryption of the image:</p>

<blockquote>
  <p>resume: Encryption not supported  </p>
</blockquote>

<p>As it turned out the 32bit resume binary can&#8217;t read the image stored by the 64bit s2disk binary. Thus I used a 64bit binary also on the boot system and got suspend to disk eventually working. </p>
]]>
        

    </content>
</entry>

<entry>
    <title>xfig problems</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/07/xfig-problems.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.41</id>

    <published>2008-07-25T18:50:44Z</published>
    <updated>2008-09-23T09:28:00Z</updated>

    <summary>This week I needed xfig to edit some figures, however my font path wasn&#8217;t set up correctly on gentoo, at least for xfig, and I got the following message (despite of ugly tiny default fonts): File /home/ritschi/thesis/graphics/mrfilt.fig: Can&#8217;t find --helvetica-medium-r-narrow&#8212;13------ISO8859-,...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="Mac OS X" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="gentoo" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>This week I needed xfig to edit some figures, however my font path wasn&#8217;t set up correctly on gentoo, at least for xfig, and I got the following message (despite of ugly tiny default fonts): </p>

<blockquote>
  <p>File /home/ritschi/thesis/graphics/mrfilt.fig: <br />
Can&#8217;t find -<em>-helvetica-medium-r-narrow&#8212;13-</em>-<em>-</em>-<em>-</em>-ISO8859-<em>, using 6x13 <br />
Can&#8217;t find -</em>-helvetica-medium-r-narrow&#8212;10-<em>-</em>-<em>-</em>-<em>-ISO8859-</em>, using 6x13  </p>
</blockquote>

<p>In order to get the fonts working, I had to add the following line to my xorg config (/etc/X11/xorg.conf ) and to restart X:</p>

<blockquote>
  <p>FontPath        &#8220;/usr/share/fonts/default/ghostscript&#8221;  </p>
</blockquote>

<p>Installing xfig on my MacBook from MacPorts yielded first the following warning:</p>

<blockquote>
  <p>Either you have a very old app-defaults file installed (Fig), or there is none installed at all. You should install the correct version or you may lose some features. This may be done with &#8220;make install&#8221; in the xfig source directory.  </p>
</blockquote>

<p>This is because MacPorts mixes the paths and X11 uses /usr/X11/lib/X11/app-defaults, while MacPorts installs the files in /opt/local/lib/X11/app-defaults. Just copy the files to the X11 folder and the warning will go away. Anyway in order to get rid of the first message, the font path for X11 has to be corrected. Till now I haven&#8217;t found a way to do this permanently, so I have to do it every time currently:</p>

<blockquote>
  <p>cd /usr/X11/lib/X11/fonts <br />
ln -sf /opt/local/share/ghostscript/fonts/ ghostscript <br />
fc-cache ghostscript <br />
xset fp+ /usr/X11/lib/X11/fonts/ghostscript <br />
xset fp rehash <br />
xfig  </p>
</blockquote>
]]>
        

    </content>
</entry>

<entry>
    <title>minimal boot system for flash device (BusyBox + uClibc)</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/07/minimal-boot-system-for-flash.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.40</id>

    <published>2008-07-20T19:39:31Z</published>
    <updated>2008-09-23T09:23:33Z</updated>

    <summary>Yesterday I updated my boot system, which I use to boot my system from an USB flash drive. It&#8217;s consists basically of BusyBox, the swiss army knife of embedded Linux and uClibc, a small c library for embedded systems plus...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="gentoo" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>Yesterday I updated my boot system, which I use to boot my system from an USB flash drive. It&#8217;s consists basically of <a href="http://busybox.net/">BusyBox</a>, the swiss army knife of embedded Linux and <a href="http://www.uclibc.org/">uClibc</a>, a small c library for embedded systems plus some more tools, which I need to setup Raid and to decrypt my devices before switching to my main system. Here are the steps needed to build the system based on a stage3 snapshot of gentoo sources:</p>

<p>First get the snapshot, unpack it and update it: </p>

<blockquote>
  <p>wget http://de-mirror.org/distro/gentoo/experimental/x86/embedded/stages/stage3-x86-uclibc-2008.0.tar.bz2 <br />
tar xvfz stage3-x86-uclibc-2008.0.tar.bz2 -C boot<em>system/ <br />
mount -t proc proc /boot/boot</em>system/proc <br />
cp -L /etc/resolv.conf /boot/boot<em>system/etc/ <br />
chroot /boot/boot</em>system /bin/bash <br />
env-update &amp;&amp; source /etc/profile <br />
emerge sync <br />
emerge -auDv world  </p>
</blockquote>

<p>after that make a directory for your boot system and emerge all required packages: </p>

<blockquote>
  <p>mkdir /boot<em>image <br />
ROOT=/boot</em>image USE=&#8221;static make-symlinks&#8221; emerge -av busybox mdadm <br />
ROOT=/boot_image USE=&#8221;static&#8221; emerge -av =gnupg-1.4.9 cryptsetup  </p>
</blockquote>

<p>create the config for mdadm:</p>

<blockquote>
  <p>/sbin/mdadm &#8212;detail &#8212;scan >> /boot_image/etc/mdadm.conf  </p>
</blockquote>

<p>Having the system set up, we still need to build an initrd or initramfs, which can be both loaded at boot time. I choose the latter one and you have just to tell the kernel where your boot system resides. This is done by setting the CONFIG<em>INITRAMFS</em>SOURCE in the kernel config. Mine looks like this:</p>

<blockquote>
  <p>CONFIG<em>INITRAMFS</em>SOURCE=&#8221;/boot/boot<em>image /boot/cpio</em>list&#8221;  </p>
</blockquote>

<p>/boot/boot<em>image is the system create above and /boot/cpio</em>list contains some nodes required at bootup (early userspace), which are not created by busybox:</p>

<blockquote>
  <p># supporting directories <br />
dir /proc 0755 0 0 <br />
dir /sys 0755 0 0 <br />
dir /root 0755 0 0 <br />
dir /dev 0755 0 0 <br />
#initial device files required (mdev creates the rest) <br />
nod /dev/console 0600 0 0 c 5 1 <br />
nod /dev/null 0666 0 0 c 1 3  </p>
</blockquote>
]]>
        

    </content>
</entry>

<entry>
    <title>HowTo convert jpg to pdf</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/07/howto-convert-jpg-to-pdf.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.39</id>

    <published>2008-07-13T15:02:27Z</published>
    <updated>2008-09-23T09:27:29Z</updated>

    <summary>Recently I had to convert some scans to pdf. Unfortunately the scaned documents were only available as jpg, so I was looking for a way to convert these (huge) images into one pdf. First I thought ok, let&#8217;s use convert (which is part of ImageMagick,...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>Recently I had to convert some scans to pdf. Unfortunately the scaned documents were only available as jpg, so I was looking for a way to convert these (huge) images into one pdf. First I thought ok, let&#8217;s use convert (which is part of <a href="http://www.imagemagick.org">ImageMagick</a>, however it turned out that the output pdf got either bloated (700kbyte -> 11Mbyte!!!) or had poor quality when the images where previously scaled down. </p>

<p>After trying heaps of tools with unsatisfying results, I finally found a package called leptonica-progs, which provides a tool called converttops to convert images directly into ps files while preserving good quality and holding down the file size.</p>

<p>Install leptonica-progs:</p>

<blockquote>
  <p>aptitude install leptonica-progs</p>
</blockquote>

<p>preprocess images to reduce filesize:</p>

<blockquote>
  <p>convert input.jpg - resize 50% output.jpg</p>
</blockquote>

<p>convert jpg to ps:</p>

<blockquote>
  <p>/usr/bin/leptonica/converttops input.jpg output.ps</p>
</blockquote>

<p>convert ps to pdf:</p>

<blockquote>
  <p>ps2pdf *ps</p>
</blockquote>

<p>join the pdf files into a single one:</p>

<blockquote>
  <p>pdfjoin *pdf</p>
</blockquote>
]]>
        

    </content>
</entry>

<entry>
    <title>iRed Lite layer for Adobe Reader</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/05/ired-lite-layer-for-adobe-read.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.38</id>

    <published>2008-05-25T13:47:28Z</published>
    <updated>2008-09-23T09:27:03Z</updated>

    <summary>Today I was looking for a way to use my Apple Remote as a remote control for presentations. The solution of my choice was iRed Lite, a small program, which allows to write layers to control applications. Unfortunately there was...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="Mac OS X" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>Today I was looking for a way to use my Apple Remote as a remote control for presentations. The solution of my choice was <a href="http://www.filewell.com/iRedLite">iRed Lite</a>, a small program, which allows to write layers to control applications. Unfortunately there was no layer for Adobe Reader, so I wrote one, which can be downloaded <span class="mt-enclosure mt-enclosure-file" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/downloads/Adobe_Reader.irla">here</a></span>.  </p>

<p>Basically it performs the following mapping:  </p>

<ul>
<li>next slide: ></li>
<li>previous slide: &lt;</li>
<li>last slide: >></li>
<li>first slide: &lt;&lt;</li>
<li>start/stop presentation mode: play</li>
<li>zoom in: +</li>
<li>zoom out: -</li>
<li>zoom to fit: ++</li>
<li>actual size: &#8212;</li>
</ul>
]]>
        

    </content>
</entry>

<entry>
    <title>synergy on Leopard</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/05/synergy-on-leopard.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.37</id>

    <published>2008-05-12T07:42:36Z</published>
    <updated>2008-09-23T09:24:28Z</updated>

    <summary>For some time now I connected my MacBook to an external display and use it in clamshell mode. Therefore I use a litte tool called synergy as a KM switch, which shares one keyboard and mouse (and your clipboard!) via...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="Mac OS X" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>For some time now I connected my MacBook to an external display and use it in clamshell mode. Therefore I use a litte tool called <a href="http://synergy2.sourceforge.net">synergy</a> as a KM switch, which shares one keyboard and mouse (and your clipboard!) via network between several computers. However I had some troubles to start synergy automatically as described on its homepage.</p>

<p>In order to start synergy automatically when you log in, you have to use launchd for Leopard. Create a plist file for launchd with the configuration for synergy, e.g. /Library/LaunchAgents/net.sourceforge.synergy2.plist:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;net.sourceforge.synergy2&lt;/string&gt;
    &lt;key&gt;ServiceDescription&lt;/key&gt;
    &lt;string&gt;Synergy Client&lt;/string&gt;
    &lt;key&gt;OnDemand&lt;/key&gt;
    &lt;false/&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/opt/local/bin/synergyc&lt;/string&gt;
        &lt;string&gt;--no-daemon&lt;/string&gt;
        &lt;string&gt;--no-restart&lt;/string&gt;
        &lt;string&gt;--debug&lt;/string&gt;
        &lt;string&gt;WARNING&lt;/string&gt;
        &lt;string&gt;--name&lt;/string&gt;
        &lt;string&gt;MacBook&lt;/string&gt;
        &lt;string&gt;192.168.1.1&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;true/&gt;
&lt;/dict&gt;
&lt;/plist&gt;
</code></pre>

<p>After this adjust the permissions of the file:</p>

<blockquote>
  <p>sudo chown root:wheel /Library/LaunchAgents/net.sourceforge.synergy2.plist</p>
</blockquote>

<p>and to load or unload the daemon tell launchd to load the script:</p>

<blockquote>
  <p>sudo launchctl unload /Library/LaunchAgents/net.sourceforge.synergy2.plist <br />
sudo launchctl load /Library/LaunchAgents/net.sourceforge.synergy2.plist</p>
</blockquote>
]]>
        

    </content>
</entry>

<entry>
    <title>proxy setting and MacPorts 1.6</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/05/proxy-setting-and-macports-16.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.36</id>

    <published>2008-05-12T07:14:23Z</published>
    <updated>2008-09-23T09:25:22Z</updated>

    <summary>Since MacPorts 1.6 on Leopard (or even earlier?) the proxy environment setting doesn&#8217;t work anymore. In order to get the latest MacPorts use the proxy, you have to set the variable explicitly before running the port command, e.g. sudo env ftp_proxy=&#8221;http://proxy.rommel.stw.uni-erlangen.de:80&#8221; port...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="Mac OS X" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>Since <a href="http://www.macports.org">MacPorts 1.6</a> on Leopard (or even earlier?) the proxy environment setting doesn&#8217;t work anymore. In order to get the latest MacPorts use the proxy, you have to set the variable explicitly before running the port command, e.g.</p>

<blockquote>
  <p>sudo env ftp_proxy=&#8221;http://proxy.rommel.stw.uni-erlangen.de:80&#8221; port -d -u upgrade outdated</p>
</blockquote>

<p>In addition you have to tell port to honour these variabled in your macports.conf (/opt/local/etc/macports/macports.conf):</p>

<blockquote>
  <p>extra<em>env               http</em>proxy https<em>proxy ftp</em>proxy all<em>proxy no</em>proxy</p>
</blockquote>
]]>
        

    </content>
</entry>

<entry>
    <title>transparent hardstatus in screenrc</title>
    <link rel="alternate" type="text/html" href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/2008/03/transparent-hardstatus-in-scre.html" />
    <id>tag:www.rommel.stw.uni-erlangen.de,2008:/~ritschi/lunix//2.35</id>

    <published>2008-03-23T21:37:53Z</published>
    <updated>2009-05-16T10:44:54Z</updated>

    <summary>After fiddling about with the hardstatus of screen, which is btw a great tool developed here in Erlangen at the Friedrich-Alexander University, I managed to get a transparent hardstatus: hardstatus alwayslastline hardstatus string &#8216;%{= 9g}[ %{G}%H %{= 9g}][%= %{= 9w}%?%-Lw%?%{=...</summary>
    <author>
        <name>ritschi</name>
        
    </author>
    
        <category term="linux" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en" xml:base="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/">
        <![CDATA[<p>After fiddling about with the hardstatus of screen, which is btw a great tool developed here in Erlangen at the <a href="http://www.fau.de">Friedrich-Alexander University</a>, I managed to get a transparent hardstatus:</p>

<blockquote>
  <p>hardstatus alwayslastline <br />
hardstatus string &#8216;%{=  9g}[ %{G}%H %{=  9g}][%= %{=  9w}%?%-Lw%?%{=  9R}(%{W}%n*%f %t%?(%u)%?%{=  9R})%{=  9w}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}]%{=  C}[ %m/%d/%y %c ]%{W}&#8217;</p>
</blockquote>

<p>This gives you a transparent status bar at the bottom of your screen session showing the hostname of your box, active and open sessions as well as date and load. For more examples, have a look at <a href="http://gentoo-wiki.com/TIP_Using_screen">gentoo wiki&#8217;s TIP on using screen</a>.</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/images/transparent_screen_hardstatus.html" onclick="window.open('http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/images/transparent_screen_hardstatus.html','popup','width=1280,height=800,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://www.rommel.stw.uni-erlangen.de/~ritschi/lunix/images/transparent_screen_hardstatus-thumb-160x100.png" width="160" height="100" alt="transparent_screen_hardstatus.png" class="mt-image-center" style="text-align: center; display: block; margin: 0 auto 20px;" /></a></span></p>

<p>I had also some trouble getting bash&#8217;s profile sourced in Leopard when using screen, because no login shell was started by default. However adding the following line to my .screenrc solved this issue:</p>

<blockquote>
  <p>shell -/bin/bash</p>
</blockquote>
]]>
        

    </content>
</entry>

</feed>

