<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.6(BH)" -->
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Planet Maemo: category &quot;feed:dc2d42ffa90d409ad35691447d64bb45&quot;</title>
        <description>Blog entries from Maemo community</description>
        <link>http://maemo.org/news/planet-maemo/</link>
        <lastBuildDate>Sun, 24 May 2026 06:25:34 +0000</lastBuildDate>
        <generator>FeedCreator 1.7.6(BH)</generator>
        <language>en</language>
        <managingEditor>planet@maemo.org</managingEditor>
        <item>
            <title>Incorporating 3D Gaussian Splats into the graphics pipeline</title>
            <link>https://www.rojtberg.net/2801/incorporating-3d-gaussian-splats-into-the-graphics-pipeline/</link>
            <description><![CDATA[

<p>3D Gaussian splatting is the emerging rendering technique that is overtaking NeRFs. Since it is centered around point primitives, it is more compatible with traditional graphics pipelines that already support point rendering.</p>



<p>Gaussian splats essentially enhance the concept of point rendering by converting the point primitive into a 3D ellipsoid, which is then projected into 2D during the rendering process.. This concept was initially described in 2002 [3], but the technique of extending Structure from Motion scans in this way was only detailed more recently [1].</p>



<p>In this post, I explore how to integrate Gaussian splats into the traditional graphics pipeline. This allows them to be used alongside triangle-based primitives and interact with them through the depth buffer for occlusion (see header image). This approach also simplifies deployment by eliminating the need for CUDA.</p>


<h2 class="wp-block-heading" id="storage">Storage</h2>


<p>The original implementation uses<a href="https://github.com/graphdeco-inria/gaussian-splatting/blob/472689c0dc70417448fb451bf529ae532d32c095/scene/__init__.py#L85C9-L85C13"> .ply files as their checkpoint format</a>, focusing on maintaining training-relevant data structures at the expense of storage efficiency, leading to increased file sizes.</p>



<p>For example, it stores the covariance as scaling and a rotation quaternion, necessitating reconstruction during rendering. A more efficient approach would be to leverage orthogonality, storing only the diagonal and upper triangular vectors, thereby eliminating reconstruction and reducing storage requirements.</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="579" src="https://www.rojtberg.net/wp-content/uploads/2024/06/psize-1024x579.webp" alt="" class="wp-image-2823" srcset="https://www.rojtberg.net/wp-content/uploads/2024/06/psize-1024x579.webp 1024w, https://www.rojtberg.net/wp-content/uploads/2024/06/psize-300x170.webp 300w, https://www.rojtberg.net/wp-content/uploads/2024/06/psize-768x434.webp 768w, https://www.rojtberg.net/wp-content/uploads/2024/06/psize-1536x868.webp 1536w, https://www.rojtberg.net/wp-content/uploads/2024/06/psize.png 1888w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Further analysis of the storage usage for each attribute shows that the spherical harmonics of orders 1-3 are the main contributors to the file size. However, according to the ablation study in the original publication [1], these harmonics only lead to a modest PSNR improvement of 0.5.</p>



<p>Therefore, the most straightforward way to decrease storage is by discarding the higher-order spherical harmonics. Additionally, the level 0 spherical harmonics can be converted into a diffuse color and merged with opacity to form a single RGBA value. These simple yet effective methods were implemented in one of the early WebGL implementations, resulting in <a href="https://github.com/antimatter15/splat/blob/main/convert.py">the .splat format.</a> As an added benefit, this format can be easily interpreted by viewers unaware of Gaussian splats as a simple colored point cloud:</p>



<figure class="wp-block-image size-large is-resized"><a href="https://www.rojtberg.net/wp-content/uploads/2024/06/opoints.webp"><img decoding="async" width="1024" height="576" src="https://www.rojtberg.net/wp-content/uploads/2024/06/opoints-1024x576.webp" alt="" class="wp-image-2828" style="width:690px;height:auto" srcset="https://www.rojtberg.net/wp-content/uploads/2024/06/opoints-1024x576.webp 1024w, https://www.rojtberg.net/wp-content/uploads/2024/06/opoints-300x169.webp 300w, https://www.rojtberg.net/wp-content/uploads/2024/06/opoints-768x432.webp 768w, https://www.rojtberg.net/wp-content/uploads/2024/06/opoints-1536x864.webp 1536w, https://www.rojtberg.net/wp-content/uploads/2024/06/opoints.webp 1920w" sizes="(max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Results using a non Gaussian-splat aware renderer</figcaption></figure>



<p>By directly storing the covariance as previously mentioned we can reduce the precision from <code class="" data-line="">float32</code> to <code class="" data-line="">float16</code>, thereby halving the storage needed for that data. Furthermore, since most splats have limited spatial extents, we can also utilize <code class="" data-line="">float16</code> for position data, yielding additional storage savings.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="564" src="https://www.rojtberg.net/wp-content/uploads/2024/06/psize_splat-1024x564.webp" alt="" class="wp-image-2825" srcset="https://www.rojtberg.net/wp-content/uploads/2024/06/psize_splat-1024x564.webp 1024w, https://www.rojtberg.net/wp-content/uploads/2024/06/psize_splat-300x165.webp 300w, https://www.rojtberg.net/wp-content/uploads/2024/06/psize_splat-768x423.webp 768w, https://www.rojtberg.net/wp-content/uploads/2024/06/psize_splat-1536x846.webp 1536w, https://www.rojtberg.net/wp-content/uploads/2024/06/psize_splat.png 1855w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>With these changes, we achieve a storage requirement of 22 bytes per splat, in contrast to the 44 bytes needed by the .splat format and 236 bytes in the original implementation. Thus, we have attained a 10x reduction in storage compared to the original implementation simply by using more suitable data types.</p>



<p></p>


<h2 class="wp-block-heading" id="blending">Blending</h2>


<p>The image formation model presented in the original paper [1] is similar to the NeRF rendering, as it is compared to it. This involves casting a ray and observing its intersection with the splats, which leads to front-to-back blending. This is precisely the approach taken by the <a href="https://github.com/graphdeco-inria/diff-gaussian-rasterization/blob/main/cuda_rasterizer/forward.cu#L355">provided CUDA implementation</a>.</p>



<p>Blending remains a component of the fixed-function unit within the graphics pipeline, which can be set up for front-to-back blending [2] by using the factors <code class="" data-line="">(one_minus_dest_alpha, one)</code> and by multiplying color and alpha in the shader as <code class="" data-line="">color.rgb * color.a</code>. This results in the following equation:</p>



<span class="katex-eq" data-katex-display="false">\begin{aligned}C_{dst} &amp;= (1 - \alpha_{dst}) \cdot \alpha_{src} C_{src} &amp;+ C_{dst}\\ \alpha_{dst} &amp;= (1 - \alpha_{dst})\cdot\alpha_{src} &amp;+ \alpha_{dst}\end{aligned}</span>



<p></p>



<p>However, this method requires the framebuffer alpha value to be zero before rendering the splats, which is not typically the case as any previous render pass could have written an arbitrary alpha value.</p>



<p>A simple solution is to switch to back-to-front sorting and use the standard alpha blending factors <code class="" data-line="">(src_alpha, one_minus_src_alpha)</code> for the following blending equation:</p>



<span class="katex-eq" data-katex-display="false">C_{dst} = \alpha_{src} \cdot C_{src} + (1 - \alpha_{src}) \cdot C_{dst}</span>



<p></p>



<p>This allows us to regard Gaussian splats as a special type of particles that can be rendered together with other transparent elements within a scene.</p>


<h2 class="wp-block-heading" id="references">References</h2>


<ol class="wp-block-list">
<li>Kerbl, Bernhard, et al. &#8220;3d gaussian splatting for real-time radiance field rendering.&#8221; <em>ACM Transactions on Graphics</em> 42.4 (2023): 1-14.</li>



<li>Green, Simon. &#8220;Volumetric particle shadows.&#8221; <em>NVIDIA Developer Zone</em> (2008).</li>



<li>Zwicker, Matthias, et al. &#8220;EWA splatting.&#8221; <em>IEEE Transactions on Visualization and Computer Graphics</em> 8.3 (2002): 223-238.</li>
</ol>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ef2cc28da04aa22cc211ef86e6377dfed6ec0fec0f&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ef2cc28da04aa22cc211ef86e6377dfed6ec0fec0f/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ef2cc28da04aa22cc211ef86e6377dfed6ec0fec0f&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ef2cc28da04aa22cc211ef86e6377dfed6ec0fec0f/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Mon, 17 Jun 2024 13:28:33 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ef2cc28da04aa22cc211ef86e6377dfed6ec0fec0f</guid>
        </item>
        <item>
            <title>stb_image_resize2.h – performance</title>
            <link>https://www.rojtberg.net/2754/stb_image_resize2-h-performance/</link>
            <description><![CDATA[

<p>Recently there was an large rework to the STB single-file image_resize library (STBIR) bumping it to 2.0. While the v1 was really slow and merely usable if you needed to quickly get some code running, <a href="https://github.com/nothings/stb/blob/master/stb_image_resize2.h">the 2.0 rewrite</a> claims to be more considerate of performance by using SIMD. So lets put it to a test.</p>



<p>As references, I chose the moderately optimized C only <a href="https://github.com/OGRECave/ogre/blob/04fdc54eafdcb5732757122715e0fd4ae696e238/OgreMain/src/OgreImageResampler.h#L284">implementation of Ogre3D</a> and the highly optimized SIMD implementation in OpenCV.</p>



<p>Below you find time to scale a 1024x1024px byte image to 512x512px. All libraries were set to linear interpolation. The time is the accumulated time for 200 runs.</p>



<figure class="wp-block-table"><table><tbody><tr><td></td><td>RGB</td><td>RGBA</td></tr><tr><td>Ogre3D 14.1.2</td><td>660 ms</td><td>668 ms</td></tr><tr><td>STBIR 2.01</td><td>632 ms</td><td>690 ms</td></tr><tr><td>OpenCV 4.8</td><td>245 ms</td><td>254 ms</td></tr></tbody></table></figure>



<p>For the RGBA test, STIBIR was set to the <code class="" data-line="">STBIR_4CHANNEL</code> pixel layout. All libraries were compiled with <code class="" data-line="">-O2 -msse</code>. Additionally OpenCV could dispatch AVX2 code. Enabling AVX2 with STBIR actually decreased performance.</p>



<p>Note that while STBIR has no performance advantage over a C only implementation for the simple resizing case, it offers some neat features if you want to handle SRGB data or non-premultiplied alpha.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ee88e30be696a288e311ee8094cde9c1c4066a066a&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ee88e30be696a288e311ee8094cde9c1c4066a066a/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ee88e30be696a288e311ee8094cde9c1c4066a066a&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ee88e30be696a288e311ee8094cde9c1c4066a066a/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Wed, 15 Nov 2023 13:50:28 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ee88e30be696a288e311ee8094cde9c1c4066a066a</guid>
        </item>
        <item>
            <title>Do not fall for the Synology Hardware SCAM</title>
            <link>https://www.rojtberg.net/2679/do-not-fall-for-the-synology-hardware-scam/</link>
            <description><![CDATA[

<p>I recently needed some NAS and went with the &#8220;Synology RS1221+&#8221; barebone system. The system is competitively priced when compared to the similar &#8220;QNAP TS-873AeU-4G&#8221;.</p>


<h2 class="wp-block-heading" id="synology-hdd">Synology HDD</h2>


<p>For storage, the sweet spot between price and capacity was at 18TB. Lets look at some options:</p>



<figure class="wp-block-table"><table><tbody><tr><td>Toshiba MG09ACA 18TB</td><td>270€</td></tr><tr><td>Seagate Exos X X18</td><td>280€</td></tr><tr><td>Synology HAT5310-18T</td><td>700€</td></tr></tbody></table></figure>



<p>Depending on the benchmark sometimes the Toshiba comes out on top and sometimes the Seagate. Both are similarly priced, so thats fine.<br />However, talking of the price the Synology HDD stands out by asking a 150% premium.<br />You might now wonder whether you also get a better performance or other features in return. Well.. guess which is the only 18TB HDD that <a href="https://www.synology.com/de-de/compatibility?search_by=products&amp;model=RS1221%2B&amp;category=hdds_no_ssd_trim&amp;p=1&amp;change_log_p=1">is verified by Synology</a> for the RS1221+?</p>



<p>The scammy part here however is that the HAT5300 series are just rebranded Toshiba Drives with a different firmware. So the HAT5310 likely is just the MG09ACA and the main difference is the profit margin.<br />Note that different firmware does not result in any noticeable difference in performance.</p>



<p>I went with the unverified Seagate drives and &#8211; as one might expect &#8211; there are zero issues with doing so.</p>


<h2 class="wp-block-heading" id="synology-ram">Synology RAM</h2>


<p>At this point you might say, well Synology just did not get to test more 18TB drives.<br />Well.. I found the 4GB RAM rather tight and wanted to upgrade to 32GB as RAM is currently quite cheap anyway.</p>



<p>The options here are</p>



<figure class="wp-block-table"><table><tbody><tr><td>Kingston KSM26SED8/16HD</td><td>50€</td></tr><tr><td>Synology D4ECSO-2666-16G</td><td>350€</td></tr></tbody></table></figure>



<p>I think there appears to be a pattern here. Again, both options have the same specs i.e. DDR4 2666, ECC SO-DIMM. Maybe Synology even rebranded the Kingston modules too, but I did not verify this.</p>



<p>While the DiskManager did not complain about the Seagate HDD, there is a warning when going with Kingston now. I guess this is because it matters even less.</p>



<p>To conclude this, I first want to emphasizes that both the Synology NAS Hardware and their DiskManager software work great with non Synology Hardware &#8211; just as one would expect of a standard x86 platform.</p>



<p>It is just a pity that they try to FUD you into buying their overpriced HDD and RAM.<br />Basically this is the same game as with printer vendors predicting ravages and annihilation when using 3rd party ink.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ee88e3089e4aa888e311ee8094cde9c1c4066a066a&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ee88e3089e4aa888e311ee8094cde9c1c4066a066a/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ee88e3089e4aa888e311ee8094cde9c1c4066a066a&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ee88e3089e4aa888e311ee8094cde9c1c4066a066a/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Sat, 01 Apr 2023 13:03:55 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ee88e3089e4aa888e311ee8094cde9c1c4066a066a</guid>
        </item>
        <item>
            <title>Logitech M720 Triathlon mouse – long-term review</title>
            <link>https://www.rojtberg.net/2345/logitech-m720-triathlon-mouse-long-term-review/</link>
            <description><![CDATA[

<p>In this post I want to take a look at the Logitech M720 mouse after having used it for 2.5 years.</p>


<h2 class="simpletoc-title">Table of Contents</h2>
<ul class="simpletoc-list">
<li><a href="#specs-and-durability">Specs and durability</a>

</li>
<li><a href="#builtin-obsolescence">Built-in obsolescence</a>


<ul><li>
<a href="#rubber-coating">Rubber coating</a>

</li>
<li><a href="#bad-switches">Bad switches</a>
</li>
</ul>
</li></ul>

<h2 class="wp-block-heading" id="specs-and-durability">Specs and durability</h2>


<p>The specs are pretty common for a mouse you get today, so lets start with the special features:</p>



<ul class="wp-block-list">
<li>There are side buttons, which I find pretty handy for navigating front/ back in the browser or a file manager</li>



<li>It can be paired with up to 3 devices at the same time, which makes it easy to use with your PC, Laptop and Tablet</li>



<li>It supports both Bluetooth LE and the Logitech Wireless Receiver</li>



<li>It is powered by a single, replaceable AA battery</li>
</ul>



<p>Especially the last two points make this seem to be future-proof product that you can use for a long time.</p>



<p>Logitech is currently replacing their <em>Wireless Receiver</em> dongles by <em>Logitech Bolt</em>, so in the near future the Wireless Receivers will go away. But thanks to the Bluetooth support you will still be able to use the mouse without having to occupy a USB port just for using it.</p>



<p>Then, using standard AA batteries means that you just use some nice rechargeable ones. This means that you will never have to wait for the mouse to charge and that the mouse can out-live the battery. As you are probably aware from using your phone, rechargeable batteries wear-out over time until the device cannot be properly used any more.</p>



<p>So we finally got a mouse for the years to come? Well.. </p>


<h2 class="wp-block-heading" id="builtin-obsolescence">Built-in obsolescence</h2>


<p>Unfortunately, Logitech made some design decision that drastically shorten the life-span of the device, even though <a href="https://en.wikipedia.org/wiki/Planned_obsolescence">they must have known better</a>.</p>


<h3 class="wp-block-heading" id="rubber-coating">Rubber coating</h3>


<p>The most obvious one is likely the rubber coating of the mouse.</p>



<figure class="wp-block-image size-large"><a href="https://www.rojtberg.net/wp-content/uploads/2022/06/P1440160.jpg"><img loading="lazy" decoding="async" width="1024" height="768" src="https://www.rojtberg.net/wp-content/uploads/2022/06/P1440160-1024x768.webp" alt="" class="wp-image-2391" srcset="https://www.rojtberg.net/wp-content/uploads/2022/06/P1440160-1024x768.webp 1024w, https://www.rojtberg.net/wp-content/uploads/2022/06/P1440160-300x225.webp 300w, https://www.rojtberg.net/wp-content/uploads/2022/06/P1440160-768x576.webp 768w, https://www.rojtberg.net/wp-content/uploads/2022/06/P1440160-1536x1152.webp 1536w, https://www.rojtberg.net/wp-content/uploads/2022/06/P1440160.jpg 1600w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption class="wp-element-caption">Note how the plastic buttons look still perfectly fine in comparison</figcaption></figure>



<p>I took the images for this post after cleaning the mouse. So the dirt you see there is not the skin from my greasy hands, but rather said rubber coating disintegrating.<br />This is caused by your sweat which is slightly acidic and thus takes hold of the rubber.<br />There is a reason that Gamepads <em>do not</em> have such coating, even though having good grip is even more important there.<br />Also, the way the coating is used here, all it does is making the mouse look greasy after some time.</p>


<h3 class="wp-block-heading" id="bad-switches">Bad switches</h3>


<p>The less obvious issue are the used switches i.e. the things that perform the clicks.<br />Did you ever notice that after some time your mouse does incorrect double clicks or releases the click while drag and dropping on its own? Well, that means the switch starts wearing out.</p>



<p>The mouse uses OMRON D2FC-F-7N micro-switches in a cheap variant that is only rated for 10 million clicks (10M). While this sounds a lot, it yields to 6850 clicks/ per day for 4 years, which is not all that much if you think about playing a shooter or using photoshop.<br />The crazy part is that going for the 20M rated variant (2x the durability) only costs 50 ct more (pack of 5 on amazon). This would make the mouse merely 1€ more expensive &#8211; probably way less even as Logitech can negotiate bulk discounts on these things.<br />Given that the mouse is priced at 50€, I do not think we can pass this off as cost optimization.<br />As a comparison; the similarly priced <a href="https://keychron.de/products/keychron-m2-wireless-mouse">Keychron M2 Mouse</a> uses 80M switches.</p>



<p>Note, that even more expensive Logitech Mice, like the MX Master have the rubber coating issue and use the same cheap 10M rated switches.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ed6cf7feb9524c6cf711edb610d151a508dca1dca1&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ed6cf7feb9524c6cf711edb610d151a508dca1dca1/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ed6cf7feb9524c6cf711edb610d151a508dca1dca1&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ed6cf7feb9524c6cf711edb610d151a508dca1dca1/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Fri, 25 Nov 2022 17:34:19 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ed6cf7feb9524c6cf711edb610d151a508dca1dca1</guid>
        </item>
        <item>
            <title>Introducing ODRS Browser</title>
            <link>https://www.rojtberg.net/2644/introducing-odrs-browser/</link>
            <description><![CDATA[

<p><a href="https://odrs.gnome.org/">GNOME Open Desktop Ratings</a> is the service that enables user ratings in various Linux app stores like the Snap-Store, Gnome Software and KDE Discover.</p>



<p>While it nowadays works for users by providing a mostly useful star rating, from a application developer perspective the story is very grim.</p>



<p>Basically one only gets the users view, which provides an average rating and some reviews in the current locale.<br />This means you might see something like &#8220;2 Stars from 80 Reviews&#8221; &#8211; but the 3 reviews in your current locale are all 4-5 Star.<br />To see something else you have to change the locale and restart the app store &#8211; which is inconvenient and confusing.<br />As a developer, seeing the negative reviews is crucial, as people often just post bug reports there and this is the only way to find out why the app did not work for them.</p>



<p>Therefore I quickly hacked together a web-based browser for the ODRS service, skillfully named</p>



<div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-16018d1d wp-block-buttons-is-layout-flex">
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="https://paroj.github.io/odrs-browser/">ODRS Browser</a></div>
</div>



<p></p>



<p>This allows accessing the ODRS service from the web and shows the reviews from multiple locales at once. The idea here is that often people write reviews in english &#8211; regardless of their current locale. Currently, ODRS has no logic to detect that.</p>



<p>Also, if your app is packaged in different formats like snap <em>and</em> flatpack <em>and</em> deb, you can see the reviews of all variants in the overview.</p>



<p>Unfortunately, ODRS currently does not set the <a href="https://en.wikipedia.org/wiki/Cross-origin_resource_sharing">CORS header</a> which prevents browsers from accessing it directly. The data that you see right now was scraped with python script. But once <a href="https://gitlab.gnome.org/Infrastructure/odrs-web/-/issues/20">this issue is fixed</a>, the ODRS Browser will be able to use live data.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ed6bfc23e9fc446bfc11edbc266f27b71b42334233&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ed6bfc23e9fc446bfc11edbc266f27b71b42334233/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ed6bfc23e9fc446bfc11edbc266f27b71b42334233&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ed6bfc23e9fc446bfc11edbc266f27b71b42334233/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Thu, 24 Nov 2022 12:14:24 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ed6bfc23e9fc446bfc11edbc266f27b71b42334233</guid>
        </item>
        <item>
            <title>Debugging Python with GDB on Ubuntu</title>
            <link>https://www.rojtberg.net/2630/debugging-python-with-gdb-on-ubuntu/</link>
            <description><![CDATA[

<p>Lets say you want to debug a python process that is either already running or crashing in native code. Pythons PDB is of no help here and you will have to use low-level GDB debugger. Fortunately, it comes with support for debugging high level python scripts.</p>



<p>However, while the actual <code class="" data-line="">python-gdb</code> commands <a href="https://devguide.python.org/advanced-tools/gdb/index.html">are nicely described here</a>, that page lacks important details on how to get <code class="" data-line="">python-gdb</code> in the first place. We are merely told that a <code class="" data-line="">python-gdb.py</code> is needed.</p>



<p>On Ubuntu/ Debian, this file is included in the <code class="" data-line="">python3-dbg</code> package:</p>



<pre class="wp-block-code language-bash"><code class="" data-line="">sudo apt install python3.10-dbg</code></pre>



<p>Installing that is sufficient, if you use the matching python3 package. You can go ahead and connect to some running python process via:</p>



<pre class="wp-block-code language-bash"><code class="" data-line="">gdb -p &lt;PID&gt;
# verify that the script is loaded
(gdb) info auto-load
# get a python backtrace
(gdb) py-bt
Traceback (most recent call first):
  File &quot;/usr/lib/python3.10/selectors.py&quot;, line 416, in select
    fd_event_list = self._selector.poll(timeout)
  File &quot;/usr/lib/python3.10/socketserver.py&quot;, line 232, in serve_forever
...</code></pre>



<p>In case Ubuntu is merely a host and you use coda, you can still use the host <code class="" data-line="">python-gdb.py</code> &#8211; even if the python versions dont match. You will have to load the script manually though like:</p>



<pre class="wp-block-code language-bash"><code class="" data-line="">(gdb) source /usr/share/gdb/auto-load/usr/bin/python3.10-gdb.py
</code></pre>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ed676686d2f9fe676611edab6c9f0c6ae6426f426f&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ed676686d2f9fe676611edab6c9f0c6ae6426f426f/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ed676686d2f9fe676611edab6c9f0c6ae6426f426f&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ed676686d2f9fe676611edab6c9f0c6ae6426f426f/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Fri, 18 Nov 2022 16:42:07 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ed676686d2f9fe676611edab6c9f0c6ae6426f426f</guid>
        </item>
        <item>
            <title>Fix Steam Deck Input in Desktop Mode</title>
            <link>https://www.rojtberg.net/2517/fix-steam-deck-input-in-desktop-mode/</link>
            <description><![CDATA[

<p>While older SteamOS releases used to map the right trigger to the left mouse button by default, in current SteamOS you can only click by using the touchpad. However due to the way you hold the device it is really fiddly &#8211; especially if you try to drag and drop something.</p>



<p>Fortunately, there is a way to fix this via a setting in Steam. For this you need launch Steam when in Desktop Mode. There, switch to big picture mode and go to</p>



<p>Settings &gt; Base configuration &gt; Desktop Configuratiom </p>



<p>In this view you can configure the inputs to your liking</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-large"><a href="https://www.rojtberg.net/wp-content/uploads/2022/10/overview.png"><img loading="lazy" decoding="async" width="1024" height="640" data-id="2521" src="https://www.rojtberg.net/wp-content/uploads/2022/10/overview-1024x640.webp" alt="" class="wp-image-2521" srcset="https://www.rojtberg.net/wp-content/uploads/2022/10/overview-1024x640.webp 1024w, https://www.rojtberg.net/wp-content/uploads/2022/10/overview-300x188.webp 300w, https://www.rojtberg.net/wp-content/uploads/2022/10/overview-768x480.webp 768w, https://www.rojtberg.net/wp-content/uploads/2022/10/overview.png 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption>My final configuration</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://www.rojtberg.net/wp-content/uploads/2022/10/trigger.png"><img loading="lazy" decoding="async" width="1024" height="640" data-id="2519" src="https://www.rojtberg.net/wp-content/uploads/2022/10/trigger-1024x640.webp" alt="" class="wp-image-2519" srcset="https://www.rojtberg.net/wp-content/uploads/2022/10/trigger-1024x640.webp 1024w, https://www.rojtberg.net/wp-content/uploads/2022/10/trigger-300x188.webp 300w, https://www.rojtberg.net/wp-content/uploads/2022/10/trigger-768x480.webp 768w, https://www.rojtberg.net/wp-content/uploads/2022/10/trigger.png 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption>Trigger to click</figcaption></figure>



<figure class="wp-block-image size-large"><a href="https://www.rojtberg.net/wp-content/uploads/2022/10/lscroll.png"><img loading="lazy" decoding="async" width="1024" height="640" data-id="2520" src="https://www.rojtberg.net/wp-content/uploads/2022/10/lscroll-1024x640.webp" alt="" class="wp-image-2520" srcset="https://www.rojtberg.net/wp-content/uploads/2022/10/lscroll-1024x640.webp 1024w, https://www.rojtberg.net/wp-content/uploads/2022/10/lscroll-300x188.webp 300w, https://www.rojtberg.net/wp-content/uploads/2022/10/lscroll-768x480.webp 768w, https://www.rojtberg.net/wp-content/uploads/2022/10/lscroll.png 1280w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a><figcaption>Left touchpad for scrolling</figcaption></figure>
</figure>



<p>I suggest you to go with the following setup</p>



<ul class="wp-block-list"><li>Right trigger for left click (sounds counter-intuitive, but works well)</li><li>Left trigger for right click</li><li>Left touchpad for moving the mouse (doh)</li><li>Right touchpad for scroll wheel</li></ul>



<p>With this configuration you can use the desktop mostly pain-free.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ed652c8b7bdab6652c11eda5571f97b40dac83ac83&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ed652c8b7bdab6652c11eda5571f97b40dac83ac83/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ed652c8b7bdab6652c11eda5571f97b40dac83ac83&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ed652c8b7bdab6652c11eda5571f97b40dac83ac83/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Thu, 13 Oct 2022 16:32:02 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ed652c8b7bdab6652c11eda5571f97b40dac83ac83</guid>
        </item>
        <item>
            <title>Using Docker with SLURM</title>
            <link>https://www.rojtberg.net/2507/using-docker-with-slurm/</link>
            <description><![CDATA[

<p>The SLURM documentation provides you with the basic information that <a href="https://slurm.schedmd.com/containers.html">you can use Docker withing SLURM</a> &#8211; as long as you use rootless Docker. However some crucial pieces are missing.</p>



<p>The issue that you will immediately run into is that the SLURM resource allocation is not propagated to docker at all. E.g. if you start your job with <code class="" data-line="">srun --gpus 1 docker ...</code> all GPUs will be available to docker nevertheless.</p>



<p>The issue here is that Docker uses a manager daemon that the <code class="" data-line="">docker</code> CLI communicates with. And that daemon does not know anything about SLURM or any resources it allocated for the job.</p>



<p>The solution is to start a daemon per job (instead of per user) as one user might want to run different jobs with different allocations on the same machine. <a href="https://docs.docker.com/engine/reference/commandline/dockerd/#run-multiple-daemons">The docker documentation gives you an idea on how to do that</a>.</p>



<p>You will need to set at least the following parameters to make the daemon fully job-specific</p>



<pre class="wp-block-code language-bash"><code class="" data-line=""># dockerd-rootless.sh requires XDG_RUNTIME_DIR
XDG_RUNTIME_DIR=/somewhere/including/$SLURM_JOB_ID
# export, so docker client sees it later on
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
dockerd-rootless.sh --host=$DOCKER_HOST --data-root=... --exec-root=...
</code></pre>



<p>Here, exporting <code class="" data-line="">DOCKER_HOST</code> makes the <code class="" data-line="">docker</code> CLI use the correct daemon.</p>



<p>The drawback of this method is that each job needs to pull the container again due to the separate data-root paths. Switching to podman might solve that.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ed652c8843cd22652c11eda5571f97b40dac83ac83&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ed652c8843cd22652c11eda5571f97b40dac83ac83/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ed652c8843cd22652c11eda5571f97b40dac83ac83&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ed652c8843cd22652c11eda5571f97b40dac83ac83/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Thu, 29 Sep 2022 14:47:33 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ed652c8843cd22652c11eda5571f97b40dac83ac83</guid>
        </item>
        <item>
            <title>Steam Deck SSD Upgrade</title>
            <link>https://www.rojtberg.net/2483/steam-deck-ssd-upgrade/</link>
            <description><![CDATA[

<p>If you, like me, went with the entry level Steam Deck option with only 64 GB of internal storage, you likely realized quite soon that some games wont fit on it.</p>



<p>One option is to use the microSD expansion card slot. For current-gen games the throughput of only about 150 MB/s does not seem to degrade loading performance compared to a NVMe SSD.<br />However, given that the internal storage is upgradable, the only logical choice for keeping your PC master race status is to cram in the fastest NVME SSD inside that thing.</p>



<p>Specifically, you will need a one-sided SSD in the M.2 2230 for factor so it fits the space inside the Steam Deck.<br />I went with the <a href="https://business.kioxia.com/en-emea/ssd/client-ssd/bg5.html">KIOXIA Client-SSD BG5</a> 512GB. Kioxia is the Toshiba spin-off for SSD drives, if you wonder about the brand. Although it is a PCIe 4.0 drive, its peak read throughput of 3.5 GB/s is within the practical limits of PCIe 3.0 of the Steam Deck.<br />Also, the active power consumption of 4.1W is quite close to the 3.8W drawn by the custom PHISON PS5013 E13 SSD that Valve uses.</p>



<p>You can follow the <a href="https://www.ifixit.com/Guide/Steam+Deck+SSD+Replacement/148989">iFixit Guide</a> for the steps to actually swap the SSD. Make sure to transfer the ESD shielding wrap to the new SSD.</p>



<p>To get Steam OS on the new drive, follow the <a href="https://help.steampowered.com/en/faqs/view/1B71-EDF2-EB6D-2BB3">official recovery instructions</a> and select the &#8220;Re-image Steam Deck&#8221; script.<br />This will install Steam OS on the blank SSD &#8211; similar to how you would install Ubuntu from a live USB. </p>


<h2 class="wp-block-heading" id="benchmarking-results">Benchmarking results</h2>


<p>Next, I wanted to actually compare the speed of the upgraded NVMe SSD with the one of the stock eMMC memory. To this end I used <a href="https://github.com/JonMagon/KDiskMark">KDiskMark</a> &#8211; an open-source alternative to CrystalDiskMark that runs on Linux natively.</p>



<p>The tests were performed on SteamOS 3.3.1 using KDiskMark 2.3.0.</p>



<figure class="wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex">
<figure class="wp-block-image size-full"><a href="https://www.rojtberg.net/wp-content/uploads/2022/08/emmc-1.png"><img loading="lazy" decoding="async" width="571" height="440" data-id="2497" src="https://www.rojtberg.net/wp-content/uploads/2022/08/emmc-1.png" alt="" class="wp-image-2497" srcset="https://www.rojtberg.net/wp-content/uploads/2022/08/emmc-1.png 571w, https://www.rojtberg.net/wp-content/uploads/2022/08/emmc-1-300x231.webp 300w" sizes="auto, (max-width: 571px) 100vw, 571px" /></a><figcaption class="wp-element-caption">eMMC</figcaption></figure>



<figure class="wp-block-image size-full"><a href="https://www.rojtberg.net/wp-content/uploads/2022/08/nvme.png"><img loading="lazy" decoding="async" width="571" height="440" data-id="2494" src="https://www.rojtberg.net/wp-content/uploads/2022/08/nvme.png" alt="" class="wp-image-2494" srcset="https://www.rojtberg.net/wp-content/uploads/2022/08/nvme.png 571w, https://www.rojtberg.net/wp-content/uploads/2022/08/nvme-300x231.webp 300w" sizes="auto, (max-width: 571px) 100vw, 571px" /></a><figcaption class="wp-element-caption">NVMe</figcaption></figure>
<figcaption class="blocks-gallery-caption wp-element-caption">The median of 3 KDiskMark runs</figcaption></figure>



<p><br /><em>In short, the NVME offers roughly one order of magnitude faster throughput over the eMMC.</em><br />Whether you feel this in-game, highly depends on the given game. For older titles, even the eMMC is so fast, that you cannot read the hints on the loading-screen. However, for something like the Flight Simulator 2020 that shuffles huge assets around, it will surely be noticeable.</p>



<p>Finally, the peak read performance of 3.5GB/s is not reached. This might be due to the PCIe 3.0 bottleneck &#8211; I did not bother putting the drive in a PCIe 4.0 device. Still, there is a significant advantage in writing performance over the older Kioxia BG4 series, that only do 1.4 GB/s.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ed26f71895d2d626f711edb52b3bae0e167ace7ace&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ed26f71895d2d626f711edb52b3bae0e167ace7ace/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ed26f71895d2d626f711edb52b3bae0e167ace7ace&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ed26f71895d2d626f711edb52b3bae0e167ace7ace/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Sun, 28 Aug 2022 14:49:52 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ed26f71895d2d626f711edb52b3bae0e167ace7ace</guid>
        </item>
        <item>
            <title>Computing replaygain for your Music library</title>
            <link>https://www.rojtberg.net/2323/computing-replaygain-for-your-music-library/</link>
            <description><![CDATA[

<p><em>TLDR; command at the end of post</em></p>



<p>If you want a equal loudness for your Music library the go to solution and the de-facto standard is <a href="https://en.wikipedia.org/wiki/ReplayGain">ReplayGain</a>.<br />If you are using a music streaming service, the provider is typically taking care of that for you &#8211; but maybe you want to <a href="https://www.rojtberg.net/2253/breaking-free-of-google/#Music">migrate towards your own streaming solution</a>.</p>



<p>ReplayGain analyses your audio files and stores their deviation from the baseline loudness as a tag. A compatible audio player can then read the tag and correct the playback volume so all you tracks have the same loudness.</p>



<p>Of course things get messy once you look at details like what the baseline loudness should be and how to determine loudness in the first place. Therefore we set the baseline once and for all as 89db and consider even tracks of the same album individually. If you disagree, feel free to branch off reading up the details now.</p>



<p>The next issue is that ReplayGain was born in a time where mp3 was synonymous to digital music, hence the algorithm was first implemented as the <code class="" data-line="">mp3gain</code> CLI tool. Nowadays you also need <code class="" data-line="">aacgain</code> and <code class="" data-line="">vorbisgain</code> to cover all your formats, which is cumbersome to automate.</p>



<p>The larger issue with ReplayGain is that it defines loudness of a track by its peak volume. While a sane choice in theory, in practice the <a href="https://en.wikipedia.org/wiki/Loudness_war">music and advertising industries raced to increase the perceived loudness</a> without raising the <em>peak</em> volume. As broadcasters also used peak volume normalization, one could blow your eardrum with that very special advertisement.<br />Therefore the <a href="https://en.wikipedia.org/wiki/EBU_R_128">EBU R 128</a> was proposed which at its core is RMS based, meaning it is considering the <em>average</em> volume of the track.</p>



<p>Remember that ReplayGain merely adds a correction value to the tracks? This allows us to compute that correction value based on the R128 algorithm for a better normalization, which is exactly what the <code class="" data-line="">&lt;a href=&quot;https://github.com/desbma/r128gain&quot;&gt;r128gain&lt;/a&gt;</code> tool does.<br />Being written in modern day, r128gain also processes all possible audio files by hooking into ffmpeg as a filter.</p>



<p>So, without further ado, this is the command to normalize your Music library:</p>



<pre class="wp-block-code language-bash"><code class="" data-line=""># pip3 install r128gain
r128gain -p -r Music/</code></pre>



<p>This will preserve <code class="" data-line="">&quot;-p&quot;</code> the file timestamps and recursively <code class="" data-line="">&quot;-r&quot;</code> process all files in the given directory.</p>


<h2 class="wp-block-heading" id="trouble-shooting">Trouble shooting</h2>


<p>Note that if you previously used <code class="" data-line="">mp3gain</code>, your files might contain <a href="https://wiki.hydrogenaud.io/index.php?title=ReplayGain_1.0_specification#ID3v2">non-standard</a> lower-case <code class="" data-line="">replaygain_*</code> tags, while <code class="" data-line="">r128gain</code> will only write <code class="" data-line="">REPLAYGAIN_*</code> tags.<br />To avoid confusing players with different values, you should remove the non-standard tags. This can be automated with <code class="" data-line="">eyeD3</code></p>



<pre class="wp-block-code language-bash"><code class="" data-line="">eyeD3 -Q --remove-frame RGAD --preserve-file-times --user-text-frame=replaygain_track_gain: --user-text-frame=replaygain_track_peak: --user-text-frame=replaygain_album_gain: --user-text-frame=replaygain_album_peak: Music/</code></pre>



<p>Refer to its documentation for the meaning of the parameters. <a href="https://id3.org/Replay%20Gain%20Adjustment">For RGAD see here</a>.</p>



<p><em>Header Image: &#8220;volume&#8221; by christina rutz  (CC-BY-2.0)</em></p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ecb4445d163822b44411ec878b21d33456d3c6d3c6&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ecb4445d163822b44411ec878b21d33456d3c6d3c6/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ecb4445d163822b44411ec878b21d33456d3c6d3c6&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ecb4445d163822b44411ec878b21d33456d3c6d3c6/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Mon, 04 Apr 2022 16:13:47 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ecb4445d163822b44411ec878b21d33456d3c6d3c6</guid>
        </item>
        <item>
            <title>Migrating from owncloud 9.1 to nextcloud 11</title>
            <link>https://www.rojtberg.net/1452/migrating-from-owncloud-9-1-to-nextcloud-11/</link>
            <description><![CDATA[
<p>First one should ask though: why? My main motivation was that many of the apps I use were easily available in the nextcloud store, while with owncloud I had to manually pull them from github.<br />
Additionally some of the app authors migrated to nextcloud and did not provide further updates for owncloud.</p>
<p>Another reason is this:</p>
<p>
<a href='https://www.rojtberg.net/1452/migrating-from-owncloud-9-1-to-nextcloud-11/owncloud-2/'><img width="318" height="273" src="https://www.rojtberg.net/wp-content/uploads/2017/02/owncloud.png" class="attachment-full size-full" alt="" srcset="https://www.rojtberg.net/wp-content/uploads/2017/02/owncloud.png 318w, https://www.rojtberg.net/wp-content/uploads/2017/02/owncloud-300x258.png 300w" sizes="(max-width: 318px) 100vw, 318px" /></a>
<a href='https://www.rojtberg.net/1452/migrating-from-owncloud-9-1-to-nextcloud-11/nextcloud/'><img width="318" height="273" src="https://www.rojtberg.net/wp-content/uploads/2017/02/nextcloud.png" class="attachment-full size-full" alt="" srcset="https://www.rojtberg.net/wp-content/uploads/2017/02/nextcloud.png 318w, https://www.rojtberg.net/wp-content/uploads/2017/02/nextcloud-300x258.png 300w" sizes="(max-width: 318px) 100vw, 318px" /></a>
</p>
<p>the graphs above show the number of commits for <a href="https://github.com/owncloud/core/graphs/contributors">owncloud</a> and <a href="https://github.com/nextcloud/server/graphs/contributors">nextcloud</a>. Owncloud has taken a very noticeable hit here after the fork &#8211; even though <a href="https://owncloud.com/de/owncloud-vs-nextcloud/">they deny it</a>.</p>
<p>From the user perspective the lack of contribution is visible for instance in the admin interface where with nextcloud you get a nice log browser and system stats while with owncloud you do not. Furthermore the nextcloud android app handles Auto-Upload much better and generally seems more polished &#8211; I think one can expect nextcloud to advance faster in general.</p>
<h1>Migrating</h1>
<p>For migrating you can follow the <a href="http://blog.jospoortvliet.com/2016/06/migrating-to-nextcloud-9.html">excellent instructions of Jos Poortvliet</a>.</p>
<p>In my case owncloud 9.1 was installed on Ubuntu in <em>/var/www/owncloud</em> and I put nextcloud 11 to <em>/var/www/nextcloud</em>. Then the following steps had to be applied:</p>
<ol>
<li>put owncloud in maintenance mode
<pre>sudo -u www-data php occ maintenance:mode --on</pre>
</li>
<li>copy over the config.php
<pre>cp /var/www/owncloud/config/config.php /var/www/nextcloud/config/</pre>
</li>
<li>adapt the path in config.php
<pre><code class="php"># from 
'path' =&gt; '/var/www/owncloud/apps',
# to
'path' =&gt; '/var/www/nextcloud/apps',</code></pre>
</li>
<li>adapt the path in crontab
<pre>sudo crontab -u www-data -e</pre>
</li>
<li>adapt the paths in the apache config</li>
<li>run the upgrade script which takes care of the actual migration. Then disable the maintanance mode.
<pre>sudo -u www-data php occ upgrade
sudo -u www-data php occ maintenance:mode --off</pre>
</li>
</ol>
<p>and thats it.</p>
<span class="net_nemein_favourites">1 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1e75d786952e8425d7811e79d007f9af21e37c737c7&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1e75d786952e8425d7811e79d007f9af21e37c737c7/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1e75d786952e8425d7811e79d007f9af21e37c737c7&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1e75d786952e8425d7811e79d007f9af21e37c737c7/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Fri, 10 Feb 2017 23:33:06 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1e75d786952e8425d7811e79d007f9af21e37c737c7</guid>
        </item>
        <item>
            <title>Learning Modern 3D Graphics Programming</title>
            <link>http://www.rojtberg.net/1283/learning-modern-3d-graphics-programming/</link>
            <description><![CDATA[
<p>one of the best resources to learn modern OpenGL and the one which helped me quite a lot is the Book at <strong>www.arcsynthesis.org/gltut/</strong> &#8211; or lets better say <em>was</em>. Unfortunately the domain expired so the content is no longer reachable.</p>
<p>Luckily the Book was designed as an open source project and the code to generate the website is <a href="https://bitbucket.org/alfonse/gltut/wiki/Home">still available at Bitbucket</a>. Unfortunately this repository does not seem to be actively maintained any more.</p>
<p>Therefore I set out to make the Book to be available again using Github Pages. You can find the results here:</p>
<p><a href="https://paroj.github.io/gltut/">https://paroj.github.io/gltut/</a></p>
<p>However I did not simply mirror the pages, but also improved it at several places. So what has changed so far?</p>
<p><span id="more-1283"></span></p>
<ul>
<li>converted mathematical expressions from SVG to inline <a href="http://www.w3.org/Math/">MathML</a>. This does not only improve readability in browsers, but also fixes broken math symbols when generating the PDF.</li>
<li>replace <a href="http://xslthl.sourceforge.net/">XSLTHL</a> by <a href="https://highlightjs.org/">highlight.js</a> for better syntax highlighting</li>
<li>added fork me on github badge to website to visualize that one can easily contribute</li>
<li>enabled the Optimization Appendix. While it is not complete, it already provides some useful tips and maybe encourages contributions.</li>
<li>updated the Documentation build to work on Linux</li>
<li>added instructions how to Build the website/ PDF Docs</li>
</ul>
<p>hopefully these changes will generate some momentum so this great Book gets extended again. As there were also non-cosmetical changes like the new Chapter <a href="https://github.com/paroj/gltut/releases/tag/v0.3.9">I also tagged a 0.3.9 release</a>.</p>
<p>I the process of the above work I found out that there is also a mirror of the original Book at <a href="http://alfonse.bitbucket.org/oldtut/">http://alfonse.bitbucket.org/oldtut/</a>. This one is however at the state of the 0.3.8 release, meaning it does not only misses the above changes but also some adjustment happened post 0.3.8 at bitbucket.</p>
<span class="net_nemein_favourites">1 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1e5ae82b08a09bcae8211e5b0fadf656a914f7d4f7d&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1e5ae82b08a09bcae8211e5b0fadf656a914f7d4f7d/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1e5ae82b08a09bcae8211e5b0fadf656a914f7d4f7d&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1e5ae82b08a09bcae8211e5b0fadf656a914f7d4f7d/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Tue, 29 Dec 2015 22:26:31 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1e5ae82b08a09bcae8211e5b0fadf656a914f7d4f7d</guid>
        </item>
        <item>
            <title>How to manually update a deb package from source</title>
            <link>http://www.rojtberg.net/697/how-to-manually-update-a-deb-package-from-source/</link>
            <description><![CDATA[
<p>Probably everyone has encountered a package in Ubuntu which was not the newest released version while one for some reason needed the newest one. The first step is to search for a PPA with the desired version. But what if there is no such PPA or you want to build the version yourself? This is where this guide comes in. Note however that this is not aimed at ordinary users &#8211; you need some experience with programming/ compiling to successfully build a package.</p>
<h1>Before you start</h1>
<p>Before you start make sure that you have source packages enabled in your software sources.<br />
Next you obviously need the upstream source tar-ball of the new program which should look something like <em>&lt;packagename&gt;</em>&#8211;<em>&lt;version&gt;</em>.tar.gz.<br />
Download this tar-ball to a new directory <em>&lt;somedir&gt;</em> and extract it there.</p>
<h1>Updating Package info</h1>
<p>For the following commands I assume you are in the previously created directory <em>&lt;somedir&gt;</em>.</p>
<p>First we need to get the old version of the source package</p>
<pre>apt-get source <em>&lt;packagename&gt;</em></pre>
<p>This will download and extract the old source package into <em>&lt;packagename&gt;</em>&#8211;<em>&lt;oldversion&gt;</em>.</p>
<p>Now we need some helper scripts to perform the upgrading as well as the build-time dependencies of the package</p>
<pre>sudo apt-get install dpkg-dev devscripts fakeroot
sudo apt-get build-dep <em>&lt;packagename&gt;</em></pre>
<p>Next change into the extracted sources of the old package and update the packaging</p>
<pre><code class="bash">cd <em>&lt;packagename&gt;</em>-<em>&lt;oldversion&gt;
</em>uupdate -v<em> &lt;newversion&gt; </em>../<em>&lt;packagename&gt;</em>-<em>&lt;newversion&gt;</em>.tar.gz

# change into the extracted new package
cd ../<em>&lt;packagename&gt;</em>-<em>&lt;newversion&gt;
</em>
# update version info
dch -l ~ppa -D $(lsb_release -sc)</code></pre>
<p>For more information see the <a href="http://www.debian.org/doc/manuals/maint-guide/build.en.html#completebuild">Debian New Maintainers Guide</a>.</p>
<h1>Building the program</h1>
<p>To trigger a rebuild of the program simply execute</p>
<pre>dpkg-buildpackage</pre>
<h1>Uploading your version to a PPA</h1>
<p>To upload a package to a PPA you first need to sign it to prove that you are the author. To do this you have to execute the following in the <em>&lt;packagename&gt;</em>&#8211;<em>&lt;newversion&gt;</em> directory</p>
<pre>debuild -S</pre>
<p>Furthermore you need the upload tool dput to actually perform the uploading</p>
<pre>sudo apt-get install dput</pre>
<p>Now change to <em>&lt;somedir&gt;</em> and execute</p>
<pre>dput ppa:<em>&lt;your_username&gt;</em>/<em>&lt;repository&gt;</em> <em>&lt;source.changes&gt;</em></pre>
<p>You can find <a href="https://help.launchpad.net/Packaging/PPA/Uploading">more information at Launchpad</a>.</p>
<span class="net_nemein_favourites">2 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1e3ac3a810b7fdcac3a11e382dd9d84dbf4faeefaee&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1e3ac3a810b7fdcac3a11e382dd9d84dbf4faeefaee/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1e3ac3a810b7fdcac3a11e382dd9d84dbf4faeefaee&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1e3ac3a810b7fdcac3a11e382dd9d84dbf4faeefaee/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Sat, 15 Mar 2014 12:03:28 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1e3ac3a810b7fdcac3a11e382dd9d84dbf4faeefaee</guid>
        </item>
        <item>
            <title>Secure Owncloud setup</title>
            <link>http://www.rojtberg.net/687/secure-owncloud-setup/</link>
            <description><![CDATA[
<script><!--
dynamicgoogletags.update();
//--></script><p>While the Owncloud Manual<a href="http://doc.owncloud.org/server/6.0/admin_manual/installation/installation_source.html#web-server-configuration"> suggests enabling SSL</a>, it unfortunately does not go into detail how to get a secure setup. The core problem is that the default SSL settings of Apache are not sane as in they do not enforce strong encryption. Furthermore the used default certificate will not match your server name and produce errors in the browser.</p>
<p>In the following a short guide in how to set-up a secure Apache 2.4 server for Owncloud will be presented.</p>
<p><span id="more-687"></span></p>
<h1>Generating a secure Certificate</h1>
<p>A secure TLS connection <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security#Description">starts</a> with the Server authenticating itself to the client with the server certificate. Therefore we will start the setup of our server with generating that certificate.<br />
The purpose of the certificate is to ensure that if you type in &#8220;your.website.net&#8221; you are indeed talking to your server and not to a <a href="http://en.wikipedia.org/wiki/Man-in-the-middle_attack">man-in-the-middle</a> who intercepted your connection. Therefore the certificate contains the <a href="http://en.wikipedia.org/wiki/Public_key_certificate">server name and the public key </a>of the server.</p>
<p>As mentioned above the default certificate will not match your server name and therefore you will have to generate a matching one.</p>
<p>Unfortunately <a href="http://httpd.apache.org/docs/2.4/ssl/ssl_faq.html#ownca">following the apache SSL FAQ </a>will results in a certificate using <a href="http://en.wikipedia.org/wiki/SHA-1#Comparison_of_SHA_functions">the possibly vulnerable SHA-1 hashing function</a>. A better alternative is SHA-256, but it has to be explicitly requested during certificate creation. The according call to openssl for certificate creation is</p>
<pre>openssl req -new <strong>-sha256</strong> -x509 -nodes -days 365 -out your.website.net.pem -keyout your.website.net.key</pre>
<p>The resulting certificate and private key have to be referenced in your website configuration. On Debian/ Ubuntu you have to edit<br />
<em>/etc/apache2/sites-enabled/owncloud.conf</em></p>
<pre><code class="apache">SSLCertificateFile    /path/to/your.website.net.pem
SSLCertificateKeyFile /path/to/your.website.net.key</code></pre>
<p>Note that this results in a so called <a href="http://en.wikipedia.org/wiki/Self-signed_certificate">self-signed certificate</a>. Usually certificates on the web are approved by a <a href="http://en.wikipedia.org/wiki/Certificate_authority">Certificate Authority</a> (a digital notary) which confirms your identity. By trusting the CA you can also trust websites that are otherwise unknown to you, but which were approved by the CA.<br />
While this makes sense for public websites, you probably already trust your own server, so there is no need for a CA signed certificate.<br />
Just add your self-signed certificate to the trusted list of your browser on first visit.<br />
If you fear a man-in-the-middle attack during the initial connection, you can also manually copy the generated pem file on a USB-drive and import it in the browser from there.</p>
<h1>Using secure ciphers</h1>
<p>Using the secure certificate we only know that we are indeed talking to the server we want to talk to. Next we actually want to start sending encrypted messages. In theory we could encrypt data with the public key of the server using asymmetric encryption like RSA. However asymmetric encryption is slow and therefore not suitable for large amounts of data. Furthermore our communication could be decrypted if somebody would record it and at some point in the future get access to the private key of the server. Therefore we want to use a one-time symmetric key. This way we achieve <a href="http://en.wikipedia.org/wiki/Forward_secrecy">forward secrecy</a>.The symmetric encryption should be also secure in a sense that even when large amounts of data is collected, it is must not be possible to reconstruct the key and decode the data.<br />
Last but not least the chosen cipher should be supported by our clients. Surprisingly it is the Owncloud desktop client which <a href="https://github.com/owncloud/mirall/issues/764">does not support modern ciphers</a>, while current browsers and even the android app does.</p>
<p>Instead of discussing all available ciphers in regard of the above requirements, I would rather refer to the excellent <a href="https://wiki.mozilla.org/Security/Server_Side_TLS">TLS server configuration guide by Mozilla</a>.<br />
Yet we can still improve the suggested configuration. Mozilla has to consider compability with old web-browsers which we do not have to. So without further ado this is the recommend cipher configuration</p>
<pre><code class="apache">SSLProtocol all -SSLv2 -SSLv3
SSLCompression off
SSLHonorCipherOrder On
SSLCipherSuite EECDH+AESGCM:EECDH+AES</code></pre>
<p>The rationale behind this suggestion is</p>
<ul>
<li>Allow TLS 1.0 for compability with mobile apps</li>
<li>Disable SSL compression to mitigate the CRIME attack</li>
<li>always use Diffie Hellman(DH) key exchange(Kx) for forward secrecy</li>
<li>use Elliptic Curve Diffie Hellman (ECDH) variant for performance</li>
<li>always use AES for symmetric encryption</li>
<li>prefer AES GCM mode for security and performance</li>
</ul>
<h2>Notes</h2>
<p>The only reason for allowing TLSv1 is compability with the mobile apps because openssl on android up to 4.4 does not yet support TLS1.1+. This circumstance is not really critical as BEAST is not applicable in the sync apps and browsers will connect to the server with TLS1.1+ or <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=665814">work around the vulnerability</a>.<br />
However if you are on android 5.0+ you can add <code>-TLSv1</code> to <code>SSLProtocol</code> to enforce a TLS1.1+ connection.</p>
<p><em>Update:</em> <a href="https://github.com/owncloud/client/issues/764">The issue with the Owncloud desktop</a> client that forced us to enable non EC DH key exchange was fixed in version 1.7.1.<br />
If you need compatibility with desktop clients older than 1.7.1 <strong>append</strong> <code>EDH+AES</code> to <code>SSLCipherSuite</code><br />
However besides being much slower than ECDH, <a href="http://blog.ivanristic.com/2013/08/increasing-dhe-strength-on-apache.html">a weak modulus is used for DH Kx up to (including) Apache 2.4.6</a>. While there are no practical attacks exploiting this yet, we can only be completely on the safe side by <a href="http://httpd.apache.org/docs/2.4/mod/mod_ssl.html#sslcertificatefile">updating to Apache 2.4.7</a>.</p>
<p>To see which actual ciphers the SSLCipherSuite determines, run</p>
<pre>openssl ciphers -V 'EECDH+AESGCM:EECDH+AES -SSLv3'</pre>
<p>possible output:</p>
<pre>
 0xC0,0x30 - ECDHE-RSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(256) Mac=AEAD
 0xC0,0x2C - ECDHE-ECDSA-AES256-GCM-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(256) Mac=AEAD
 0xC0,0x2F - ECDHE-RSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AESGCM(128) Mac=AEAD
 0xC0,0x2B - ECDHE-ECDSA-AES128-GCM-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AESGCM(128) Mac=AEAD
 0xC0,0x28 - ECDHE-RSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(256) Mac=SHA384
 0xC0,0x24 - ECDHE-ECDSA-AES256-SHA384 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(256) Mac=SHA384
 0xC0,0x27 - ECDHE-RSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=RSA Enc=AES(128) Mac=SHA256
 0xC0,0x23 - ECDHE-ECDSA-AES128-SHA256 TLSv1.2 Kx=ECDH Au=ECDSA Enc=AES(128) Mac=SHA256
</pre>
<p>&nbsp;</p>
<h1>Enforcing HTTPS</h1>
<p>At this point the secure connection to your server is ready, but we still have to ensure that it is the only way data is exchanged with the clients.<br />
While you can only enable apache on port 443, you will always have to remember to type in <em>https://</em> in the browser. A better way is to automatically redirect from port 80 to port 443 like</p>
<pre><code class="apache">&lt;VirtualHost *:80&gt;
        ServerName your.website.net
        Redirect permanent / https://your.website.net/
&lt;/VirtualHost&gt;</code></pre>
<p>Note that you do not have to use mod_rewrite here as Owncloud sets the <a href="http://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security">HSTS header</a>, so browsers will automatically prefix all requests with https after the first visit.</p>
<p>But whatever you do, remember this</p>
<p><a href="http://xkcd.com/538/"><img class="aligncenter" src="http://imgs.xkcd.com/comics/security.png" alt="" width="448" height="274" /></a></p>
<span class="net_nemein_favourites">2 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1e39bb1a7bf06ba9bb111e380951faf60e7e6f4e6f4&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1e39bb1a7bf06ba9bb111e380951faf60e7e6f4e6f4/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1e39bb1a7bf06ba9bb111e380951faf60e7e6f4e6f4&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1e39bb1a7bf06ba9bb111e380951faf60e7e6f4e6f4/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Sat, 22 Feb 2014 10:53:46 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1e39bb1a7bf06ba9bb111e380951faf60e7e6f4e6f4</guid>
        </item>
        <item>
            <title>How to root Android using Ubuntu</title>
            <link>http://www.rojtberg.net/668/how-to-root-android-using-ubuntu/</link>
            <description><![CDATA[
<script><!--
dynamicgoogletags.update();
//--></script><h1>The Big Picture</h1>
<p>Android consists of three parts relevant to rooting</p>
<ol>
<li>the bootloader</li>
<li>recovery system</li>
<li>main system</li>
</ol>
<h1></h1>
<p>typically only the main system is running, that is the Linux Kernel, the launcher, the phone app etc.. If we talk about rooting, that means we want to add an additional app to the main system which may access secured parts of the main system and also acts as a gatekeeper for other apps that want to get access too.</p>
<p>The problem is that we need access to the secure parts of the system in order to do so, which means that we cant simply install that app (e.g. an apk) from within the main system.</p>
<p>This means we have to go one level down. This is where the recovery system is. Typically you do not see it, as it is only active when the main system can not run &#8211; either because a system update is installed or because you do a factory reset.<br />
As the recovery system can do a full system update, it means that it has also access to the secured parts of the main system &#8211; exactly what we need. Unfortunately the stock recovery system does not allow installing apps, so we have to replace it.<br />
But before that we have to talk about the bootloader.</p>
<p>The bootloader is a tiny piece of software which decides wether to start the recovery or the main system (or another main system, like Ubuntu Phone). But in the default configuration in only starts systems that it knows and trusts. In this configuration the bootloader is called locked. Although it prevents malicious software to change the phone and spy on us, it also prevents us from replacing the recovery system. This concept is also coming to the PC btw where it is called secure-boot.</p>
<p>Here is a graphical overview of the Android components:</p>
<h1><a href="http://www.rojtberg.net/wp-content/uploads/2014/01/android-brs.png"><img class="aligncenter  wp-image-674" src="http://www.rojtberg.net/wp-content/uploads/2014/01/android-brs.png" alt="android-brs" width="353" height="185" /></a></h1>
<p>So what we need to do in order to get root access is</p>
<ol>
<li>unlock the bootloader</li>
<li>replace the recovery system</li>
<li>install a superuser app</li>
</ol>
<p>Note that unlocking the bootloader also allows attackers to circumvent any of the android security features. It is possible directly access all the files on the phone from the bootloader.<br />
<em>Therefore android will wipe all userdata when the bootloader is unlocked</em></p>
<h1>Preparations</h1>
<p>First you need to install the fastboot binary to be able to perform low-level communication with the device</p>
<pre>apt-get install android-tools-fastboot</pre>
<p>Next you have to allow non-root users to execute commands over USB, so you do not have to run fastboot as root. For this create the file</p>
<p><em>/etc/udev/rules.d/51-android.rules</em></p>
<p>with the following content</p>
<pre><code>SUBSYSTEM=="usb", ATTR{idVendor}=="<strong>&lt;VENDOR&gt;</strong>", MODE="0666", GROUP="plugdev"</code></pre>
<p>you can find the value for &lt;VENDOR&gt; on <a href="http://developer.android.com/tools/device.html#VendorIds">the page linked here.</a></p>
<p>Finally you have to reboot into fastboot mode. Usually there is a key combination you have to press on startup.</p>
<ul>
<li><a href="https://source.android.com/source/building-devices.html#booting-into-fastboot-mode">Key combinations for Google Nexus Devices</a></li>
<li><a href="http://unlockbootloader.sonymobile.com/fastboot-buttons">Key combinations for Sony Xperia Devices</a></li>
</ul>
<p>Remember this key combination as you will need some more times.</p>
<p>Samsung Devices however, like the Galaxy S3, do not support the fastboot mode &#8211; instead they have a download mode, which uses a proprietary Samsung protocol. To flash those you have to use the <a href="http://glassechidna.com.au/heimdall/">Heimdall</a> tool. While this article does not cover the heimdall CLI calls, the general discussion still applies.</p>
<h1>Unlocking the Bootloader</h1>
<p>for google devices, like a Nexus 4 or Nexus 7 it is just</p>
<pre>fastboot oem unlock</pre>
<p>if you have a Sony Xperia device, like a Xperia Z, you additionally have to <a href="http://unlockbootloader.sonymobile.com/instructions">request a unlock key</a> and then do</p>
<pre>fastboot oem unlock 0x<strong>&lt;KEY&gt;</strong></pre>
<p>where &lt;KEY&gt; is the key you obtained.</p>
<h1>Replacing the Recovery System</h1>
<p>There are two prominent alternative recovery systems with the ability to install apps</p>
<ul>
<li><a href="http://teamw.in/project/twrp2">Team Win Recovery Project</a></li>
<li><a href="http://www.clockworkmod.com/rommanager">Clock Work Mod</a></li>
</ul>
<p>Clock Work Mod (CWM) is probably most known so we will use that one. From the Website linked above download the recovery image which fits your phone.<br />
Here you have the choice between the ordinary recovery which uses the volume buttons of your device for navigation and the touch recovery which supports the touch screen.</p>
<pre>fastboot flash recovery <strong>&lt;RECOVERY&gt;</strong>.img</pre>
<p>where &lt;RECOVERY&gt; is the name of the file you downloaded. For instance for a Nexus 5 and CWM 6.0.4.5 it would be</p>
<pre>fastboot flash recovery recovery-clockwork-6.0.4.5-hammerhead.img</pre>
<h1>Installing the superuser app</h1>
<p>To my knowledge the only one superuser app that works with Android 5.0 lollipop is <a href="http://autoroot.chainfire.eu/">SuperSU</a>. So we will have to use that. However there is also <a href="https://github.com/koush/Superuser/pull/234">a pull-request for Superuser by CWM</a> which might make it also work with Android 5.0 in the future.</p>
<p>The installation procedure is a little bit different. In the <a href="http://autoroot.chainfire.eu/">appropriate package for your device</a> you will find a boot image which we have just to start once with</p>
<pre>fastboot boot image/CF-Auto-Root-hammerhead-hammerhead-nexus5.img</pre>
<p>note that there is no flash in the line above. The image which starts contains a script which installs SuperSU and modifies the startup procedure so it can get around SELinux.</p>
<h2>Pre Android 5.0 lollipop</h2>
<p>If you run devices with Adroid older than 5.0 lollipop you have several choices here</p>
<ul>
<li><a href="http://download.chainfire.eu/supersu">SuperSU</a></li>
<li><a href="http://androidsu.com/superuser/">Superuser by ChainsDD</a></li>
<li><a href="https://play.google.com/store/apps/details?id=com.koushikdutta.superuser">Superuser by CWM</a></li>
</ul>
<p>although SuperSU is the most prominent one, I would recommend getting Superuser by CWM, as it is open source and also nag-free as there is no &#8220;pro&#8221; version of it.</p>
<p>To install we need to <a href="http://download.clockworkmod.com/superuser/superuser.zip">get this zip archive</a> and copy it to the device. To install it, we need to reboot into fastboot mode and then select &#8220;Recovery Mode&#8221; to get to the recovery system. Once in Recovery mode select</p>
<p><em>install zip -&gt; choose zip from /sdcard</em></p>
<p>then browse and select the &#8220;superuser.zip&#8221; you just copied.</p>
<p>Once installed select</p>
<p><em>Go Back -&gt; reboot system now</em></p>
<p>Once the system has started you should have a &#8220;Superuser&#8221; App on your device. Congratulations, you are done.</p>
<h1>Optional: flash stock recovery</h1>
<p>As the recovery is responsible for installing system updates it is a good idea to revert to stock version after you installed root, so the system can auto-update itself again. However a system update will also remove your superuser app so you will have to repeat the above procedure again.</p>
<p>If you have a Google Nexus Device, you can grab the <a href="https://developers.google.com/android/nexus/images">factory images here</a>.  There you will find a image of the stock recovery and restore it by</p>
<pre>fastboot flash recovery recovery.img</pre>
<span class="net_nemein_favourites">2 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1e37b92fa75086c7b9211e3a4042377522df5a1f5a1&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1e37b92fa75086c7b9211e3a4042377522df5a1f5a1/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1e37b92fa75086c7b9211e3a4042377522df5a1f5a1&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1e37b92fa75086c7b9211e3a4042377522df5a1f5a1/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Sun, 12 Jan 2014 13:14:45 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1e37b92fa75086c7b9211e3a4042377522df5a1f5a1</guid>
        </item>
        <item>
            <title>Debugging native code with ndk-gdb using standalone CMake toolchain</title>
            <link>http://www.rojtberg.net/465/debugging-native-code-with-ndk-gdb-using-standalone-cmake-toolchain/</link>
            <description><![CDATA[
<script><!--
dynamicgoogletags.update();
//--></script><p>I recently ran into this problem and could not find any good solution on the Internet. So next comes a small summary of the problem with hopefully enough buzzwords, so Google can lead you here.</p>
<p>If you want to do C++ development on Android, you need the NDK for cross compilation. It comes by default with its own build system called <em>ndk-build</em>, which basically is a bunch of custom makefiles. But if you are sharing code between the Android Platform and lets say plain Linux, you have likely already a build system installed. For C/C++ CMake is quite popular as it supports different platforms and compilers. <a href="http://code.google.com/p/android-cmake/">Fortunately there is already a project which adds Android support to CMake. </a>I will not cover that &#8211; instead I assume you are using it already.</p>
<p>Unfortunately you cant use the <em>ndk-gdb</em> script supplied with the NDK to debug your application as it relies on the behaviour of <em>ndk-build</em>. But as said earlier, <em>ndk-build</em> is no wizardy, but just a bunch of scripts. So it is possible to emulate the behaviour using CMake, as following:</p>
<p>Add the following macro to your <em>CMakeLists.txt</em> file</p>
<pre><code class="cmake">macro(ndk_gdb_debuggable TARGET_NAME)
    get_property(TARGET_LOCATION TARGET ${TARGET_NAME} PROPERTY LOCATION)
    
    # create custom target that depends on the real target so it gets executed afterwards
    add_custom_target(NDK_GDB ALL) 
    add_dependencies(NDK_GDB ${TARGET_NAME})
    
    set(GDB_SOLIB_PATH ${PROJECT_SOURCE_DIR}/obj/local/${ANDROID_NDK_ABI_NAME}/)
    
    # 1. generate essential Android Makefiles
    file(WRITE ${PROJECT_SOURCE_DIR}/jni/Android.mk "APP_ABI := ${ANDROID_NDK_ABI_NAME}\n")
    file(WRITE ${PROJECT_SOURCE_DIR}/jni/Application.mk "APP_ABI := ${ANDROID_NDK_ABI_NAME}\n")

    # 2. generate gdb.setup
    get_directory_property(PROJECT_INCLUDES DIRECTORY ${PROJECT_SOURCE_DIR} INCLUDE_DIRECTORIES)
    string(REGEX REPLACE ";" " " PROJECT_INCLUDES "${PROJECT_INCLUDES}")
    file(WRITE ${PROJECT_SOURCE_DIR}/libs/${ANDROID_NDK_ABI_NAME}/gdb.setup "set solib-search-path ${GDB_SOLIB_PATH}\n")
    file(APPEND ${PROJECT_SOURCE_DIR}/libs/${ANDROID_NDK_ABI_NAME}/gdb.setup "directory ${PROJECT_INCLUDES}\n")

    # 3. copy gdbserver executable
    file(COPY ${ANDROID_NDK}/prebuilt/android-arm/gdbserver/gdbserver DESTINATION ${PROJECT_SOURCE_DIR}/libs/${ANDROID_NDK_ABI_NAME}/)

    # 4. copy lib to obj
    add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND mkdir -p ${GDB_SOLIB_PATH})
    add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND cp ${TARGET_LOCATION} ${GDB_SOLIB_PATH})

    # 5. strip symbols
    add_custom_command(TARGET NDK_GDB POST_BUILD COMMAND ${CMAKE_STRIP} ${TARGET_LOCATION})
endmacro()</code></pre>
<p>Then use it like</p>
<pre><code class="cmake">add_library(YourTarget ...)
ndk_gdb_debuggable(YourTarget)
</code></pre>
<p>You should now be able to use <em>ndk-gdb</em> with CMake, just as if you would have used <em>ndk-build</em>.</p>
<p>Note that steps 4 and 5 are optional for debugging. They just reduce the size of the library that has to be transferred to the device. If you dont care, you can just leave them out. But then the solib search path from step 2 must be set to:</p>
<pre><code class="cmake">file(WRITE ./libs/${ANDROID_NDK_ABI_NAME}/gdb.setup "set solib-search-path ./libs/${ANDROID_NDK_ABI_NAME}\n")</code></pre>
<p>Ideally someone should integrate that in the Android toolchain linked above.</p>
<p><strong>Update</strong> <a href="https://github.com/taka-no-me/android-cmake">Merged Upstream</a></p>
<span class="net_nemein_favourites">1 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=66afe25a6c4911e19de23d440d95e59ae59a&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/66afe25a6c4911e19de23d440d95e59ae59a/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>3 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=66afe25a6c4911e19de23d440d95e59ae59a&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/66afe25a6c4911e19de23d440d95e59ae59a/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Mon, 12 Mar 2012 13:01:24 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-66afe25a6c4911e19de23d440d95e59ae59a</guid>
        </item>
        <item>
            <title>GNOME Project suffering the NIH disease</title>
            <link>http://www.rojtberg.net/457/gnome-project-suffering-the-nih-disease/</link>
            <description><![CDATA[
<script><!--
dynamicgoogletags.update();
//--></script><p><a href="http://www.rojtberg.net/wp-content/uploads/2011/12/aa.jpg"><img class="alignleft size-full wp-image-459" title="Standing on the Shoulders of Giants (from Wikipedia)" src="http://www.rojtberg.net/wp-content/uploads/2011/12/aa.jpg" alt="" width="262" height="599" /></a>When I first read about <a href="http://www.omgubuntu.co.uk/2011/05/gnome-to-drop-support-for-bsd-solaris-unix/">GNOME dropping support for BSD and Solaris</a>, my impression was that this is a good idea to aiming to unify limit resources and get the work done. I was also excited about the idea of the GNOME OS. I think it is necessary to keep the big picture in mind when developing the different components. Previously Ubuntu was the only project that did this and it was also the reason why I started using Ubuntu. Because it made the different parts of Linux work together to achieve the big goal of a great overall system.</p>
<p>But then things started to go wrong. Instead of picking existing components and giving them the final polish like Ubuntu did before, the GNOME project started developing things from scratch without any apparent reason to do so. And even worse: incompatible to existing solutions. It started with <a href="http://bethesignal.org/blog/2011/03/12/the-libappindicator-story/">the rejection of the appindicator specification </a>implemented by Ubuntu and KDE. At that point it was not clear to me whether the specification was broken or whether the responsible people at GNOME were just ignorant.</p>
<p><a href="http://undacuvabrutha.wordpress.com/2011/04/29/why-ubuntu-should-continue-with-upstart-for-11-10/">Then came systemd.</a> And it started to be apparent that unfortunately it was the latter. To my knowledge Ubuntu is the biggest deployment of GNOME and it is based around the Linux ecosystem. So dropping support for Ubuntu has nothing to do with unifying limited resources. Ubuntu is your target audience, so if you should try to collaborate with a project you should collaborate with Ubuntu. My opinion on that is that some Fedora developers were pissed that the Unity interface was exclusive for Ubuntu and instead of packaging it for Fedora they started making GNOME Shell exclusive for Fedora.</p>
<p>Next I <a href="http://audidude.com/?p=577">read about the overlay scrollbars re-developed for GNOME</a>. While the first reaction might be the developers simply do not want to use <a href="http://www.opiniond.com/2011/04/ubuntu-11-04-overlay-scrollbars/">Ubuntu technology</a>, I think the reason is different. The developer does not seem to have any antipathy towards Ubuntu and if we look at<a href="https://live.gnome.org/ChristianHergert/Gnome3DX"> the project he developed the scrollbars for</a> another explanation becomes visible.</p>
<p>But first lets take a step back. Lets take a look at the core of GNOME. By this I mean the programming language it is written in. It is C/GObject; plain C extended with naming conventions and libraries to allow modern paradigms such as object oriented programming and events/ observer pattern. From today’s perspective one might wonder why one should choose this over C++, which integrates most of the features at the language level. But back when the GNOME project started C++ was not mature yet which meant that your program might break with the next compiler update or even the next STL update.</p>
<p>Therefore basing your project on plain C was a good idea. But a few years back it became obvious that programming in C/GObject seriosly lacked behind more modern programming languages like C++, Java and C# for application development.</p>
<p>Unfortunately instead of moving the straightforward route from C to C++, which most of C developers took when C++ matured(that was about 10 years ago), <a href="http://lwn.net/Articles/335966/">Vala was born.</a></p>
<p>So instead of using a proven and mature foundation, a new layer of indirection was created to essentially provide the same feature set. Commonly this is referred to as the <a href="http://en.wikipedia.org/wiki/Not_Invented_Here">&#8220;not invented here&#8221;</a> symptom. A more derogative phrase would be reinventing the wheel..</p>
<p>What is sad here is that being an open source project, GNOME disregards the biggest advantage of open source software, namely <a href="http://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants">standing on the shoulders of giants</a>. With open source software you can use take an existing solution and improve upon it. This way you get the base functionality as well as the bug fixes that went in it for free. If you would develop it from scratch, you most likely would have to fix the same bugs again yourself.</p>
<p>To sum up here is what GNOME is losing right now</p>
<ul>
<li>30 years of language and library experience by using Vala instead of C++</li>
<li>5 years of deployment and bug fixing by using systemd instead of extending upstart</li>
<li>1 year of development testing and design if they reimplement overlay-scrollbars</li>
<li>8 years of foundation development that went into Eclipse, by developing Gnome Builder from scratch</li>
<li>but most importantly: <strong>the synergy effects by collaborating with others</strong></li>
</ul>
<p>Do not get me wrong, I am not saying that the GNOME solutions could be replaced by existing solutions &#8211; I am saying that by extending existing solutions the GNOME project and the free software landscape would be better off as a whole.</p>
<span class="net_nemein_favourites">5 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=f1b410d4233c11e1bb428b055c3345794579&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/f1b410d4233c11e1bb428b055c3345794579/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>2 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=f1b410d4233c11e1bb428b055c3345794579&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/f1b410d4233c11e1bb428b055c3345794579/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Sat, 10 Dec 2011 14:03:47 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-f1b410d4233c11e1bb428b055c3345794579</guid>
        </item>
        <item>
            <title>Doing the right thing</title>
            <link>http://www.rojtberg.net/408/doing-the-right-thing/</link>
            <description><![CDATA[
<p>Canonical is doing the right thing. Yes morally as well. By choosing the MIT/X11 license instead of the GPL the Banshee developer explicitly allow using Banshee in a closed-source for-profit project without giving back anything.</p>
<p>To start whining about moral, now that someone actually takes advantage of this right is somehow premature &#8211; in the end you had the choice how to license it, right? If you don’t like what happens change the license! Maybe a proprietary one this time, as open source obviously is not restrictive enough for you and you have to resort to &#8220;morality&#8221;.</p>
<p>As for me I would be perfectly happy if Canonical would simply keep 100% of the Amazon revenue &#8211; after all its their product (yes putting together the pieces makes it something new).</p>
<p>As a user I care most whether the product works and I use ubuntu as it works best for me. And since canonical did a great job so far providing what I want, I think the decision should be up to them whether to spend the money on shiny new icons or to give something back to the banshee developers.</p>
<p>For reference: <a href="http://www.vuntz.net/journal/post/2011/02/28/Canonical%2C-you-re-breaking-my-heart">this</a> and <a href="http://www.markshuttleworth.com/archives/611">this</a>.</p>
<span class="net_nemein_favourites">3 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=fba4f98a44d211e0bd04ad48e97c0cba0cba&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/fba4f98a44d211e0bd04ad48e97c0cba0cba/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>4 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=fba4f98a44d211e0bd04ad48e97c0cba0cba&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/fba4f98a44d211e0bd04ad48e97c0cba0cba/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Wed, 02 Mar 2011 11:53:24 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-fba4f98a44d211e0bd04ad48e97c0cba0cba</guid>
        </item>
        <item>
            <title>Augmented Reality on the N900</title>
            <link>http://www.rojtberg.net/395/augmented-reality-on-the-n900/</link>
            <description><![CDATA[
<p>finally I reached a stage where I could upload my small augmented reality app to extras-devel, so all those who asked for it can now play with it. But be aware that it is in extras-devel for a reason. In case you are wondering what I am writing about, here is a video of the demo:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://www.youtube.com/v/WR2GUWrxTmU&amp;hl=en_US&amp;fs=1&amp;rel=0" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/WR2GUWrxTmU&amp;hl=en_US&amp;fs=1&amp;rel=0" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/WR2GUWrxTmU&amp;hl=en_US&amp;fs=1&amp;rel=0" allowscriptaccess="always" allowfullscreen="true" data="http://www.youtube.com/v/WR2GUWrxTmU&amp;hl=en_US&amp;fs=1&amp;rel=0"></embed></object></p>
<p>in order to make it work, you will have to print <a href="http://www.rojtberg.net/wp-content/uploads/2010/06/arapp_markers.pdf">the artoolkitplus markers</a>. Furthermore there are these controls:</p>
<ul>
<li>scale the objects using the volume buttons</li>
<li>select one of the objects for scaling by tapping on it</li>
<li>tapping on the palette symbol triggers annotating by drawing on the screen</li>
<li>tapping on the sun symbol fixes the sun to the current device position</li>
<li>once fixed the shadows can be rotated using the arrow keys</li>
</ul>
 <!-- Easy Plugin for AdSense Unfiltered [count: 3 is not less than 3] --><span class="net_nemein_favourites">21 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2e5074ba793411df8f51e10efce0a9aaa9aa&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2e5074ba793411df8f51e10efce0a9aaa9aa/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2e5074ba793411df8f51e10efce0a9aaa9aa&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2e5074ba793411df8f51e10efce0a9aaa9aa/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Wed, 16 Jun 2010 10:22:35 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2e5074ba793411df8f51e10efce0a9aaa9aa</guid>
        </item>
        <item>
            <title>Handheld based interaction using AR</title>
            <link>http://www.rojtberg.net/383/handheld-based-interaction-using-ar/</link>
            <description><![CDATA[
<p>it is time for the next demo of my project, as I reached the beta status. (feature complete) I think you can see quite clearly now where this is going and which kind of interactions will be possible using this technique. The concrete features are described in the annotations.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/EN3UBJp8298&amp;hl=en&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/EN3UBJp8298&amp;hl=en&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>If you use more advanced tracking methods and add some physics to this, you could easily port numpty physics to this kind of interaction or create an easy to use level editor. In case you missed my last video,<a href="http://www.youtube.com/watch?v=WR2GUWrxTmU&amp;feature=related"> here is the link</a>.</p>
<p>It will still take some weeks until this hits maemo-extras as there are still some bugs left and I still want to get rid of keyboard use for interaction.</p>
 <!-- Easy AdSense Unfiltered [count: 3 is not less than 3] --><span class="net_nemein_favourites">10 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=16914a24222d11dfb387ff02f21e85628562&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/16914a24222d11dfb387ff02f21e85628562/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=16914a24222d11dfb387ff02f21e85628562&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/16914a24222d11dfb387ff02f21e85628562/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Pavel Rojtberg &lt;pavel@rojtberg.net&gt;</author>
            <category>feed:dc2d42ffa90d409ad35691447d64bb45</category>
            <pubDate>Thu, 25 Feb 2010 15:49:16 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-16914a24222d11dfb387ff02f21e85628562</guid>
        </item>
    </channel>
</rss>
